torque Torque Game Engine Documentation
TGE Version 1.5.2

Primitive Type Stream Operation Overloads


Detailed Description

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


Defines

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


Define Documentation

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

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




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen