33 #include "../api_core.h"
34 #include "../System/cl_platform.h"
43 class IODeviceProvider;
94 void throw_if_null()
const;
104 int get_position()
const;
108 bool is_little_endian()
const;
127 int send(
const void *data,
int len,
bool send_all =
true);
136 int receive(
void *data,
int len,
bool receive_all =
true);
143 int peek(
void *data,
int len);
150 bool seek(
int position, SeekMode mode = seek_set);
159 int read(
void *data,
int len,
bool receive_all =
true);
168 int write(
const void *data,
int len,
bool send_all =
true);
171 void set_system_mode();
174 void set_big_endian_mode();
177 void set_little_endian_mode();
182 void write_int64(
byte64 data);
187 void write_uint64(
ubyte64 data);
192 void write_int32(
byte32 data);
197 void write_uint32(
ubyte32 data);
202 void write_int16(
byte16 data);
207 void write_uint16(
ubyte16 data);
212 void write_int8(
byte8 data);
217 void write_uint8(
ubyte8 data);
224 void write_float(
float data);
232 void write_string_a(
const std::string &str);
239 void write_string_nul(
const std::string &str);
248 void write_string_text(
const std::string &str);
291 std::string read_string_a();
297 std::string read_string_nul();
308 std::string read_string_text(
const char *skip_initial_chars,
const char *read_until_chars,
bool allow_eof =
true);
318 std::shared_ptr<IODevice_Impl>
impl;
bool is_null() const
Returns true if this object is invalid.
Definition: iodevice.h:91
I/O Device interface.
Definition: iodevice.h:51
char byte8
Definition: cl_platform.h:59
Set to a specific value from the start.
Definition: iodevice.h:61
Set relative to the current position.
Definition: iodevice.h:64
unsigned long long ubyte64
Definition: cl_platform.h:66
I/O device provider interface.
Definition: iodevice_provider.h:41
unsigned short ubyte16
Definition: cl_platform.h:62
int byte32
Definition: cl_platform.h:63
long long byte64
Definition: cl_platform.h:65
SeekMode
Seeking modes.
Definition: iodevice.h:58
std::shared_ptr< IODevice_Impl > impl
Definition: iodevice.h:318
unsigned char ubyte8
Definition: cl_platform.h:60
unsigned int ubyte32
Definition: cl_platform.h:64
short byte16
Definition: cl_platform.h:61