ClanLib  2.3.7
List of all members
CL_Resource Class Reference

Resource Manager resource. More...

#include <resource.h>

Public Member Functions

Construction
 CL_Resource ()
 
 ~CL_Resource ()
 
Attributes
CL_String get_type () const
 Returns the resource type. More...
 
CL_String get_name () const
 Returns the name of the resource. More...
 
CL_DomElementget_element ()
 Returns the DOM element describing the resource. More...
 
CL_ResourceManager get_manager ()
 Returns the resource manager owning the resource. More...
 
CL_SharedPtr< CL_ResourceDataget_data (const CL_String &data_name)
 Returns the object stored in the given data name. More...
 
int get_data_session_count (const CL_String &data_name)
 Returns the number of CL_ResourceDataSession objects using this resource. More...
 
Operations
bool operator== (const CL_Resource &other) const
 Compares this resource to another resource. More...
 
void set_data (const CL_String &data_name, const CL_SharedPtr< CL_ResourceData > &ptr)
 Store object in resource. More...
 
void clear_data (const CL_String &data_name)
 Remove object stored with the given data name. More...
 
int add_data_session (const CL_String &data_name)
 Increment the usage session count for the resource. More...
 
int remove_data_session (const CL_String &data_name)
 Decrement the usage session count for the resource. More...
 

Implementation

class CL_ResourceManager
 

Detailed Description

Resource Manager resource.

Constructor & Destructor Documentation

CL_Resource::CL_Resource ( )
CL_Resource::~CL_Resource ( )

Member Function Documentation

int CL_Resource::add_data_session ( const CL_String data_name)

Increment the usage session count for the resource.

void CL_Resource::clear_data ( const CL_String data_name)

Remove object stored with the given data name.

CL_SharedPtr<CL_ResourceData> CL_Resource::get_data ( const CL_String data_name)

Returns the object stored in the given data name.

int CL_Resource::get_data_session_count ( const CL_String data_name)

Returns the number of CL_ResourceDataSession objects using this resource.

CL_DomElement& CL_Resource::get_element ( )

Returns the DOM element describing the resource.

CL_ResourceManager CL_Resource::get_manager ( )

Returns the resource manager owning the resource.

CL_String CL_Resource::get_name ( ) const

Returns the name of the resource.

CL_String CL_Resource::get_type ( ) const

Returns the resource type.

bool CL_Resource::operator== ( const CL_Resource other) const

Compares this resource to another resource.

int CL_Resource::remove_data_session ( const CL_String data_name)

Decrement the usage session count for the resource.

void CL_Resource::set_data ( const CL_String data_name,
const CL_SharedPtr< CL_ResourceData > &  ptr 
)

Store object in resource.

Friends And Related Function Documentation

friend class CL_ResourceManager
friend

The documentation for this class was generated from the following file: