deFileResourceManager Class Reference

Base File Resource Manager Class. More...

#include <deFileResourceManager.h>

Inheritance diagram for deFileResourceManager:
deResourceManager deAnimationManager deFontManager deImageManager deLanguagePackManager deModelManager deRigManager deSkinManager deSoundManager deVideoManager

List of all members.

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
decPathFindFileForReading (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.
decBaseFileReaderOpenFileForReading (const char *filename) const
 Opens the given file for reading using the engine file manager.
decBaseFileWriterOpenFileForWriting (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 ()

Detailed Description

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.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

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.


Member Function Documentation

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 )

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