Reference

CL_OutputSource(3)

Interface to write data to different types of output sources.

NAME

CL_OutputSource - Interface to write data to different types of output sources.

DESCRIPTION

CL_OutputSource is used to write data to different types of input sources. In most cases, this is regular files and ClanLib zlib compressed datafiles.

To access some system specific output source types, such as datafiles and regular ones, use the static create functions in the CL_OutputSourceProvider class.

CLASS MEMBERS

virtual ~CL_OutputSource()
virtual void set_system_mode()
virtual void set_big_endian_mode()
virtual void set_little_endian_mode()
virtual void write_int32(
int data)

virtual void write_uint32(
unsigned int data)

virtual void write_short16(
short data)

virtual void write_ushort16(
unsigned short data)

virtual void write_char8(
char data)

virtual void write_uchar8(
unsigned char data)

virtual void write_float32(
float data)

virtual int write(
const void *data,
int size)

virtual void open()
virtual void close()
virtual CL_OutputSource *clone()
virtual int tell()
virtual int size()
virtual void write_string(
const char *string)

MEMBERS WITH DESCRIPTIONS

virtual ~CL_OutputSource()
Description:

virtual void set_system_mode()
Description:

Changes output data endianess to the local systems mode.

virtual void set_big_endian_mode()
Description:

Changes output data endianess to big endian mode.

virtual void set_little_endian_mode()
Description:

Changes output data endianess to little endian mode. This is the default setting.

virtual void write_int32(
int data)

Description:

Writes a signed 32 bit integer to output source.

virtual void write_uint32(
unsigned int data)

Description:

Writes a unsigned 32 bit integer to output source.

virtual void write_short16(
short data)

Description:

Writes a signed 16 bit integer (short) to output source.

virtual void write_ushort16(
unsigned short data)

Description:

Writes a unsigned 16 bit integer (short) to output source.

virtual void write_char8(
char data)

Description:

Writes a signed 8 bit integer (char) to output source.

virtual void write_uchar8(
unsigned char data)

Description:

Writes a unsigned 8 bit integer (char) to output source.

virtual void write_float32(
float data)

Description:

Writes a ieee format floating point to output source.

virtual int write(
const void *data,
int size)

Parameters:
data - Points to the array written.
size - Number of bytes to write.

Description:

Writes larger amounts of data (no endian and 64 bit conversion):

Return value:

Num bytes actually written.

virtual void open()
Description:

Opens the output source. By default, it is open.

virtual void close()
Description:

Closes the output source.

virtual CL_OutputSource *clone()
Description:

Make a copy of the current OutputSource, standing at the same position.

Return value:

The copy of the output source.

virtual int tell()
Description:

Returns current position in output source.

Return value:

Current position in source.

virtual int size()
Description:

Returns the size of the output source

Return value:

Current size of output source.

virtual void write_string(
const char *string)

Description:

Writes a string to the output source.

SEE ALSO

CL_OutputSourceProvider

Interface to open output sources with.

All ClanLib API classes can be found in clanlib (3).

AUTHORS

Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).

See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.