These macros define the read and write functions for all primitive types.
◆ DECLARE_ENDIAN_OVERLOADED_READ
| #define DECLARE_ENDIAN_OVERLOADED_READ |
( |
|
type | ) |
|
Value: bool read(type* out_read) { \
type temp; \
bool success = read(sizeof(type), &temp); \
*out_read = convertLEndianToHost(temp); \
return success; \
}
◆ DECLARE_ENDIAN_OVERLOADED_WRITE
| #define DECLARE_ENDIAN_OVERLOADED_WRITE |
( |
|
type | ) |
|
Value: bool write(type in_write) { \
type temp = convertHostToLEndian(in_write); \
return write(sizeof(type), &temp); \
}
◆ DECLARE_OVERLOADED_READ
| #define DECLARE_OVERLOADED_READ |
( |
|
type | ) |
|
Value: bool read(type* out_read) { \
return read(sizeof(type), out_read); \
}
◆ DECLARE_OVERLOADED_WRITE
| #define DECLARE_OVERLOADED_WRITE |
( |
|
type | ) |
|
Value: bool write(type in_write) { \
return write(sizeof(type), &in_write); \
}