Public Member Functions | |
AssetManager () | |
Constructor. | |
~AssetManager () | |
Deconstructor. | |
void | init () |
Initialises the AssetManager. | |
void | clear () |
Clears the AssetManager. | |
void | grab () |
Increases the reference counter. | |
void | drop () |
Decreases the reference counter. | |
bool | addAssetGroup (AssetGroup *group) |
Adds the given AssetGroup to the DataStore. | |
AssetGroup * | createAssetGroup (const std::string &name, const std::string &dirName, bool grab=true) |
Creates (and adds) a AssetGroup with the given name. | |
AssetGroup * | getAssetGroup (const u32 id) |
Gets the AssetGroup with the given ID. | |
AssetGroup * | getAssetGroup (const std::string &name) |
Gets the AssetGroup with the given name. | |
bool | registerProcessorFactory (const std::string &name, AssetProcessor *(*f)(AssetGroup *)) |
Registers an AssetProcessor factory function. | |
bool | unregisterProcessorFactory (const std::string &name) |
Unregisters an AssetProcessor factory function. | |
void | unregisterProcessorFactories () |
Unregisters all AssetProcessor factory functions. | |
void | removeAssetGroups () |
Removes all AssetGroups from the AssetManager. | |
bool | removeAssetGroup (AssetGroup *group) |
Removes the given AssetGroup. | |
bool | removeAssetGroup (const u32 id) |
Removes the given AssetGroup with the given ID. | |
bool | removeAssetGroup (const std::string &name) |
Removes the given AssetGroup with the given name. | |
Friends | |
class | AssetGroup |
Definition at line 37 of file AssetManager.h.
AssetManager::AssetManager | ( | ) |
AssetManager::~AssetManager | ( | ) |
bool AssetManager::addAssetGroup | ( | AssetGroup * | group | ) |
Adds the given AssetGroup to the DataStore.
group | Pointer to the AssetGroup to add. |
Definition at line 57 of file AssetManager.cpp.
void AssetManager::clear | ( | ) |
AssetGroup * AssetManager::createAssetGroup | ( | const std::string & | name, | |
const std::string & | dirName, | |||
bool | grab = true | |||
) |
Creates (and adds) a AssetGroup with the given name.
name | Name of the AssetGroup. | |
dirName | Name of the base directory of the asset group. | |
grab | Should the AssetsManager add the loaded asset group to the internal list? |
Definition at line 75 of file AssetManager.cpp.
void AssetManager::drop | ( | ) | [virtual] |
Decreases the reference counter.
Reimplemented from ReferenceCounted.
Definition at line 51 of file AssetManager.cpp.
AssetGroup * AssetManager::getAssetGroup | ( | const std::string & | name | ) |
Gets the AssetGroup with the given name.
Definition at line 106 of file AssetManager.cpp.
AssetGroup * AssetManager::getAssetGroup | ( | const u32 | id | ) |
Gets the AssetGroup with the given ID.
Definition at line 94 of file AssetManager.cpp.
void AssetManager::grab | ( | ) | [virtual] |
Increases the reference counter.
Reimplemented from ReferenceCounted.
Definition at line 45 of file AssetManager.cpp.
void AssetManager::init | ( | ) |
bool AssetManager::registerProcessorFactory | ( | const std::string & | name, | |
AssetProcessor *(*)(AssetGroup *) | f | |||
) |
Registers an AssetProcessor factory function.
Definition at line 128 of file AssetManager.cpp.
bool AssetManager::removeAssetGroup | ( | const std::string & | name | ) |
Removes the given AssetGroup with the given name.
name | Name of the AssetGroup to remove. |
Definition at line 225 of file AssetManager.cpp.
bool AssetManager::removeAssetGroup | ( | const u32 | id | ) |
Removes the given AssetGroup with the given ID.
id | ID of the AssetGroup to remove. |
Definition at line 203 of file AssetManager.cpp.
bool AssetManager::removeAssetGroup | ( | AssetGroup * | group | ) |
Removes the given AssetGroup.
group | Pointer to the AssetGroup to remove. |
Definition at line 177 of file AssetManager.cpp.
void AssetManager::removeAssetGroups | ( | ) |
void AssetManager::unregisterProcessorFactories | ( | ) |
bool AssetManager::unregisterProcessorFactory | ( | const std::string & | name | ) |
Unregisters an AssetProcessor factory function.
Definition at line 144 of file AssetManager.cpp.
friend class AssetGroup [friend] |
Definition at line 39 of file AssetManager.h.