FARGOS/VISTA Object Management Environment Core
..
|
Buffer into which OMEtype data is encoded. More...
#include <OMEencode.h>
Public Member Functions | |
OMEencodeBuffer (uint32_t version=1) | |
OMEencodeBuffer (OMEstring *data, uint32_t version=1) | |
~OMEencodeBuffer () | |
void | addEncodedElement (OMEencodeBufferElement *elem) |
Append an encoded element to the collection. More... | |
uint32_t | getEncodeVersion () const |
Get version Id of encoding version. More... | |
size_t | bufferSize () const |
Get size of buffer in bytes. More... | |
OMEstring * | condenseIntoString (bool includeVersionID) |
Serialize all OMEencodeBufferElement items into a single string. More... | |
Protected Attributes | |
OMEencodeBufferElement * | start |
OMEencodeBufferElement * | last |
size_t | totalSize |
uint32_t | encodeVersion |
Buffer into which OMEtype data is encoded.
Encoding buffer for OMEtype elements, which avoids unnecessary movement of data or allocation of memory.
Rather than suffer the pathological behavior incurred when repeated concatenations are performed, the OMEencodeBuffer permits the encoding of multiple OMEtype elements to be logical concatenated. Copy-on-write events are avoided and storage is allocated for the buffer only when the condenseIntoString() function is called.
|
inline |
|
inline |
References OMEencodeBufferElement::elementSize().
OMEencodeBuffer::~OMEencodeBuffer | ( | ) |
References OMEencodeBufferElement::next, and start.
|
inline |
Append an encoded element to the collection.
References OMEencodeBufferElement::elementSize(), and OMEencodeBufferElement::next.
Referenced by OMEnlmStorage::encodeNLM().
|
inline |
Get size of buffer in bytes.
OMEstring * OMEencodeBuffer::condenseIntoString | ( | bool | includeVersionID | ) |
Serialize all OMEencodeBufferElement items into a single string.
References OMEencodeBufferElement::data, encodeVersion, htonl, OMEstring::length(), OMEencodeBufferElement::next, start, and totalSize.
Referenced by OMEconnection::encodeData(), encodeData(), OMEnlmStorage::encodeNLM(), and OMEoidStorage::OMEencodeOID().
|
inline |
Get version Id of encoding version.
Referenced by OMEtype::encode(), and OMEoidStorageExternal::encodeOID().
|
protected |
Referenced by condenseIntoString().
|
protected |
|
protected |
Referenced by condenseIntoString(), and ~OMEencodeBuffer().
|
protected |
Referenced by condenseIntoString().
![]() | Generated: Fri Jul 31 2020 18:19:16
Support Information |