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