23 #ifndef __MYGUI_RESOURCE_HOLDER_H__
24 #define __MYGUI_RESOURCE_HOLDER_H__
32 template <
typename Type>
42 bool isExist(
const std::string& _name)
const
50 typename MapResource::const_iterator item =
mResources.find(_name);
51 return (item ==
mResources.end()) ?
nullptr : item->second;
55 Type*
getByName(
const std::string& _name,
bool _throw =
true)
const
58 MYGUI_ASSERT(result || !_throw,
"Resource '" << _name <<
"' not found");
62 bool remove(
const std::string& _name)
64 typename MapResource::const_iterator item =
mResources.find(_name);
96 #endif // __MYGUI_RESOURCE_HOLDER_H__