Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::sound::io::MIDITranscoder Class Reference

A class that encodes and decodes the MIDI format. More...

#include <omSoundMIDITranscoder.h>

Inheritance diagram for om::sound::io::MIDITranscoder:
om::resources::ResourceTypeTranscoder< DataType > om::resources::ResourceTranscoder

Public Member Functions

virtual const ResourceFormatgetResourceFormat () const
 Return an object that represents the resource format that this transcoder can read and write. More...
 
virtual Bool canEncode (const MIDI &midi) const
 Return whether or not this transcoder is able to encode the specified resource. More...
 
virtual Bool encode (const ResourceID &identifier, const MIDI &midi, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Save the specified sound resource at the specified ID location. More...
 
virtual Bool canDecode (const ResourceID &identifier) const
 Return whether or not the specified identifier refers to a valid resource for this transcoder. More...
 
virtual MIDIdecode (ResourceID &identifier, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Load the sound pointed to by the specified identifier. More...
 
- Public Member Functions inherited from om::resources::ResourceTypeTranscoder< DataType >
virtual const ResourceTypegetResourceType () const
 Return an object that represents the resource type that this transcoder can read and write. More...
 
virtual Bool canEncode (const DataType &resource) const =0
 Return whether or not this transcoder is able to encode the specified resource. More...
 
virtual Bool encode (const ResourceID &identifier, const DataType &resource, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))=0
 Save the specified resource object at the specified ID location. More...
 
- Public Member Functions inherited from om::resources::ResourceTranscoder
virtual ~ResourceTranscoder ()
 Destroy a resource transcoder and release all of its resources. More...
 

Static Public Attributes

static const ResourceFormat FORMAT
 The resource format for MIDI. More...
 

Detailed Description

A class that encodes and decodes the MIDI format.

Member Function Documentation

virtual const ResourceFormat& om::sound::io::MIDITranscoder::getResourceFormat ( ) const
virtual

Return an object that represents the resource format that this transcoder can read and write.

Implements om::resources::ResourceTranscoder.

virtual Bool om::sound::io::MIDITranscoder::canEncode ( const MIDI midi) const
virtual

Return whether or not this transcoder is able to encode the specified resource.

virtual Bool om::sound::io::MIDITranscoder::encode ( const ResourceID identifier,
const MIDI midi,
const ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
)
virtual

Save the specified sound resource at the specified ID location.

The method returns whether or not the resource was successfully written.

virtual Bool om::sound::io::MIDITranscoder::canDecode ( const ResourceID identifier) const
virtual

Return whether or not the specified identifier refers to a valid resource for this transcoder.

If the identifier represents a valid resource, TRUE is returned. Otherwise, if the resource is not valid, FALSE is returned.

Implements om::resources::ResourceTranscoder.

virtual MIDI* om::sound::io::MIDITranscoder::decode ( ResourceID identifier,
ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
)
virtual

Load the sound pointed to by the specified identifier.

The caller can supply a pointer to a resource manager which can be used to manage the creation of child resources.

If the method fails, the return value will be NULL.

Implements om::resources::ResourceTypeTranscoder< DataType >.

Member Data Documentation

const ResourceFormat om::sound::io::MIDITranscoder::FORMAT
static

The resource format for MIDI.


The documentation for this class was generated from the following file: