Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CResourceManager Class Reference

Resource manager. More...

`#include <KeosResourceManager.h>`

Inheritance diagram for Keos::CResourceManager:

List of all members.

## Public Member Functions

template<class T>
T * | Get (const String &strName) const
| Get a resource.
void | Add (const String &strName, IResource *pResource)
| Add a resource.
void | Remove (const String &strName)
| Remove a resource.

## Private Types

typedef std::map< String, IResource * > | TResourcesMap

## Private Member Functions

| CResourceManager ()
| Default constructor.
| ~CResourceManager ()
| Destructor.

## Private Attributes

friend | CSingleton<CResourceManager>
TResourcesMap | m_Resources
| Map with the resource and its filename.

## Detailed Description

Resource manager.

Using for loadable resource from a file.

Definition at line 33 of file KeosResourceManager.h.

## Member Typedef Documentation

typedef std::map<String, IResource*> Keos::CResourceManager::TResourcesMap`[private]`

| Definition at line 66 of file KeosResourceManager.h.

## Constructor & Destructor Documentation

Keos::CResourceManager::CResourceManager | ( |  | ) | `[private]`

| Default constructor. Definition at line 34 of file KeosResourceManager.cpp.

Keos::CResourceManager::~CResourceManager | ( |  | ) | `[private]`

| Destructor. Definition at line 40 of file KeosResourceManager.cpp. References m_Resources.

## Member Function Documentation

void Keos::CResourceManager::Add | ( | const String & | strName,
|  | IResource * | pResource
| ) |

| Add a resource.

Parameters:

  | strName | Name of the resource.
  | pResource | Resource to add.

Definition at line 55 of file KeosResourceManager.cpp.

References Assert, and m_Resources.

template<class T>
T * Keos::CResourceManager::Get | ( | const String & | strName | ) | const`[inline]`

| Get a resource.

Parameters:

  | strName | Name of the resource.

Returns:
  Pointer on the resource, or NULL if it was not loaded.

Definition at line 78 of file KeosResourceManager.h.

References m_Resources.

void Keos::CResourceManager::Remove | ( | const String & | strName | ) |

| Remove a resource.

Parameters:

  | strName | Name of the resource.

Definition at line 67 of file KeosResourceManager.cpp.

References m_Resources.

## Member Data Documentation

friend Keos::CResourceManager::CSingleton<CResourceManager>`[private]`

| Definition at line 35 of file KeosResourceManager.h.

TResourcesMap Keos::CResourceManager::m_Resources`[private]`

| Map with the resource and its filename. Definition at line 69 of file KeosResourceManager.h. Referenced by Add(), Get(), Remove(), and ~CResourceManager().

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

- KeosEngine/KeosResourceManager.h
- KeosEngine/KeosResourceManager.cpp