Base File Resource Manager Class. More...
#include <deFileResourceManager.h>
Public Member Functions | |
Constructors and Destructors | |
| deFileResourceManager (deEngine *engine, int type) | |
| Creates a new file resource manager linked to the given engine with the given type. | |
| virtual | ~deFileResourceManager () |
| Cleans up the resource manager. | |
Management | |
| decPath * | FindFileForReading (const char *filename, const char *basePath) const |
| Returns the path to the given file relative to the given base path using the engine file manager if it exists or NULL otherwise. | |
| bool | FindFileForReading (decPath &path, const char *filename, const char *basePath) const |
| Retrieves the path to the given file relative to the base path using the engine file manager. | |
| decBaseFileReader * | OpenFileForReading (const char *filename) const |
| Opens the given file for reading using the engine file manager. | |
| decBaseFileWriter * | OpenFileForWriting (const char *filename) const |
| Opens the given file for writing using the engine file manager. | |
Path Management | |
This is depracted and will be removed soon. | |
| int | GetPathCount () const |
| const char * | GetPath (int index) const |
| bool | IncludesPath (const char *path) const |
| void | AddPath (const char *path) |
| void | RemovePath (const char *path) |
| void | RemoveAllPath () |
Base File Resource Manager Class.
Provides basic support for resource managers. The actual management of resource the subclass should implement using the resource list class provided (although you are free to do differently if you really know what you are doing). The RemoveResource function is protected and has to be used only by a deResource derived object to notify the resource manager that this object has to be freed from memory. Do not do any reference counting inside the subclass. If a resource is ready to be freed it will tell you by calling RemoveResource.
| deFileResourceManager::deFileResourceManager | ( | deEngine * | engine, |
| int | type | ||
| ) |
Creates a new file resource manager linked to the given engine with the given type.
| virtual deFileResourceManager::~deFileResourceManager | ( | ) | [virtual] |
Cleans up the resource manager.
| void deFileResourceManager::AddPath | ( | const char * | path ) |
| decPath* deFileResourceManager::FindFileForReading | ( | const char * | filename, |
| const char * | basePath | ||
| ) | const |
Returns the path to the given file relative to the given base path using the engine file manager if it exists or NULL otherwise.
| bool deFileResourceManager::FindFileForReading | ( | decPath & | path, |
| const char * | filename, | ||
| const char * | basePath | ||
| ) | const |
Retrieves the path to the given file relative to the base path using the engine file manager.
If found true is return or false otherwise.
| const char* deFileResourceManager::GetPath | ( | int | index ) | const |
| int deFileResourceManager::GetPathCount | ( | ) | const |
| bool deFileResourceManager::IncludesPath | ( | const char * | path ) | const |
| decBaseFileReader* deFileResourceManager::OpenFileForReading | ( | const char * | filename ) | const |
Opens the given file for reading using the engine file manager.
| decBaseFileWriter* deFileResourceManager::OpenFileForWriting | ( | const char * | filename ) | const |
Opens the given file for writing using the engine file manager.
| void deFileResourceManager::RemoveAllPath | ( | ) |
| void deFileResourceManager::RemovePath | ( | const char * | path ) |
1.7.2