Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: tnlBitStream.h File Reference

# tnlBitStream.h File Reference

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

## Namespaces

namespace | TNL

## Data Structures

struct | TNL::Point3F
| Point3F is used by BitStream for transmitting 3D points and vectors. More...
class | TNL::BitStream
| BitStream provides a bit-level stream interface to a data buffer. More...
class | TNL::PacketStream
| PacketStream provides a network interface to the BitStream for easy construction of data packets. More...

## Defines

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

## Define Documentation

#define DeclareTemplatizedReadWrite | ( | T |  | ) |

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!