Public Member Functions | Protected Member Functions

xl7::directx::ResourceManager Class Reference

#include <ResourceManager.h>

Inheritance diagram for xl7::directx::ResourceManager:
xl7::direct3d::meshes::MeshManager xl7::direct3d::models::ModelManager xl7::direct3d::shader::ShaderManager xl7::direct3d::surfaces::SurfaceManager xl7::direct3d::textures::TextureManager xl7::directinput::devices::InputDeviceManager xl7::directshow::media::MediaManager xl7::directsound::buffers::SoundBufferManager

List of all members.

Public Member Functions

bool ContainsResource (const Resource *const resource) const
bool ContainsResource (const cl7::string_type &identifier) const
size_t GetResourceCount () const
ResourceGetResource (const size_t index) const
ResourceGetResource (const cl7::string_type &identifier) const
const cl7::string_typeGetResourceIdentifier (const Resource *const resource) const
void ReleaseResource (Resource *resource)
void ReleaseResources ()
void ResignResources ()
void RestoreResources ()
void UpdateResources ()
void Log ()

Protected Member Functions

 ResourceManager (void)
virtual ~ResourceManager (void)
void _AddResource (Resource *resource)
void _RemoveResource (Resource *resource)
ResourceIterator _FindResource (const Resource *const resource) const
ResourceIterator _FindResource (const cl7::string_type &identifier) const

Detailed Description

The base class for managing resources. The class provides functions to resign and to restore the contained resources for cases in that they are lost (for example due to a task switch or initialization of another application).


Constructor & Destructor Documentation

xl7::directx::ResourceManager::ResourceManager ( void   )  [protected]

Default constructor.

xl7::directx::ResourceManager::~ResourceManager ( void   )  [protected, virtual]

Destructor.


Member Function Documentation

void xl7::directx::ResourceManager::_AddResource ( Resource resource  )  [protected]

Adds a given resource to this resource manager.

ResourceManager::ResourceIterator xl7::directx::ResourceManager::_FindResource ( const cl7::string_type identifier  )  const [protected]

Finds a given resource and returns its iterator.

ResourceManager::ResourceIterator xl7::directx::ResourceManager::_FindResource ( const Resource *const   resource  )  const [protected]

Finds a given resource and returns its iterator.

void xl7::directx::ResourceManager::_RemoveResource ( Resource resource  )  [protected]

Removes a given resource from this resource manager.

bool xl7::directx::ResourceManager::ContainsResource ( const cl7::string_type identifier  )  const

Checks whether a resource with the given name is contained in this resource manager.

bool xl7::directx::ResourceManager::ContainsResource ( const Resource *const   resource  )  const

Checks whether a given resource is contained in this resource manager.

Resource * xl7::directx::ResourceManager::GetResource ( const size_t  index  )  const

Returns the resource identified by the given index.

Resource * xl7::directx::ResourceManager::GetResource ( const cl7::string_type identifier  )  const

Returns the resource of the given identifier.

size_t xl7::directx::ResourceManager::GetResourceCount (  )  const

Returns the number of contained resources in this resource manager.

const cl7::string_type & xl7::directx::ResourceManager::GetResourceIdentifier ( const Resource *const   resource  )  const

Returns the identifier of the given resource (if specified).

void xl7::directx::ResourceManager::Log (  ) 

Outputs some information about the managed resources to the logger.

void xl7::directx::ResourceManager::ReleaseResource ( Resource resource  ) 

Releases the given resource (deletes it and removes it from the internal list).

void xl7::directx::ResourceManager::ReleaseResources (  ) 

Releases the contained resources (deletes them and removes them from the internal list).

void xl7::directx::ResourceManager::ResignResources (  ) 

Temporarily releases/resigns the contained resources.

void xl7::directx::ResourceManager::RestoreResources (  ) 

Reaquires/restores the contained resources.

void xl7::directx::ResourceManager::UpdateResources (  ) 

Updates the contained resources. This function should be called each frame.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines