VGServer::ByteOutBuffer Class Reference

ByteOutBuffer is a cursor class to ByteBuffer implementing growing byte oriented memory buffer interface used in the graph server when constructing the client output. More...

#include <ByteOutBuffer.h>

List of all members.

Public Member Functions

template<class T>
void append (T item)
 append a single item of the template type T to the buffer.
void append_16 (short s)
 append two bytes = one word (16 bits) to the buffer
void append_32 (int i)
 append four bytes = one dword (32 bits) to the buffer
void append_64 (long long l)
 append four bytes = one dword (32 bits) to the buffer
void append_8 (char c)
 append a single byte (8 bits) to the buffer
void appendAnyType (const class AnyType &v)
 appends a defined AnyType at the position i
void appendByteBuffer (const ByteBuffer &bb)
 append the contents of a different object to this one (overload the template function)
void appendBytes (const void *data, size_t len)
 append a memory range to the buffer
void appendString (const std::string &s)
 append to contents of a std::string !! excluding the null !! (overload ing the template function)
 ByteOutBuffer (const ByteOutBuffer &o)
 copy constructor: create a new duplicate object.
 ByteOutBuffer (ByteBuffer &_buff)
 create a new cursor object

Protected Attributes

ByteBufferbuff
 reference to manipulated ByteBuffer


Detailed Description

ByteOutBuffer is a cursor class to ByteBuffer implementing growing byte oriented memory buffer interface used in the graph server when constructing the client output.

Definition at line 19 of file ByteOutBuffer.h.


Constructor & Destructor Documentation

VGServer::ByteOutBuffer::ByteOutBuffer ( ByteBuffer _buff  )  [inline]

create a new cursor object

Definition at line 27 of file ByteOutBuffer.h.

VGServer::ByteOutBuffer::ByteOutBuffer ( const ByteOutBuffer o  )  [inline]

copy constructor: create a new duplicate object.

Definition at line 33 of file ByteOutBuffer.h.


Member Function Documentation

template<class T>
void VGServer::ByteOutBuffer::append ( item  )  [inline]

append a single item of the template type T to the buffer.

Be careful with implicit type conversions!

Definition at line 54 of file ByteOutBuffer.h.

References buff, VGServer::ByteBuffer::buffsize(), VGServer::ByteBuffer::data(), VGServer::ByteBuffer::grow(), VGServer::ByteBuffer::set_size(), and VGServer::ByteBuffer::size().

Referenced by VGServer::GraphContainer::getArea(), VGServer::GraphContainer::getGraphProperties(), and VGServer::GraphContainer::getNearestNeighbor().

void VGServer::ByteOutBuffer::append_16 ( short  s  )  [inline]

append two bytes = one word (16 bits) to the buffer

Definition at line 69 of file ByteOutBuffer.h.

void VGServer::ByteOutBuffer::append_32 ( int  i  )  [inline]

append four bytes = one dword (32 bits) to the buffer

Definition at line 73 of file ByteOutBuffer.h.

void VGServer::ByteOutBuffer::append_64 ( long long  l  )  [inline]

append four bytes = one dword (32 bits) to the buffer

Definition at line 77 of file ByteOutBuffer.h.

void VGServer::ByteOutBuffer::append_8 ( char  c  )  [inline]

append a single byte (8 bits) to the buffer

Definition at line 65 of file ByteOutBuffer.h.

void VGServer::ByteOutBuffer::appendAnyType ( const class AnyType v  ) 

appends a defined AnyType at the position i

Definition at line 19 of file ByteOutBuffer.cc.

References appendString(), VGServer::ATTRTYPE_BOOL, VGServer::ATTRTYPE_BYTE, VGServer::ATTRTYPE_CHAR, VGServer::ATTRTYPE_DOUBLE, VGServer::ATTRTYPE_DWORD, VGServer::ATTRTYPE_FLOAT, VGServer::ATTRTYPE_INTEGER, VGServer::ATTRTYPE_INVALID, VGServer::ATTRTYPE_LONG, VGServer::ATTRTYPE_LONGSTRING, VGServer::ATTRTYPE_QWORD, VGServer::ATTRTYPE_SHORT, VGServer::ATTRTYPE_STRING, and VGServer::ATTRTYPE_WORD.

void VGServer::ByteOutBuffer::appendByteBuffer ( const ByteBuffer bb  )  [inline]

append the contents of a different object to this one (overload the template function)

Definition at line 43 of file ByteOutBuffer.h.

References appendBytes(), VGServer::ByteBuffer::data(), and VGServer::ByteBuffer::size().

Referenced by VGServer::GraphContainer::getArea().

void VGServer::ByteOutBuffer::appendBytes ( const void *  data,
size_t  len 
)

append a memory range to the buffer

Definition at line 11 of file ByteOutBuffer.cc.

References buff, VGServer::ByteBuffer::buffsize(), VGServer::ByteBuffer::data(), VGServer::ByteBuffer::grow(), VGServer::ByteBuffer::set_size(), and VGServer::ByteBuffer::size().

Referenced by appendByteBuffer(), appendString(), VGServer::GraphContainer::getArea(), and VGServer::GraphContainer::getNearestNeighbor().

void VGServer::ByteOutBuffer::appendString ( const std::string &  s  )  [inline]

append to contents of a std::string !! excluding the null !! (overload ing the template function)

Definition at line 48 of file ByteOutBuffer.h.

References appendBytes().

Referenced by appendAnyType(), VGServer::GraphContainer::getArea(), and VGServer::GraphContainer::getNearestNeighbor().


Member Data Documentation

ByteBuffer& VGServer::ByteOutBuffer::buff [protected]

reference to manipulated ByteBuffer

Definition at line 23 of file ByteOutBuffer.h.

Referenced by append(), and appendBytes().


The documentation for this class was generated from the following files:
Generated on Wed Sep 27 14:34:01 2006 for VGServer by  doxygen 1.4.7