#include <ByteOutBuffer.h>
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 | |
ByteBuffer & | buff |
reference to manipulated ByteBuffer |
Definition at line 19 of file ByteOutBuffer.h.
VGServer::ByteOutBuffer::ByteOutBuffer | ( | ByteBuffer & | _buff | ) | [inline] |
VGServer::ByteOutBuffer::ByteOutBuffer | ( | const ByteOutBuffer & | o | ) | [inline] |
void VGServer::ByteOutBuffer::append | ( | T | 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] |
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] |
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().
ByteBuffer& VGServer::ByteOutBuffer::buff [protected] |
reference to manipulated ByteBuffer
Definition at line 23 of file ByteOutBuffer.h.
Referenced by append(), and appendBytes().