• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

DS_ByteQueue.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 #ifndef __BYTE_QUEUE_H
00011 #define __BYTE_QUEUE_H
00012 
00013 #include "RakMemoryOverride.h"
00014 #include "Export.h"
00015 
00018 namespace DataStructures
00019 {
00020         class ByteQueue
00021         {
00022         public:
00023                 ByteQueue();
00024                 ~ByteQueue();
00025                 void WriteBytes(const char *in, unsigned length, const char *file, unsigned int line);
00026                 bool ReadBytes(char *out, unsigned maxLengthToRead, bool peek);
00027                 unsigned GetBytesWritten(void) const;
00028                 char* PeekContiguousBytes(unsigned int *outLength) const;
00029                 void IncrementReadOffset(unsigned length);
00030                 void DecrementReadOffset(unsigned length);
00031                 void Clear(const char *file, unsigned int line);
00032                 void Print(void);
00033 
00034         protected:
00035                 char *data;
00036                 unsigned readOffset, writeOffset, lengthAllocated;
00037         };
00038 }
00039 
00040 #endif

Generated on Thu Sep 30 2010 01:27:22 for RakNet by  doxygen 1.7.1