7#ifndef MYGUI_RESOURCE_MANAGER_H_
8#define MYGUI_RESOURCE_MANAGER_H_
34 bool load(
const std::string& _file);
55 bool isExist(std::string_view _name)
const;
67 using MapResource = std::map<std::string, IResource*, std::less<>>;
78 bool _loadImplement(
const std::string& _file,
bool _match, std::string_view _type, std::string_view _instance);
82 using MapLoadXmlDelegate = std::map<std::string, LoadXmlDelegate, std::less<>>;
83 MapLoadXmlDelegate mMapLoadXmlDelegate;
87 using VectorResource = std::vector<IResource*>;
88 VectorResource mRemovedResources;
90 bool mIsInitialise{
false};
91 std::string mCategoryName;
92 std::string mXmlListTagName;
#define MYGUI_SINGLETON_DECLARATION(ClassName)
void unregisterLoadXmlDelegate(std::string_view _key)
std::map< std::string, IResource *, std::less<> > MapResource
const std::string & getCategoryName() const
bool isExist(std::string_view _name) const
void removeResource(IResourcePtr _item)
LoadXmlDelegate & registerLoadXmlDelegate(std::string_view _key)
void loadFromXmlNode(xml::ElementPtr _node, std::string_view _file, Version _version)
ResourceManager(const ResourceManager &)=delete
IResource * getByName(std::string_view _name, bool _throw=true) const
EnumeratorPtr getEnumerator() const
Enumerator< MapResource > EnumeratorPtr
bool load(const std::string &_file)
IResource * findByName(std::string_view _name) const
bool removeByName(std::string_view _name)
EventPairConvertStringView< delegates::Delegate< xml::ElementPtr, const std::string &, Version >, delegates::Delegate< xml::ElementPtr, std::string_view, Version > > LoadXmlDelegate
void addResource(IResourcePtr _item)