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

CL_ResourceManager_File Class Reference

#include <resource_manager_file.h>

Inheritance diagram for CL_ResourceManager_File:

Inheritance graph
[legend]
Collaboration diagram for CL_ResourceManager_File:

Collaboration graph
[legend]
List of all members.

Public Methods

 CL_ResourceManager_File (const char *config_file, CL_InputSourceProvider *provider=NULL, bool read_directly_from_source=false, bool delete_inputsource_provider=false)
 CL_ResourceManager_File (const char *file_name, const bool is_datafile)
virtual ~CL_ResourceManager_File ()
virtual void load_all_resources ()
virtual void unload_all_resources ()
virtual void load_section (const char *section_name)
virtual void unload_section (const char *section_name)
 param: section_name - the section to be loaded.

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

virtual std::list<std::string>* get_all_resources ()
 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)
 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 ()
 retval: The list of resources available. You'll have to delete all strings in the retval: list manually (including the list-instance itself).


Private Methods

void parse ()
void parse_include (CL_ResourceTokenizer &lexer)
void parse_section_body (std::string token, CL_ResourceTokenizer &lexer, std::string prefix)
CL_Resourcecreate_resource (std::string name, std::string location, CL_ResourceOptions &options)

Private Attributes

CL_InputSourceProviderresource_provider
std::list<CL_Resource*> resources
std::string filename
bool from_source
bool delete_resource_provider

Constructor & Destructor Documentation

CL_ResourceManager_File::CL_ResourceManager_File ( const char * config_file,
CL_InputSourceProvider * provider = NULL,
bool read_directly_from_source = false,
bool delete_inputsource_provider = false )
 

CL_ResourceManager_File::CL_ResourceManager_File ( const char * file_name,
const bool is_datafile )
 

virtual CL_ResourceManager_File::~CL_ResourceManager_File ( ) [virtual]
 


Member Function Documentation

CL_Resource* CL_ResourceManager_File::create_resource ( std::string name,
std::string location,
CL_ResourceOptions & options ) [private]
 

virtual std::list<std::string>* CL_ResourceManager_File::get_all_resources ( ) [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 from CL_ResourceManager.

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

param: section_name - the section to be unloaded.

Reimplemented from CL_ResourceManager.

virtual CL_InputSourceProvider* CL_ResourceManager_File::get_resource_provider ( ) [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 from CL_ResourceManager.

virtual std::list<std::string>* CL_ResourceManager_File::get_resources_of_type ( std::string type_id ) [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 from CL_ResourceManager.

virtual void CL_ResourceManager_File::load_all_resources ( ) [virtual]
 

Reimplemented from CL_ResourceManager.

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

Reimplemented from CL_ResourceManager.

void CL_ResourceManager_File::parse ( ) [private]
 

void CL_ResourceManager_File::parse_include ( CL_ResourceTokenizer & lexer ) [private]
 

void CL_ResourceManager_File::parse_section_body ( std::string token,
CL_ResourceTokenizer & lexer,
std::string prefix ) [private]
 

virtual void CL_ResourceManager_File::unload_all_resources ( ) [virtual]
 

Reimplemented from CL_ResourceManager.

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

param: section_name - the section to be loaded.

Reimplemented from CL_ResourceManager.


Member Data Documentation

bool CL_ResourceManager_File::delete_resource_provider [private]
 

Definition at line 71 of file resource_manager_file.h.

std::string CL_ResourceManager_File::filename [private]
 

Definition at line 69 of file resource_manager_file.h.

bool CL_ResourceManager_File::from_source [private]
 

Definition at line 70 of file resource_manager_file.h.

CL_InputSourceProvider* CL_ResourceManager_File::resource_provider [private]
 

Definition at line 65 of file resource_manager_file.h.

std::list<CL_Resource*> CL_ResourceManager_File::resources [private]
 

Definition at line 67 of file resource_manager_file.h.


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