MyGUI::ResourceManager Class Reference

`#include <MyGUI_ResourceManager.h>`

Inheritance diagram for MyGUI::ResourceManager:
[legend]

## Public Types

using | LoadXmlDelegate
using | MapResource = std::map<std::string, IResource*, std::less<>>
using | EnumeratorPtr = Enumerator<MapResource>

## Public Member Functions

| ResourceManager (const ResourceManager &)=delete
ResourceManager & | operator= (const ResourceManager &)=delete
| ResourceManager ()
void | initialise ()
void | shutdown ()
bool | load (const std::string &_file)
void | loadFromXmlNode (xml::ElementPtr _node, std::string_view _file, Version _version)
void | addResource (IResourcePtr _item)
void | removeResource (IResourcePtr _item)
LoadXmlDelegate & | registerLoadXmlDelegate (std::string_view _key)
void | unregisterLoadXmlDelegate (std::string_view _key)
bool | isExist (std::string_view _name) const
IResource * | findByName (std::string_view _name) const
IResource * | getByName (std::string_view _name, bool _throw=true) const
bool | removeByName (std::string_view _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 (std::string_view _name, bool _throw=true) const

## Static Public Member Functions

static ResourceManager & | getInstance ()
static ResourceManager * | getInstancePtr ()
static std::string_view | getClassTypeName ()

## Detailed Description

Definition at line 22 of file MyGUI_ResourceManager.h.

## Member Typedef Documentation

## EnumeratorPtr

using MyGUI::ResourceManager::EnumeratorPtr = Enumerator<MapResource>

Definition at line 68 of file MyGUI_ResourceManager.h.

## LoadXmlDelegate

using MyGUI::ResourceManager::LoadXmlDelegate

Initial value:
EventPairConvertStringView<
delegates::Delegate<xml::ElementPtr, const std::string&, Version>,
delegates::Delegate<xml::ElementPtr, std::string_view, Version>>
MyGUI::EventPairConvertStringView
Definition MyGUI_EventPair.h:213
MyGUI::delegates::Delegate
Definition MyGUI_Delegate.h:158

Definition at line 44 of file MyGUI_ResourceManager.h.

## MapResource

using MyGUI::ResourceManager::MapResource = std::map<std::string, IResource*, std::less<>>

Definition at line 67 of file MyGUI_ResourceManager.h.

## Constructor & Destructor Documentation

## ResourceManager() [1/2]

MyGUI::ResourceManager::ResourceManager | ( | const ResourceManager & |  | ) |

delete

## ResourceManager() [2/2]

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 213 of file MyGUI_ResourceManager.cpp.

## clear()

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

Definition at line 262 of file MyGUI_ResourceManager.cpp.

## findByName()

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

Find resource by name

Definition at line 237 of file MyGUI_ResourceManager.cpp.

## getByName()

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

Get resource by name

Definition at line 243 of file MyGUI_ResourceManager.cpp.

## getCategoryName()

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

Definition at line 283 of file MyGUI_ResourceManager.cpp.

## getClassTypeName()

std::string_view MyGUI::ResourceManager::getClassTypeName | ( |  | ) |

static

## getCount()

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

Definition at line 278 of file MyGUI_ResourceManager.cpp.

## getEnumerator()

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

Definition at line 273 of file MyGUI_ResourceManager.cpp.

## getInstance()

ResourceManager & MyGUI::ResourceManager::getInstance | ( |  | ) |

static

## getInstancePtr()

ResourceManager * MyGUI::ResourceManager::getInstancePtr | ( |  | ) |

static

## initialise()

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

Definition at line 28 of file MyGUI_ResourceManager.cpp.

## isExist()

bool MyGUI::ResourceManager::isExist | ( | std::string_view | _name | ) | const

Check is resource exist

Definition at line 232 of file MyGUI_ResourceManager.cpp.

## load()

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

Load additional MyGUI *_resource.xml file

Definition at line 60 of file MyGUI_ResourceManager.cpp.

## loadFromXmlNode()

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

Definition at line 65 of file MyGUI_ResourceManager.cpp.

## operator=()

ResourceManager & MyGUI::ResourceManager::operator= | ( | const ResourceManager & |  | ) |

delete

## registerLoadXmlDelegate()

ResourceManager::LoadXmlDelegate & MyGUI::ResourceManager::registerLoadXmlDelegate | ( | std::string_view | _key | ) |

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

Definition at line 120 of file MyGUI_ResourceManager.cpp.

## removeByName()

bool MyGUI::ResourceManager::removeByName | ( | std::string_view | _name | ) |

Definition at line 250 of file MyGUI_ResourceManager.cpp.

## removeResource()

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

Remove resource item from resources

Definition at line 219 of file MyGUI_ResourceManager.cpp.

## shutdown()

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

Definition at line 43 of file MyGUI_ResourceManager.cpp.

## unregisterLoadXmlDelegate()

void MyGUI::ResourceManager::unregisterLoadXmlDelegate | ( | std::string_view | _key | ) |

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

Definition at line 127 of file MyGUI_ResourceManager.cpp.

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

- MyGUI_ResourceManager.h
- MyGUI_ResourceManager.cpp