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

#include <MyGUI_ResourceManager.h>

Inheritance diagram for MyGUI::ResourceManager:
Inheritance graph
[legend]

Public Types

typedef delegates::CDelegate3< xml::ElementPtr, const std::string &, VersionLoadXmlDelegate
 
typedef std::map< std::string, IResource * > MapResource
 
typedef Enumerator< MapResourceEnumeratorPtr
 

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)
 
LoadXmlDelegateregisterLoadXmlDelegate (const std::string &_key)
 
void unregisterLoadXmlDelegate (const std::string &_key)
 
bool isExist (const std::string &_name) const
 
IResourcefindByName (const std::string &_name) const
 
IResourcegetByName (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::MemberObsolete< ResourceManager >
size_t getResourceCount () const
 
IResourcePtr getResource (const std::string &_name, bool _throw=true) const
 

Static Public Member Functions

static ResourceManagergetInstance ()
 
static ResourceManagergetInstancePtr ()
 
static const char * getClassTypeName ()
 

Detailed Description

Definition at line 21 of file MyGUI_ResourceManager.h.

Member Typedef Documentation

◆ EnumeratorPtr

Definition at line 65 of file MyGUI_ResourceManager.h.

◆ 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 21 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.

◆ getClassTypeName()

static const char * MyGUI::ResourceManager::getClassTypeName ( )
static

◆ 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.

◆ getInstance()

static ResourceManager & MyGUI::ResourceManager::getInstance ( )
static

◆ getInstancePtr()

static ResourceManager * MyGUI::ResourceManager::getInstancePtr ( )
static

◆ 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: