News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

tnlBitStream.h File Reference

tnlBitStream.h File Reference

#include "tnlByteBuffer.h"
#include "tnlConnectionStringTable.h"

Namespaces

namespace  TNL

Defines

#define DeclareTemplatizedReadWrite(T)
 Helper macro used in BitStream declaration.


Define Documentation

#define DeclareTemplatizedReadWrite  ) 
 

Value:

inline bool write(T value) { T temp = convertHostToLEndian(value); return write(sizeof(T), &temp); } \
inline bool read(T *value) { T temp; bool success = read(sizeof(T), &temp); *value = convertLEndianToHost(temp); return success;}
Helper macro used in BitStream declaration.

Note:
DeclareTemplatizedReadWrite macro declares a read and write function for the specified type. This is a macro because MSVC6 has seriously broken template functionality. Thanks MS!