An abstract resource loader, loads ResourceDescriptor from disk or other locations. More...
#include <ResourceLoader.h>
Public Member Functions | |
ResourceLoader () | |
Creates a new resource loader. | |
virtual | ~ResourceLoader () |
Deletes this resource loader. | |
virtual string | findResource (const string &name)=0 |
Returns the path of the resource of the given name. | |
virtual ptr< ResourceDescriptor > | loadResource (const string &name)=0 |
Loads the ResourceDescriptor of the given name. | |
virtual ptr< ResourceDescriptor > | reloadResource (const string &name, ptr< ResourceDescriptor > currentValue)=0 |
Reloads the ResourceDescriptor of the given name. |
An abstract resource loader, loads ResourceDescriptor from disk or other locations.
ork::ResourceLoader::ResourceLoader | ( | ) |
Creates a new resource loader.
virtual ork::ResourceLoader::~ResourceLoader | ( | ) | [virtual] |
Deletes this resource loader.
virtual string ork::ResourceLoader::findResource | ( | const string & | name | ) | [pure virtual] |
Returns the path of the resource of the given name.
name | the name of a resource. |
exception | if the resource is not found. |
Implemented in ork::CompiledResourceLoader, ork::ResourceCompiler, and ork::XMLResourceLoader.
virtual ptr<ResourceDescriptor> ork::ResourceLoader::loadResource | ( | const string & | name | ) | [pure virtual] |
Loads the ResourceDescriptor of the given name.
name | the name of the ResourceDescriptor to be loaded. |
Implemented in ork::CompiledResourceLoader, ork::ResourceCompiler, and ork::XMLResourceLoader.
virtual ptr<ResourceDescriptor> ork::ResourceLoader::reloadResource | ( | const string & | name, | |
ptr< ResourceDescriptor > | currentValue | |||
) | [pure virtual] |
Reloads the ResourceDescriptor of the given name.
name | the name of the ResourceDescriptor to be loaded. | |
currentValue | the current value of this ResourceDescriptor. |
Implemented in ork::CompiledResourceLoader, and ork::XMLResourceLoader.