Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_ResourceType

The Resource Type Class
Contained in: global
Derived from: none
Derived by: none
Group: Core (Resources)

#include <ClanLib/core.h>

### public function member index:

### Construction:

`` | `CL_ResourceType` | `(`const` `std::string`& `type`)`;
``virtual`` | `~CL_ResourceType` | `()`;

### Attributes:

``const` `std::string`&` | `get_type` | `() `const``;

### Operations:

``virtual` `void`` | `connect_data` | `(`CL_Resource`& `resource`)`;

## Description:

## Function Member Descriptions:

CL_ResourceType::CL_ResourceType - Constructs an registers a resource type.
`` `CL_ResourceType` `(`const` `std::string`& `type`)`;

CL_ResourceType::connect_data - Connect Data
The resource manager calls this function just after a resource object has been created. The resource type should attach its resource data to the resource in this function.
``virtual` `void`` `connect_data` `(`CL_Resource`& `resource`)`;

CL_ResourceType::get_type - Returns the resource type name.
``const` `std::string`&` `get_type` `() `const``;

CL_ResourceType::~CL_ResourceType - Destructs and unregisters a resource type.
``virtual`` `~CL_ResourceType` `()`;

## Variable Member Descriptions:

CL_ResourceType::resource_types - Global static list of all registered resource types.
``static` `std::list`<`CL_ResourceType`*>` ``resource_types`;`