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

outputsource.h

Go to the documentation of this file.
00001 /*
00002         $Id: outputsource.h,v 1.4 2001/03/04 17:54:47 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00016 
00017 #ifndef header_outputsource
00018 #define header_outputsource
00019 
00020 class CL_OutputSource
00021 //: Interface to write data to different types of output sources.
00022 // CL_OutputSource is used to write data to different types of input sources.
00023 // In most cases, this is regular files and ClanLib zlib compressed datafiles.
00024 // <br>
00025 // To access some system specific output source types, such as datafiles and
00026 // regular ones, use the static create functions in the CL_OutputSourceProvider
00027 // class.
00029 {
00030 public:
00031         virtual ~CL_OutputSource() { return; }
00032 
00033         virtual void set_system_mode()=0;
00034         //: Changes output data endianess to the local systems mode.
00035 
00036         virtual void set_big_endian_mode()=0;
00037         //: Changes output data endianess to big endian mode.
00038 
00039         virtual void set_little_endian_mode()=0;
00040         //: Changes output data endianess to little endian mode. This is the 
00041         //: default setting.
00042 
00043         virtual void write_int32(int data)=0;
00044         //: Writes a signed 32 bit integer to output source.
00045 
00046         virtual void write_uint32(unsigned int data)=0;
00047         //: Writes a unsigned 32 bit integer to output source.
00048 
00049         virtual void write_short16(short data)=0;
00050         //: Writes a signed 16 bit integer (short) to output source.
00051 
00052         virtual void write_ushort16(unsigned short data)=0;
00053         //: Writes a unsigned 16 bit integer (short) to output source.
00054 
00055         virtual void write_char8(char data)=0;
00056         //: Writes a signed 8 bit integer (char) to output source.
00057 
00058         virtual void write_uchar8(unsigned char data)=0;
00059         //: Writes a unsigned 8 bit integer (char) to output source.
00060 
00061         virtual void write_float32(float data)=0;
00062         //: Writes a ieee format floating point to output source.
00063 
00064         virtual int write(const void *data, int size)=0;
00065         //: Writes larger amounts of data (no endian and 64 bit conversion):
00066         //: <br>
00070         
00071         virtual void open()=0;
00072         //: Opens the output source. By default, it is open.
00073         
00074         virtual void close()=0;
00075         //: Closes the output source.
00076 
00077         virtual CL_OutputSource *clone()=0;
00078         //: Make a copy of the current OutputSource, standing at the same position.
00080 
00081         virtual int tell()=0;
00082         //: Returns current position in output source.
00084 
00085         virtual int size()=0;
00086         //: Returns the size of the output source
00088 
00089         virtual void write_string(const char *string)=0;
00090         //: Writes a string to the output source.
00091 };
00092 
00093 #endif

Generated at Wed Apr 4 19:54:02 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001