| 
| 
typedef std::vector< spResource >  | resources | 
|   | 
| 
typedef std::unordered_map< std::string, spResource >  | resourcesMap | 
|   | 
| 
typedef Resource *(*  | createResourceCallback) (CreateResourceContext &context) | 
|   | 
| 
typedef Closure< void(Resource *)>  | ResLoadedCallback | 
|   | 
| 
typedef std::vector< ObjectBase * >  | __createdObjects | 
|   | 
 | 
| bool  | loadXML (const std::string &xmlFile, const ResourcesLoadOptions &opt=ResourcesLoadOptions()) | 
|   | 
| void  | add (Resource *r, bool accessByShortenID=false) | 
|   | 
| void  | load (ResLoadedCallback cb=ResLoadedCallback()) | 
|   | 
| void  | unload () | 
|   | 
| void  | free () | 
|   | 
| bool  | isEmpty () const | 
|   | 
| Resource *  | get (const std::string &id, error_policy ep=ep_show_error) const | 
|   | 
| Resource *  | operator[] (const std::string &id) | 
|   | 
| ResAnim *  | getResAnim (const std::string &id, error_policy ep=ep_show_error) const | 
|   | 
| ResFont *  | getResFont (const std::string &id, error_policy ep=ep_show_error) const | 
|   | 
| 
template<class T >  | 
| T *  | getT (const std::string &id, error_policy ep=ep_show_error) const | 
|   | 
| void  | print () const | 
|   | 
| void  | collect (resources &) | 
|   | 
| 
resources &  | _getResources () | 
|   | 
| 
resourcesMap &  | _getResourcesMap () | 
|   | 
| void  | load (LoadResourcesContext *context=0) | 
|   | 
| void  | unload () | 
|   | 
| pugi::xml_attribute  | getAttribute (const char *attr) const | 
|   | 
| 
pugi::xml_node  | getNode () const | 
|   | 
| 
bool  | getUseLoadCounter () const | 
|   | 
| 
Resource *  | getParent () const | 
|   | 
| 
void  | setUseLoadCounter (bool v) | 
|   | 
| 
void  | setParent (Resource *p) | 
|   | 
| 
  | Object (const Object &src) | 
|   | 
| 
  | Object (bool assignUniqueID=true) | 
|   | 
| 
void  | addRef () | 
|   | 
| 
void  | releaseRef () | 
|   | 
| 
  | ObjectBase (const ObjectBase &src) | 
|   | 
| 
  | ObjectBase (bool assignID=true) | 
|   | 
| 
const std::string &  | getName () const | 
|   | 
| 
const void *  | getUserData () const | 
|   | 
| 
int  | getObjectID () const | 
|   | 
| 
bool  | isName (const std::string &name) const | 
|   | 
| 
bool  | isName (const char *name) const | 
|   | 
| 
void  | setName (const std::string &name) | 
|   | 
| 
void  | setUserData (const void *data) | 
|   | 
| 
void  | dumpObject () const | 
|   | 
| 
void  | __removeFromDebugList () | 
|   | 
 | 
| static void  | registerResourceType (createResourceCallback creationCallback, const char *resTypeID) | 
|   | 
| 
static void  | unregisterResourceType (const char *resTypeID) | 
|   | 
| static std::string  | extractID (const pugi::xml_node &node, const std::string &file, const std::string &def) | 
|   | 
| 
static std::string  | extractID (const std::string &file) | 
|   | 
| static void  | dumpCreatedObjects () | 
|   | 
| static void  | showAssertInCtor (int id) | 
|   | 
| static void  | showAssertInDtor (int id) | 
|   | 
| 
static __createdObjects &  | __getCreatedObjects () | 
|   | 
| 
static void  | __startTracingLeaks () | 
|   | 
| 
static void  | __stopTracingLeaks () | 
|   | 
 | 
| 
void  | updateName (const std::string &filename) | 
|   | 
| 
void  | _load (LoadResourcesContext *context) override | 
|   | 
| 
void  | _unload () override | 
|   | 
| 
void  | __doCheck () | 
|   | 
| 
void  | __generateID () | 
|   | 
| 
std::string *  | __getName () const | 
|   | 
| 
void  | __freeName () const | 
|   | 
 | 
