MyGUI 3.2.2

Public Types | Public Member Functions
MyGUI::ResourceManager Class Reference

`#include <MyGUI_ResourceManager.h>`

Inheritance diagram for MyGUI::ResourceManager:
[legend]

## Public Types
typedef delegates::CDelegate3< xml::ElementPtr, const std::string &, Version > | LoadXmlDelegate
typedef std::map< std::string, IResource * > | MapResource
typedef Enumerator< MapResource > | EnumeratorPtr
Public Types inherited from MyGUI::Singleton< ResourceManager >
typedef Singleton< ResourceManager > | Base

## Public Member Functions
| ResourceManager ()
void | initialise ()
void | shutdown ()
bool | load (const std::string &_file)
void | loadFromXmlNode (xml::ElementPtr _node, const std::string &_file, Version _version)
void | addResource (IResourcePtr _item)
void | removeResource (IResourcePtr _item)
LoadXmlDelegate & | registerLoadXmlDelegate (const std::string &_key)
void | unregisterLoadXmlDelegate (const std::string &_key)
bool | isExist (const std::string &_name) const
IResource * | findByName (const std::string &_name) const
IResource * | getByName (const std::string &_name, bool _throw=true) const
bool | removeByName (const std::string &_name)
void | clear ()
EnumeratorPtr | getEnumerator () const
size_t | getCount () const
const std::string & | getCategoryName () const
Public Member Functions inherited from MyGUI::Singleton< ResourceManager >
| Singleton ()
virtual | ~Singleton ()
Public Member Functions inherited from MyGUI::MemberObsolete< ResourceManager >
size_t | getResourceCount ()
IResourcePtr | getResource (const std::string &_name, bool _throw=true)

## Additional Inherited Members
Static Public Member Functions inherited from MyGUI::Singleton< ResourceManager >
static ResourceManager & | getInstance ()
static ResourceManager * | getInstancePtr ()
static const char * | getClassTypeName ()

## Detailed Description

Definition at line 21 of file MyGUI_ResourceManager.h.

## Member Typedef Documentation

## ◆ EnumeratorPtr

typedef Enumerator<MapResource> MyGUI::ResourceManager::EnumeratorPtr

Definition at line 65 of file MyGUI_ResourceManager.h.

## ◆ LoadXmlDelegate

typedef delegates::CDelegate3<xml::ElementPtr, const std::string&, Version> MyGUI::ResourceManager::LoadXmlDelegate

Definition at line 43 of file MyGUI_ResourceManager.h.

## ◆ MapResource

typedef std::map<std::string, IResource*> MyGUI::ResourceManager::MapResource

Definition at line 64 of file MyGUI_ResourceManager.h.

## Constructor & Destructor Documentation

## ◆ ResourceManager()

MyGUI::ResourceManager::ResourceManager | ( |  | ) |

Definition at line 22 of file MyGUI_ResourceManager.cpp.

## Member Function Documentation

## ◆ addResource()

void MyGUI::ResourceManager::addResource | ( | IResourcePtr | _item | ) |

Add resource item to resources

Definition at line 205 of file MyGUI_ResourceManager.cpp.

## ◆ clear()

void MyGUI::ResourceManager::clear | ( |  | ) |

Definition at line 254 of file MyGUI_ResourceManager.cpp.

## ◆ findByName()

IResource * MyGUI::ResourceManager::findByName | ( | const std::string & | _name | ) | const

Find resource by name

Definition at line 229 of file MyGUI_ResourceManager.cpp.

## ◆ getByName()

IResource * MyGUI::ResourceManager::getByName | ( | const std::string & | _name,
|  | bool | _throw = `true`
| ) |  | const

Get resource by name

Definition at line 235 of file MyGUI_ResourceManager.cpp.

## ◆ getCategoryName()

const std::string & MyGUI::ResourceManager::getCategoryName | ( |  | ) | const

Definition at line 275 of file MyGUI_ResourceManager.cpp.

## ◆ getCount()

size_t MyGUI::ResourceManager::getCount | ( |  | ) | const

Definition at line 270 of file MyGUI_ResourceManager.cpp.

## ◆ getEnumerator()

ResourceManager::EnumeratorPtr MyGUI::ResourceManager::getEnumerator | ( |  | ) | const

Definition at line 265 of file MyGUI_ResourceManager.cpp.

## ◆ initialise()

void MyGUI::ResourceManager::initialise | ( |  | ) |

Definition at line 29 of file MyGUI_ResourceManager.cpp.

## ◆ isExist()

bool MyGUI::ResourceManager::isExist | ( | const std::string & | _name | ) | const

Check is resource exist

Definition at line 224 of file MyGUI_ResourceManager.cpp.

## ◆ load()

bool MyGUI::ResourceManager::load | ( | const std::string & | _file | ) |

Load additional MyGUI *_resource.xml file

Definition at line 61 of file MyGUI_ResourceManager.cpp.

## ◆ loadFromXmlNode()

void MyGUI::ResourceManager::loadFromXmlNode | ( | xml::ElementPtr | _node,
|  | const std::string & | _file,
|  | Version | _version
| ) |  |

Definition at line 66 of file MyGUI_ResourceManager.cpp.

## ◆ registerLoadXmlDelegate()

ResourceManager::LoadXmlDelegate & MyGUI::ResourceManager::registerLoadXmlDelegate | ( | const std::string & | _key | ) |

Register delegate that parse XML node with specified tag (_key)

Definition at line 119 of file MyGUI_ResourceManager.cpp.

## ◆ removeByName()

bool MyGUI::ResourceManager::removeByName | ( | const std::string & | _name | ) |

Definition at line 242 of file MyGUI_ResourceManager.cpp.

## ◆ removeResource()

void MyGUI::ResourceManager::removeResource | ( | IResourcePtr | _item | ) |

Remove resource item from resources

Definition at line 211 of file MyGUI_ResourceManager.cpp.

## ◆ shutdown()

void MyGUI::ResourceManager::shutdown | ( |  | ) |

Definition at line 44 of file MyGUI_ResourceManager.cpp.

## ◆ unregisterLoadXmlDelegate()

void MyGUI::ResourceManager::unregisterLoadXmlDelegate | ( | const std::string & | _key | ) |

Unregister delegate that parse XML node with specified tag (_key)

Definition at line 126 of file MyGUI_ResourceManager.cpp.

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

- MyGUI_ResourceManager.h
- MyGUI_ResourceManager.cpp