Singleton of general resource file manager. More...
#include <GUIGeneralResourceManager.h>
Public Member Functions | |
void | AddObserver (const GeneralResource_t &eResourceID, CGUIGeneralResourceObserver *pkObserver) |
void | ApplyInterpreter (GeneralResource_t eResourceID, CGUIGeneralResourceInterpreter &rkInterpreter) |
eC_UInt | GetNOFResources () const |
void | RemoveObserver (const GeneralResource_t &eResourceID, CGUIGeneralResourceObserver *pkObserver) |
Static Public Member Functions | |
static void | CreateInstance () |
Create the class. | |
static void | DeleteInstance () |
Deletes the class and clears the internal pointer. | |
Friends | |
class | CGUIComponentManager |
class | CGUIResourceManager |
Singleton of general resource file manager.
All abstract resources that are not handled by specific resource managers and needs to be tracked by GUI projects.
Before parsing specific resources, it is necesary to request the resource ID via GETRESMANAGER.RequestGeneralResource() to force this object to load the resource data. ApplyInterpreter can then be used to apply a specific resource parser to loaded data. Afterwards, GETRESMANAGER.FreeGeneralResource() destroys the resource's data buffer and should be invoked, too.
void CGUIGeneralResourceManager::AddObserver | ( | const GeneralResource_t & | eResourceID, |
CGUIGeneralResourceObserver * | pkObserver | ||
) |
add observer for id
eResourceID | |
pkObserver |
void CGUIGeneralResourceManager::ApplyInterpreter | ( | GeneralResource_t | eResourceID, |
CGUIGeneralResourceInterpreter & | rkInterpreter | ||
) |
Use given resource interpreter to apply data associated to resource ID. Data needs to be loaded before calling this method, use GETRESMANAGER.RequestGeneralResource() to do this. Do not forget to release the resource, if you don't need it anymore.
eResourceID | Requested resource ID contains data to be interpreted. |
rkInterpreter | Interpreter used to parse data of given resource ID. |
CGUIException | In case of uninitialized data, resource ID out of range or the interpreter throws an error. |
eC_UInt CGUIGeneralResourceManager::GetNOFResources | ( | ) | const |
Get number of known general resources.
void CGUIGeneralResourceManager::RemoveObserver | ( | const GeneralResource_t & | eResourceID, |
CGUIGeneralResourceObserver * | pkObserver | ||
) |
remove observer for id
eResourceID | |
pkObserver |
|
friend |
|
friend |