Crazy Eddie's GUI System  0.8.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGUI::ResourceProvider Class Referenceabstract

Abstract class that defines the required interface for all resource provider sub-classes. More...

Inherits CEGUI::AllocatedObject< ResourceProvider >.

Inherited by CEGUI::CompositeResourceProvider, CEGUI::DefaultResourceProvider, and CEGUI::OgreResourceProvider.

+ Collaboration diagram for CEGUI::ResourceProvider:

Public Member Functions

 ResourceProvider ()
 Constructor for the ResourceProvider class.
 
virtual ~ResourceProvider (void)
 Destructor for the ResourceProvider class.
 
virtual void loadRawDataContainer (const String &filename, RawDataContainer &output, const String &resourceGroup)=0
 Load XML data using InputSource objects. More...
 
virtual void unloadRawDataContainer (RawDataContainer &)
 Unload raw binary data. This gives the resource provider a change to unload the data in its own way before the data container object is destroyed. If it does nothing, then the object will release its memory. More...
 
const StringgetDefaultResourceGroup (void) const
 Return the current default resource group identifier. More...
 
void setDefaultResourceGroup (const String &resourceGroup)
 Set the default resource group identifier. More...
 
virtual size_t getResourceGroupFileNames (std::vector< String > &out_vec, const String &file_pattern, const String &resource_group)=0
 

Protected Attributes

String d_defaultResourceGroup
 Default resource group identifier.
 

Detailed Description

Abstract class that defines the required interface for all resource provider sub-classes.

A ResourceProvider is used to load both XML and binary data from an external source. This could be from a filesystem or the resource manager of a specific renderer.

Member Function Documentation

const String& CEGUI::ResourceProvider::getDefaultResourceGroup ( void  ) const
inline

Return the current default resource group identifier.

Returns
String object containing the currently set default resource group identifier.
virtual size_t CEGUI::ResourceProvider::getResourceGroupFileNames ( std::vector< String > &  out_vec,
const String file_pattern,
const String resource_group 
)
pure virtual
enumerate the files in \a resource_group that match \a file_pattern and

append thier names to out_vec

Implemented in CEGUI::CompositeResourceProvider, CEGUI::DefaultResourceProvider, CEGUI::MinizipResourceProvider, and CEGUI::OgreResourceProvider.

virtual void CEGUI::ResourceProvider::loadRawDataContainer ( const String filename,
RawDataContainer output,
const String resourceGroup 
)
pure virtual

Load XML data using InputSource objects.

Parameters
filenameString containing a filename of the resource to be loaded.
outputReference to a InputSourceContainer object to load the data into.
Load raw binary data.
Parameters
filenameString containing a filename of the resource to be loaded.
outputReference to a RawDataContainer object to load the data into.
resourceGroupOptional String that may be used by implementations to identify the group from which the resource should be loaded.

Implemented in CEGUI::CompositeResourceProvider, CEGUI::DefaultResourceProvider, CEGUI::MinizipResourceProvider, CEGUI::IrrlichtResourceProvider, and CEGUI::OgreResourceProvider.

void CEGUI::ResourceProvider::setDefaultResourceGroup ( const String resourceGroup)
inline

Set the default resource group identifier.

Parameters
resourceGroupString object containing the default resource group identifier to be used.
Returns
Nothing.
virtual void CEGUI::ResourceProvider::unloadRawDataContainer ( RawDataContainer )
inlinevirtual

Unload raw binary data. This gives the resource provider a change to unload the data in its own way before the data container object is destroyed. If it does nothing, then the object will release its memory.

Parameters
dataReference to a RawDataContainer object that is about to be destroyed.

Reimplemented in CEGUI::DefaultResourceProvider, CEGUI::IrrlichtResourceProvider, and CEGUI::OgreResourceProvider.