SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
DataStructures::ByteQueue Class Reference

`#include <slikenet/DS_ByteQueue.h>`

## Public Member Functions

| ByteQueue ()
| ~ByteQueue ()
void | WriteBytes (const char *in, unsigned length, const char *file, unsigned int line)
bool | ReadBytes (char *out, unsigned maxLengthToRead, bool peek)
unsigned | GetBytesWritten (void) const
char * | PeekContiguousBytes (unsigned int *outLength) const
void | IncrementReadOffset (unsigned length)
void | DecrementReadOffset (unsigned length)
void | Clear (const char *file, unsigned int line)
void | Print (void)

## Protected Attributes

char * | data
unsigned | readOffset
unsigned | writeOffset
unsigned | lengthAllocated

## Detailed Description

Definition at line 32 of file DS_ByteQueue.h.

## Constructor & Destructor Documentation

ByteQueue::ByteQueue | ( |  | ) |

Definition at line 24 of file DS_ByteQueue.cpp.

References data, lengthAllocated, readOffset, and writeOffset.

ByteQueue::~ByteQueue | ( |  | ) |

Definition at line 29 of file DS_ByteQueue.cpp.

References _FILE_AND_LINE_, and Clear().

## Member Function Documentation

void ByteQueue::Clear | ( | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 111 of file DS_ByteQueue.cpp.

References data, lengthAllocated, rakFree_Ex, readOffset, and writeOffset.

Referenced by SLNet::RemoteClient::Reset(), and ~ByteQueue().

void ByteQueue::DecrementReadOffset | ( | unsigned | length | ) |

Definition at line 129 of file DS_ByteQueue.cpp.

References lengthAllocated, and readOffset.

unsigned ByteQueue::GetBytesWritten | ( | void |  | ) | const

Definition at line 118 of file DS_ByteQueue.cpp.

References lengthAllocated, readOffset, and writeOffset.

Referenced by ReadBytes(), and WriteBytes().

void ByteQueue::IncrementReadOffset | ( | unsigned | length | ) |

Definition at line 125 of file DS_ByteQueue.cpp.

References lengthAllocated, and readOffset.

Referenced by ReadBytes().

char * ByteQueue::PeekContiguousBytes | ( | unsigned int * | outLength | ) | const

Definition at line 103 of file DS_ByteQueue.cpp.

References data, lengthAllocated, readOffset, and writeOffset.

void ByteQueue::Print | ( | void |  | ) |

Definition at line 136 of file DS_ByteQueue.cpp.

References data, RAKNET_DEBUG_PRINTF, readOffset, and writeOffset.

bool ByteQueue::ReadBytes | ( | char * | out,
|  | unsigned | maxLengthToRead,
|  | bool | peek
| ) |  |

Definition at line 74 of file DS_ByteQueue.cpp.

References data, GetBytesWritten(), IncrementReadOffset(), lengthAllocated, readOffset, and writeOffset.

void ByteQueue::WriteBytes | ( | const char * | in,
|  | unsigned | length,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 35 of file DS_ByteQueue.cpp.

References data, GetBytesWritten(), lengthAllocated, rakRealloc_Ex, readOffset, and writeOffset.

## Member Data Documentation

char* DataStructures::ByteQueue::data

protected

Definition at line 47 of file DS_ByteQueue.h.

Referenced by ByteQueue(), Clear(), PeekContiguousBytes(), Print(), ReadBytes(), and WriteBytes().

unsigned DataStructures::ByteQueue::lengthAllocated

protected

Definition at line 48 of file DS_ByteQueue.h.

Referenced by ByteQueue(), Clear(), DecrementReadOffset(), GetBytesWritten(), IncrementReadOffset(), PeekContiguousBytes(), ReadBytes(), and WriteBytes().

unsigned DataStructures::ByteQueue::readOffset

protected

Definition at line 48 of file DS_ByteQueue.h.

Referenced by ByteQueue(), Clear(), DecrementReadOffset(), GetBytesWritten(), IncrementReadOffset(), PeekContiguousBytes(), Print(), ReadBytes(), and WriteBytes().

unsigned DataStructures::ByteQueue::writeOffset

protected

Definition at line 48 of file DS_ByteQueue.h.

Referenced by ByteQueue(), Clear(), GetBytesWritten(), PeekContiguousBytes(), Print(), ReadBytes(), and WriteBytes().

The documentation for this class was generated from the following files:

- Source/include/slikenet/DS_ByteQueue.h
- Source/src/DS_ByteQueue.cpp