FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEencodeBuffer Class Reference

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...
 
OMEstringcondenseIntoString (bool includeVersionID)
 Serialize all OMEencodeBufferElement items into a single string. More...
 

Protected Attributes

OMEencodeBufferElementstart
 
OMEencodeBufferElementlast
 
size_t totalSize
 
uint32_t encodeVersion
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ OMEencodeBuffer() [1/2]

OMEencodeBuffer::OMEencodeBuffer ( uint32_t  version = 1)
inline

◆ OMEencodeBuffer() [2/2]

OMEencodeBuffer::OMEencodeBuffer ( OMEstring data,
uint32_t  version = 1 
)
inline

◆ ~OMEencodeBuffer()

OMEencodeBuffer::~OMEencodeBuffer ( )

Member Function Documentation

◆ addEncodedElement()

OMEencodeBuffer::addEncodedElement ( OMEencodeBufferElement elem)
inline

Append an encoded element to the collection.

References OMEencodeBufferElement::elementSize(), and OMEencodeBufferElement::next.

Referenced by OMEnlmStorage::encodeNLM().

◆ bufferSize()

OMEencodeBuffer::bufferSize ( ) const
inline

Get size of buffer in bytes.

◆ condenseIntoString()

OMEstring * OMEencodeBuffer::condenseIntoString ( bool  includeVersionID)

◆ getEncodeVersion()

OMEencodeBuffer::getEncodeVersion ( ) const
inline

Get version Id of encoding version.

Referenced by OMEtype::encode(), and OMEoidStorageExternal::encodeOID().

Member Data Documentation

◆ encodeVersion

uint32_t OMEencodeBuffer::encodeVersion
protected

Referenced by condenseIntoString().

◆ last

OMEencodeBufferElement* OMEencodeBuffer::last
protected

◆ start

OMEencodeBufferElement* OMEencodeBuffer::start
protected

◆ totalSize

size_t OMEencodeBuffer::totalSize
protected

Referenced by condenseIntoString().


The documentation for this class was generated from the following files:
Generated: Fri Jul 31 2020 18:19:16
Support Information