Home |All Classes |Grouped Classes |Index |Search

Class CL_IODevice

I/O Device interface. More...

Derived from:

None

Derived by:

CL_File, CL_HTTPServerConnection, CL_IODevice_Memory, CL_NetStream, CL_PipeConnection, CL_TCPConnection

Group:

IO Data (Core)

#include <ClanLib/core.h>

Class Members:

Enumerations:

SeekMode

Seeking modes.


Construction:

CL_IODevice

Constructs an I/O device.


Attributes:

get_size

Returns the size of data stream.

get_position

Returns the position in the data stream.

is_little_endian

Returns true if the input source is in little endian mode.


Operations:

send

Send data to device.

receive

Receive data from device.

peek

Peek data from device (data is left in the buffer).

seek

Seek in data stream.

read

Alias for receive(data, len, receive_all).

write

Alias for send(data, len, send_all).

set_system_mode

Changes input data endianess to the local systems mode.

set_big_endian_mode

Changes input data endianess to big endian mode. (Default is little endian).

set_little_endian_mode

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

write_int64

Writes a signed 64 bit integer to output source.

write_uint64

Writes an unsigned 64 bit integer to output source.

write_int32

Writes a signed 32 bit integer to output source.

write_uint32

Writes an unsigned 32 bit integer to output source.

write_int16

Writes a signed 16 bit integer to output source.

write_uint16

Writes an unsigned 16 bit integer to output source.

write_int8

Writes a signed 8 bit integer to output source.

write_uint8

Writes an unsigned 8 bit integer to output source.

write_float

Writes a float to output source.

write_string_a

Writes a string to the output source.

read_int64

Reads a signed 64 bit integer from input source.

read_uint64

Reads an unsigned 64 bit integer from input source.

read_int32

Reads a signed 32 bit integer from input source.

read_uint32

Reads an unsigned 32 bit integer from input source.

read_int16

Reads a signed 16 bit integer from input source.

read_uint16

Reads an unsigned 16 bit integer from input source.

read_int8

Reads a signed 8 bit integer from input source.

read_uint8

Reads an unsigned 8 bit integer from input source.

read_float

Reads a float from input source.

read_string_a

Reads a string from the input source.

read_string_nul

Reads a nul terminated string from the input source.

read_string_text

Reads a string from the input source where the source is a text file.

duplicate

Create a new CL_IODevice referencing the same resource.

Detailed description:

This class can store basic datatypes and retain portability (using the specified endian mode) The supported datatypes are: cl_int64, cl_int32, cl_int16 and cl_int8 The CL_String datatype is supported - Using Size(cl_int32), Charactor Data (CL_StringRef8 characters)