Om
1.0.0
A universal framework for multimedia simulation
|
A class that defines the interface for other classes that load and save resource data of the templated type. More...
#include <omResourceTypeTranscoder.h>
Public Member Functions | |
virtual const ResourceType & | getResourceType () 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... | |
virtual DataType * | decode (ResourceID &identifier, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))=0 |
Load the resource pointed to by the specified identifier. More... | |
Public Member Functions inherited from om::resources::ResourceTranscoder | |
virtual | ~ResourceTranscoder () |
Destroy a resource transcoder and release all of its resources. More... | |
virtual const ResourceFormat & | getResourceFormat () const =0 |
Return an object that represents the resource format that this transcoder can read and write. More... | |
virtual Bool | canDecode (const ResourceID &identifier) const =0 |
Return whether or not the specified identifier refers to a valid resource for this transcoder. More... | |
A class that defines the interface for other classes that load and save resource data of the templated type.
|
inlinevirtual |
Return an object that represents the resource type that this transcoder can read and write.
Implements om::resources::ResourceTranscoder.
|
pure virtual |
Return whether or not this transcoder is able to encode the specified resource.
Implemented in om::resources::ResourceSetTranscoder.
|
pure virtual |
Save the specified resource object at the specified ID location.
The method returns whether or not the resource was successfully written.
Implemented in om::resources::ResourceSetTranscoder.
|
pure virtual |
Load the resource pointed to by the specified identifier.
The caller can supply a pointer to a resource manager which can be used to load child resources. A resource set is provided as a place to store child resources. The caller is responsible for destructing the returned object.
If the method fails, the return value will be NULL.
Implemented in om::resources::ResourceSetTranscoder, om::images::io::ImageTranscoder, om::sound::io::HRTFTranscoder, om::graphics::io::MeshworkTranscoder, om::graphics::io::OBJTranscoder, om::graphics::io::PLYTranscoder, om::graphics::io::TextureTranscoder, om::sound::io::MIDITranscoder, om::graphics::gui::resources::FontTranscoder, and om::sound::io::SoundTranscoder.