| 
resources  | _resources | 
|   | 
| 
resourcesMap  | _resourcesMap | 
|   | 
| 
std::string  | _name | 
|   | 
| 
std::vector< pugi::xml_document * >  | _docs | 
|   | 
| 
Resource *  | _parent | 
|   | 
| 
int  | _loadCounter | 
|   | 
| 
bool  | _useLoadCounter | 
|   | 
| 
pugi::xml_node  | _node | 
|   | 
| 
std::string  | __name | 
|   | 
| 
int  | __id | 
|   | 
| 
const void *  | __userData | 
|   | 
 | 
| 
static registeredResources  | _registeredResources | 
|   | 
| 
static int  | _lastID | 
|   | 
| 
static int  | _assertCtorID | 
|   | 
| 
static int  | _assertDtorID | 
|   | 
 | 
| 
int  | _ref_counter | 
|   | 
| 
static void  | setNode (Resource *res, const pugi::xml_node &node) | 
|   | 
| 
static void  | __addToDebugList (ObjectBase *base) | 
|   | 
| 
static void  | __removeFromDebugList (ObjectBase *base) | 
|   | 
◆ add()
      
        
          | void oxygine::Resources::add  | 
          ( | 
          Resource *  | 
          r,  | 
        
        
           | 
           | 
          bool  | 
          accessByShortenID = false  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ collect()
      
        
          | void oxygine::Resources::collect  | 
          ( | 
          resources &  | 
           | ) | 
           | 
        
      
 
collects all resources into vector 
 
 
◆ free()
      
        
          | void oxygine::Resources::free  | 
          ( | 
           | ) | 
           | 
        
      
 
Completely deletes all loaded resources 
 
 
◆ get()
      
        
          | Resource* oxygine::Resources::get  | 
          ( | 
          const std::string &  | 
          id,  | 
        
        
           | 
           | 
          error_policy  | 
          ep = ep_show_error  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
get resource by id, no case sensitive 
- Parameters
 - 
  
  
 
 
 
◆ getResAnim()
      
        
          | ResAnim* oxygine::Resources::getResAnim  | 
          ( | 
          const std::string &  | 
          id,  | 
        
        
           | 
           | 
          error_policy  | 
          ep = ep_show_error  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
get resource by id 
- Parameters
 - 
  
  
 
 
 
◆ getResFont()
      
        
          | ResFont* oxygine::Resources::getResFont  | 
          ( | 
          const std::string &  | 
          id,  | 
        
        
           | 
           | 
          error_policy  | 
          ep = ep_show_error  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
get animation resource by id 
- Parameters
 - 
  
  
 
 
 
◆ isEmpty()
      
        
          | bool oxygine::Resources::isEmpty  | 
          ( | 
           | ) | 
           const | 
        
      
 
Does it have any loaded xmls 
 
 
◆ load()
      
        
          | void oxygine::Resources::load  | 
          ( | 
          ResLoadedCallback  | 
          cb = ResLoadedCallback() | ) | 
           | 
        
      
 
 
◆ loadXML()
Loads resources from xml file. Load could be called multiple times for different xml files. 
- Parameters
 - 
  
  
 
 
 
◆ operator[]()
  
  
      
        
          | Resource* oxygine::Resources::operator[]  | 
          ( | 
          const std::string &  | 
          id | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
returns resource by index 
 
 
◆ print()
      
        
          | void oxygine::Resources::print  | 
          ( | 
           | ) | 
           const | 
        
      
 
debug function. prints all loaded resources 
 
 
◆ registerResourceType()
  
  
      
        
          | static void oxygine::Resources::registerResourceType  | 
          ( | 
          createResourceCallback  | 
          creationCallback,  | 
         
        
           | 
           | 
          const char *  | 
          resTypeID  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Registers your own resource type. 
- Parameters
 - 
  
    | creation | callback  | 
    | resource | type string identifier. Max id length is 15 chars. These IDs are already occupied: 'set', 'atlas', ' image', 'font', 'buffer'  | 
  
   
 
 
◆ unload()
      
        
          | void oxygine::Resources::unload  | 
          ( | 
           | ) | 
           | 
        
      
 
Unloads data from memory, all resources handles remain valid 
 
 
The documentation for this class was generated from the following file: