Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Macros
Primitive Type Stream Operation Overloads

Macros

#define DECLARE_OVERLOADED_READ(type)
 
#define DECLARE_OVERLOADED_WRITE(type)
 
#define DECLARE_ENDIAN_OVERLOADED_READ(type)
 
#define DECLARE_ENDIAN_OVERLOADED_WRITE(type)
 

Detailed Description

These macros define the read and write functions for all primitive types.

Macro Definition Documentation

#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; \
}
#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); \
}