ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index

Class CL_InputSourceProvider

Class that provides input sources.
Contained in: global
Derived from: none
Derived by: CL_InputSourceProvider_File
Group: Core (I/O Data)

#include <ClanLib/core.h>


public function member index:

Construction:

virtual ~CL_InputSourceProvider();
static CL_InputSourceProvider* create_file_provider(const std::string& path);
static CL_InputSourceProvider* create_datafile_provider(const std::string& filename);

Overrideables:

virtual CL_InputSource* open_source(const std::string& handle);
virtual CL_InputSourceProvider* clone();
virtual std::string get_path(const std::string& filename);
 

Description:

CL_InputSourceProvider is used to open inputsources. This can be from a datafile where the inputsource is an index - or it a directory where the files are the inputsources.


Function Member Descriptions:

CL_InputSourceProvider::clone - Returns a copy of the current provider.
virtual CL_InputSourceProvider* clone();
Returns - The copy of the inputsource provider.



CL_InputSourceProvider::create_datafile_provider - Creates a datafile provider.
Input sources are opened as indexes in the specified datafile.
static CL_InputSourceProvider* create_datafile_provider(const std::string& filename);
filename - Name of the datafile to be used.
Returns - The datafile input provider created.



CL_InputSourceProvider::create_file_provider - Creates a file provider.
Input sources opened are considered as files.
static CL_InputSourceProvider* create_file_provider(const std::string& path);
path - Path where the files are located.
Returns - The file input provider created.



CL_InputSourceProvider::get_path - Get full path to source:
virtual std::string get_path(const std::string& filename);


CL_InputSourceProvider::open_source - Opens an inputsource using the passed handle.
virtual CL_InputSource* open_source(const std::string& handle);
handle - handle/index/filename/identier to the input source requested.
Returns - The opened input source.



CL_InputSourceProvider::~CL_InputSourceProvider - Input Source Provider destructor
virtual ~CL_InputSourceProvider();