Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_ResourceManager Class Reference

#include <resource_manager.h>

Inheritance diagram for CL_ResourceManager:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~CL_ResourceManager ()
 param: file_name - the name of the file to openparam: is_datafile - indicates if the file is a scriptfile or a datafile.

virtual void load_all_resources ()=0
virtual void unload_all_resources ()=0
virtual void load_section (const char *section_name)=0
virtual void unload_section (const char *section_name)=0
 param: section_name - the section to be loaded.

virtual CL_Resourceget_resource (std::string res_id)=0
 param: section_name - the section to be unloaded.

virtual std::list<std::string>* get_all_resources ()=0
 param: Name of the resource in the configuration file - note: the name of resources are absolute, eg. including section names with slashes (Graphics/Pacman/sur_pacman).

virtual std::list<std::string>* get_resources_of_type (std::string type_id)=0
 retval: The list of resources available. You'll have to delete all strings in the returnedretval: list manually (including the list-instance itself).

virtual CL_InputSourceProviderget_resource_provider ()=0
 retval: The list of resources available. You'll have to delete all strings in the retval: list manually (including the list-instance itself).


Static Public Methods

CL_ResourceManager* create (const char *config_file, CL_InputSourceProvider *provider=NULL, bool read_directly_from_source=false, bool delete_inputsource_provider=false)
CL_ResourceManager* create (const char *file_name, const bool is_datafile)
 param: config_file - the name of the file in which the resources are definedparam: provider - the optional inputprovider in which, the resource file is storedparam: read_directly_from_source - if true, any resources are loaded directly from their source, meaning that any datafile-directive is ignored.


Constructor & Destructor Documentation

CL_ResourceManager::~CL_ResourceManager ( ) [inline, virtual]
 

param: file_name - the name of the file to openparam: is_datafile - indicates if the file is a scriptfile or a datafile.

Definition at line 74 of file resource_manager.h.


Member Function Documentation

CL_ResourceManager* CL_ResourceManager::create ( const char * file_name,
const bool is_datafile ) [static]
 

param: config_file - the name of the file in which the resources are definedparam: provider - the optional inputprovider in which, the resource file is storedparam: read_directly_from_source - if true, any resources are loaded directly from their source, meaning that any datafile-directive is ignored.

CL_ResourceManager* CL_ResourceManager::create ( const char * config_file,
CL_InputSourceProvider * provider = NULL,
bool read_directly_from_source = false,
bool delete_inputsource_provider = false ) [static]
 

std::list< std::string > * CL_ResourceManager::get_all_resources ( ) [pure virtual]
 

param: Name of the resource in the configuration file - note: the name of resources are absolute, eg. including section names with slashes (Graphics/Pacman/sur_pacman).

Reimplemented in CL_ResourceManager_File.

CL_Resource * CL_ResourceManager::get_resource ( std::string res_id ) [pure virtual]
 

param: section_name - the section to be unloaded.

Reimplemented in CL_ResourceManager_File.

CL_InputSourceProvider * CL_ResourceManager::get_resource_provider ( ) [pure virtual]
 

retval: The list of resources available. You'll have to delete all strings in the retval: list manually (including the list-instance itself).

Reimplemented in CL_ResourceManager_File.

Referenced by CL_Targa_ResourceSource::create(), CL_BMP_ResourceSource::create(), and CL_PCX_ResourceSource::create().

std::list< std::string > * CL_ResourceManager::get_resources_of_type ( std::string type_id ) [pure virtual]
 

retval: The list of resources available. You'll have to delete all strings in the returnedretval: list manually (including the list-instance itself).

Reimplemented in CL_ResourceManager_File.

virtual void CL_ResourceManager::load_all_resources ( ) [pure virtual]
 

Reimplemented in CL_ResourceManager_File.

virtual void CL_ResourceManager::load_section ( const char * section_name ) [pure virtual]
 

Reimplemented in CL_ResourceManager_File.

virtual void CL_ResourceManager::unload_all_resources ( ) [pure virtual]
 

Reimplemented in CL_ResourceManager_File.

void CL_ResourceManager::unload_section ( const char * section_name ) [pure virtual]
 

param: section_name - the section to be loaded.

Reimplemented in CL_ResourceManager_File.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:57:21 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001