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

# Class CL_ResourceSource_Surface

Plugin interface for surface resources.
Contained in: global
Derived from: none
Derived by: none
Group: Display (Display 2D)

#include <ClanLib/display.h>

### public function member index:

### Construction:

`` | `CL_ResourceSource_Surface` | `()`;
``virtual`` | `~CL_ResourceSource_Surface` | `()`;
``virtual` `CL_SurfaceProvider`*` | `create` | `(`const` `std::string`& `filename`)`;

### Attributes:

``virtual` `const` `char`*` | `get_name` | `()`;
``virtual` `bool`` | `can_create` | `(`std::string` `file_extension`, `CL_ResourceOptions`& `options`)`;
``virtual` `CL_SurfaceProvider`*` | `create` | `(`CL_Resource`& `resource`, `CL_ResourceOptions`& `options`, `CL_ResourceManager`& `parent`)`;

## Description:

CL_ResourceSource_Surface is a plugin interface for the surface resource type.
Applications and libraries can inherit this class to add their own customized surface sources. Just as any other plugin in ClanLib, the application or library has to keep one global instance of each plugin - otherwise the resource manager will not be able to use the new resource source.

## Function Member Descriptions:

CL_ResourceSource_Surface::CL_ResourceSource_Surface - Resource Source Surface Constructor
`` `CL_ResourceSource_Surface` `()`;

CL_ResourceSource_Surface::can_create - Can Create
``virtual` `bool`` `can_create` `(`std::string` `file_extension`, `CL_ResourceOptions`& `options`)`;

CL_ResourceSource_Surface::create - Create
``virtual` `CL_SurfaceProvider`*` `create` `(`const` `std::string`& `filename`)`;

CL_ResourceSource_Surface::create - Create
``virtual` `CL_SurfaceProvider`*` `create` `(`CL_Resource`& `resource`, `CL_ResourceOptions`& `options`, `CL_ResourceManager`& `parent`)`;

CL_ResourceSource_Surface::get_name - Get Name
``virtual` `const` `char`*` `get_name` `()`;

CL_ResourceSource_Surface::~CL_ResourceSource_Surface - Resource Source Surface Destructor
``virtual`` `~CL_ResourceSource_Surface` `()`;

## Variable Member Descriptions:

CL_ResourceSource_Surface::surface_sources - Global list of surface types available (pcx, targa, png, etc etc).
``static` `std::list`<`CL_ResourceSource_Surface`*>` ``surface_sources`;`