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

Class CL_InputSource_File

Inputsource reading from file.
Contained in: global
Derived from: CL_InputSource
Derived by: none
Group: Core (I/O Data)

#include <ClanLib/core.h>


public function member index:

Construction:

CL_InputSource_File(const std::string& filename);
CL_InputSource_File(const CL_InputSource_File* source);
virtual ~CL_InputSource_File();

Attributes:

virtual int tell() const;
virtual int size() const;

Operations:

virtual int read(void* data, int size);
virtual void open();
virtual void close();
virtual CL_InputSource* clone() const;
virtual void seek(int pos, SeekEnum seek_type);
virtual void push_position();
virtual void pop_position();
 

Description:


Function Member Descriptions:

CL_InputSource_File::CL_InputSource_File - Input Souce File Constructor
CL_InputSource_File(const std::string& filename);


CL_InputSource_File::CL_InputSource_File - Input Souce File Constructor
CL_InputSource_File(const CL_InputSource_File* source);


CL_InputSource_File::clone - Make a copy of the current inputsource, standing at the same position.
virtual CL_InputSource* clone() const;
Returns - The copy of the input source.



CL_InputSource_File::close - Closes the input source.
virtual void close();


CL_InputSource_File::open - Opens the input source. By default, it is open.
virtual void open();


CL_InputSource_File::pop_position - Pops a previous pushed input source position (returns to the position).
virtual void pop_position();


CL_InputSource_File::push_position - Pushes the current input source position.
virtual void push_position();
The position can be restored again with pop_position.



CL_InputSource_File::read - Reads larger amounts of data (no endian and 64 bit conversion):
virtual int read(void* data, int size);
data - Points to an array where the read data is stored.
size - Number of bytes to read.
Returns - Num bytes actually read.



CL_InputSource_File::seek - Seeks to the specified position in the input source.
virtual void seek(int pos, SeekEnum seek_type);
pos - Position relative to 'seek_type'.
seek_type - Defines what the 'pos' is relative to. Can be either seek_set, seek_cur og seek_end.



CL_InputSource_File::size - Returns the size of the input source
virtual int size() const;
Returns - Size of the input source.



CL_InputSource_File::tell - Returns current position in input source.
virtual int tell() const;
Returns - Current position in input source.



CL_InputSource_File::~CL_InputSource_File - Input Souce File Destructor
virtual ~CL_InputSource_File();



Variable Member Descriptions: