Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_InputSource Class Reference

also: CL_InputSourceProvider - Interface to open input sources with. More...

#include <inputsource.h>

Inheritance diagram for CL_InputSource:

Inheritance graph
[legend]
List of all members.

Public Types

enum  SeekEnum { seek_set, seek_cur, seek_end }
 retval: The clone of the input source. More...


Public Methods

virtual ~CL_InputSource ()
virtual void set_system_mode ()=0
virtual void set_big_endian_mode ()=0
virtual void set_little_endian_mode ()=0
virtual int read_int32 ()=0
virtual unsigned int read_uint32 ()=0
 retval: The integer read.

virtual short read_short16 ()=0
 retval: The unsigned integer read.

virtual unsigned short read_ushort16 ()=0
 retval: The short read.

virtual char read_char8 ()=0
 retval: The unsigned short read.

virtual unsigned char read_uchar8 ()=0
 retval: The char read.

virtual float read_float32 ()=0
 retval: The unsigned char read.

virtual int read (void *data, int size)=0
 retval: The float read.

virtual void open ()=0
 param: data - Points to an array where the read data is stored.param: size - Number of bytes to read.retval: Num bytes actually read.

virtual void close ()=0
virtual CL_InputSource* clone () const=0
virtual int tell () const=0
virtual void seek (int pos, SeekEnum seek_type)=0
 retval: Current position in input source.

virtual int size () const=0
 param: pos - Position relative to 'seek_type'.param: seek_type - Defines what the 'pos' is relative to. Can be either seek_set, seek_cur og seek_end.

virtual std::string read_string ()=0
 retval: Size of the input source.

virtual void push_position ()=0
 retval: The string read.

virtual void pop_position ()=0

Protected Attributes

bool little_endian_mode

Detailed Description

also: CL_InputSourceProvider - Interface to open input sources with.

Definition at line 22 of file inputsource.h.


Member Enumeration Documentation

enum CL_InputSource::SeekEnum
 

retval: The clone of the input source.

Enumeration values:
seek_set  
seek_cur  
seek_end  

Definition at line 89 of file inputsource.h.


Constructor & Destructor Documentation

CL_InputSource::~CL_InputSource ( ) [inline, virtual]
 

Definition at line 33 of file inputsource.h.


Member Function Documentation

virtual CL_InputSource* CL_InputSource::clone ( ) const [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual void CL_InputSource::close ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

void CL_InputSource::open ( ) [pure virtual]
 

param: data - Points to an array where the read data is stored.param: size - Number of bytes to read.retval: Num bytes actually read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual void CL_InputSource::pop_position ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

void CL_InputSource::push_position ( ) [pure virtual]
 

retval: The string read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

int CL_InputSource::read ( void * data,
int size ) [pure virtual]
 

retval: The float read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

Referenced by CL_PNGProvider::pngread_file().

char CL_InputSource::read_char8 ( ) [pure virtual]
 

retval: The unsigned short read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

float CL_InputSource::read_float32 ( ) [pure virtual]
 

retval: The unsigned char read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual int CL_InputSource::read_int32 ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

Referenced by CL_IntegerResource::CL_IntegerResource(), and CL_GameObject::recv_full().

short CL_InputSource::read_short16 ( ) [pure virtual]
 

retval: The unsigned integer read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

std::string CL_InputSource::read_string ( ) [pure virtual]
 

retval: Size of the input source.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

Referenced by CL_StringResource::CL_StringResource().

unsigned char CL_InputSource::read_uchar8 ( ) [pure virtual]
 

retval: The char read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

Referenced by CL_BooleanResource::CL_BooleanResource().

unsigned int CL_InputSource::read_uint32 ( ) [pure virtual]
 

retval: The integer read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

unsigned short CL_InputSource::read_ushort16 ( ) [pure virtual]
 

retval: The short read.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

void CL_InputSource::seek ( int pos,
SeekEnum seek_type ) [pure virtual]
 

retval: Current position in input source.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual void CL_InputSource::set_big_endian_mode ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual void CL_InputSource::set_little_endian_mode ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual void CL_InputSource::set_system_mode ( ) [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

int CL_InputSource::size ( ) const [pure virtual]
 

param: pos - Position relative to 'seek_type'.param: seek_type - Defines what the 'pos' is relative to. Can be either seek_set, seek_cur og seek_end.

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.

virtual int CL_InputSource::tell ( ) const [pure virtual]
 

Reimplemented in CL_InputSource_File, CL_InputSource_Memory, CL_InputSource_Datafile, and CL_InputSource_MemoryGeneric.


Member Data Documentation

bool CL_InputSource::little_endian_mode [protected]
 

Definition at line 123 of file inputsource.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:57:03 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001