GlobalObjects
Loading...
Searching...
No Matches
glo::DataStreamer Class Reference

This class encodes or decodes data for transport in a TCP packet. More...

#include <GloDataStreamer.h>

Public Types

enum  ContainerType { eMAP , eLIST }
 

Public Member Functions

 DataStreamer ()
 
virtual ~DataStreamer ()
 
int streamBlobInData (ClassInfo *&rpClassInfo, const eut::Blob &rBlob)
 
int streamBlobInData (ClassInfoAttribute::Type *&rpClassInfoAttributeType, const eut::Blob &rBlob)
 
int streamBlobInData (LimitRecord *&prLimitRecord, const eut::Blob &rBlob)
 
int streamBlobInData (Record *&rpRecord, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap, unsigned long ulClassID=0)
 
int streamBlobInData (std::list< Record * > *&rpRecordList, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap)
 
int streamBlobInData (std::map< ObjID, Record *, std::less< ObjID > > *&rpRecordMap, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap)
 
int streamBlobInData (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prClassInfoMap, const eut::Blob &rBlob)
 
int streamBlobInData (std::vector< LimitRecord > *&prLimitRecordVector, const eut::Blob &rBlob)
 
int streamDataInBlob (eut::Blob &rBlob, const ClassInfo &rClassInfo)
 
int streamDataInBlob (eut::Blob &rBlob, const ClassInfoAttribute::Type &rClassInfoAttributeType)
 
int streamDataInBlob (eut::Blob &rBlob, const LimitRecord &rLimitRecord)
 
int streamDataInBlob (eut::Blob &rBlob, const Record &rRecord, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap)
 
int streamDataInBlob (eut::Blob &rBlob, const std::list< Record * > &rRecordList, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap)
 
int streamDataInBlob (eut::Blob &rBlob, const std::map< ObjID, Record *, std::less< ObjID > > &rRecordMap, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap)
 
int streamDataInBlob (eut::Blob &rBlob, const std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rClassInfoMap)
 
int streamDataInBlob (eut::Blob &rBlob, const std::vector< LimitRecord > &rLimitRecordVector)
 

Private Member Functions

 DataStreamer (const DataStreamer &)
 
int getTagVariable (std::size_t &rnRetVal, const eut::Blob &rBlob, const std::string &rsTagVar)
 
int getTagVariable (std::string &rsRetVal, const eut::Blob &rBlob, const std::string &rsTagVar)
 
DataStreameroperator= (const DataStreamer &)
 
int streamBlobAttributeInRecordAttribute (BaseRecordAttribute &rBaseRecordAttribute, const eut::Blob &rBlob, const std::string &rsFileInfo, unsigned int uiAttributeInformation, const std::map< unsigned long, ClassInfo * > &prClassInfoMap, std::map< ObjID, Record *, std::less< ObjID > > &rReadyRecordMap, unsigned long ulClassID=0)
 
int streamBlobAttributeListInClassInfo (ClassInfo &rClassInfo, const eut::Blob &rBlob)
 
int streamBlobAttributeListInRecord (Record &rRecord, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap, std::map< ObjID, Record *, std::less< ObjID > > &rReadyRecordMap, unsigned long ulClassID=0)
 
int streamBlobInClassInfo (ClassInfo *&rpClassInfo, const eut::Blob &rBlob)
 
int streamBlobIndexItemsInClassInfoIndex (ClassInfoIndex &rClassInfoIndex, const eut::Blob &rBlob)
 
int streamBlobIndexListInClassInfo (ClassInfo &rClassInfo, const eut::Blob &rBlob)
 
int streamBlobInRecord (Record *&rpRecord, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap, std::map< ObjID, Record *, std::less< ObjID > > &rReadyRecordMap, unsigned long ulClassID=0)
 
int streamBlobInRecordContainer (std::map< ObjID, Record *, std::less< ObjID > > *&rpRecordMap, std::list< Record * > *&rpRecordList, ContainerType eContainerType, const eut::Blob &rBlob, const std::map< unsigned long, ClassInfo * > &prClassInfoMap)
 
int streamBlobLimitRecordInLimitRecordAttribute (LimitRecord &rLimitRecord, const eut::Blob &rBlob)
 
std::size_t streamDataClassInfoAttributeInBlob (eut::Blob &rBlob, const ClassInfoAttribute &rAttribute)
 
std::size_t streamDataClassInfoInBlob (eut::Blob &rBlob, const ClassInfo &rClassInfo)
 
std::size_t streamDataClassInfoIndexAttributeInBlob (eut::Blob &rBlob, const ClassInfoIndex::IndexAttributeItem &rIndexAttributeInfo)
 
std::size_t streamDataClassInfoIndexInBlob (eut::Blob &rBlob, const ClassInfoIndex &rIndex)
 
std::size_t streamDataLimitRecordInBlob (eut::Blob &rBlob, const LimitRecord &rLimitRecord)
 
template<typename T >
int streamDataLotAttributeInBlob (eut::Blob &rAttributeValueBlob, T &rSet)
 
std::size_t streamDataRecordAttributeInBlob (eut::Blob &rBlob, BaseRecordAttribute &rAttribute, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap)
 
std::size_t streamDataRecordInBlob (eut::Blob &rBlob, const Record &rRecord, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap)
 

Private Attributes

eut::CriticalSection m_LocalCriticalSection
 

Detailed Description

This class encodes or decodes data for transport in a TCP packet.

This class was introduced in 2013, because the encoding performed so far did not allow to control the packet (e.g. it could not be printed). The XML format is used for most packets.

Author
Helmut Jakoby

Member Enumeration Documentation

◆ ContainerType

To tell using methods which type of container is used.

Enumerator
eMAP 

An std::map is used.

eLIST 

An std::list is used.

Constructor & Destructor Documentation

◆ DataStreamer() [1/2]

glo::DataStreamer::DataStreamer ( )

Standard constructor.

◆ ~DataStreamer()

virtual glo::DataStreamer::~DataStreamer ( )
virtual

Destructor.

◆ DataStreamer() [2/2]

glo::DataStreamer::DataStreamer ( const DataStreamer & )
private

The copy constructor is not available.

Member Function Documentation

◆ getTagVariable() [1/2]

int glo::DataStreamer::getTagVariable ( std::size_t & rnRetVal,
const eut::Blob & rBlob,
const std::string & rsTagVar )
private

Returns the value of the passed TagVariable from the current position as a std::size_t. The original current position in the passed blob is reset to the original value; i.e., it is not changed.

If blob content...

'<atr n="OOMyClass.m_IsIt" t="bool" p="34" l="1"></atr>'

...and the current position == 1 and TagVariable == 'p', then the return value is == 34.

Parameters
[in,out]rnRetValThe value from the tag variable.
[in]rBlobThe blob to be evaluated as XML.
[in]rsTagVarThe tag variable.
Returns
A return value < 0 indicates an error.

◆ getTagVariable() [2/2]

int glo::DataStreamer::getTagVariable ( std::string & rsRetVal,
const eut::Blob & rBlob,
const std::string & rsTagVar )
private

Returns the value of the passed TagVariable from the current position as a string. The original current position in the passed blob is reset to the original value; i.e., it is not changed.

If blob content...

'<atr n="OOMyClass.m_IsIt" t="bool" p="34" l="1"></atr>'

...and the current position == 1 and TagVariable == 'n', then the return value is == "OOMyClass.m_IsIt".

If blob content...

'<atr n="Test"></atr><atr n="Rest"></atr>'

...and the current position == 10 and TagVariable == 'n', then the return value is == "Rest".

Parameters
[in,out]rsRetValThe value from the tag variable.
[in]rBlobThe blob to be evaluated as XML.
[in]rsTagVarThe tag variable.
Returns
A return value < 0 indicates an error.

◆ operator=()

DataStreamer & glo::DataStreamer::operator= ( const DataStreamer & )
private

The assignment operator is not available.

◆ streamBlobAttributeInRecordAttribute()

int glo::DataStreamer::streamBlobAttributeInRecordAttribute ( BaseRecordAttribute & rBaseRecordAttribute,
const eut::Blob & rBlob,
const std::string & rsFileInfo,
unsigned int uiAttributeInformation,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap,
std::map< ObjID, Record *, std::less< ObjID > > & rReadyRecordMap,
unsigned long ulClassID = 0 )
private

Fills a BaseRecordAttribute from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rBaseRecordAttributeThe BaseRecordAttribute to which the values from the blob are transferred.
[in]rBlobThe blob with the values of the record attribute as XML.
[in]rsFileInfoIf necessary a file name, so that additional data can be determined.
[in]uiAttributeInformationEvaluated only if not 0 and the attribute is of type APointerRecordAttribute:
  • If 1, it is a generic object
  • If 2, the record is not included.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
[in]rReadyRecordMapThe already streamed data records.
[in]ulClassIDIf > 0, then the record is only filled with the data from the table of this class.
Returns
A return value < 0 indicates an error.
Note
For Glo developers: Is implemented in GloRecordAttributeFunctions.cpp, so that extensions of record attributes can be made there collected.

◆ streamBlobAttributeListInClassInfo()

int glo::DataStreamer::streamBlobAttributeListInClassInfo ( ClassInfo & rClassInfo,
const eut::Blob & rBlob )
private

Fills the GloClassInfoAttributes in a passed ClassInfo from passed eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rClassInfoThe class information, into which the data from the passed blob is copied.
[in]rBlobThe blob with the values of the ClassInfoAttribute as XML.
Returns
A return value < 0 indicates an error.

◆ streamBlobAttributeListInRecord()

int glo::DataStreamer::streamBlobAttributeListInRecord ( Record & rRecord,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap,
std::map< ObjID, Record *, std::less< ObjID > > & rReadyRecordMap,
unsigned long ulClassID = 0 )
private

Fills a Record from the transferred eut::Blob.

Sample structure of the AttributBlob:

<!-- A record attribute with embedded record... -->
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" l="10">
1371785421
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" l="1">
0
</atr>
<atr n="Test3.m_pTest" t="pointer" l="385">
<oid>
6.0.10915
</oid>
<ats l="190">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" l="10">
1371785930
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" l="3">
123
</atr>
</ats>
<oids l="135">
<atr n="glo::Persistent.m_ObjID" t="objid" p="430" l="9">
6.0.10915
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="17" l="9">
6.0.10915
</atr>
</oids>
</atr>
<!-- or an ObjID list... -->
<atr n="glo::Persistent.m_ObjID" t="objid" p="31" l="9">
8.0.10908
</atr>
<atr n="Test3.m_ObjID" t="objid" p="17" l="9">
8.0.10908
</atr>
Parameters
[in,out]rRecordThe record to which the values from the blob are transferred.
[in]rBlobThe blob with the values of the Record as XML.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
[in]ulClassIDIf > 0, then the record is only filled with the data from the table of this class.
[in]rReadyRecordMapThe already streamed data records.
Returns
A return value < 0 indicates an error.
Note
For Glo developers: Is implemented in GloRecordAttributeFunctions.cpp, so that extensions of record attributes can be made there collected.

◆ streamBlobInClassInfo()

int glo::DataStreamer::streamBlobInClassInfo ( ClassInfo *& rpClassInfo,
const eut::Blob & rBlob )
private

Returns respectively fills a ClassInfo from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rpClassInfoThe class information to which the values from the blob are transferred. If nullptr is passed, a new class information is instantiated; the calling instance must then remove the object from memory.
If a valid class information was passed, its values are set from the blob.
[in]rBlobThe blob with the values of the class information as XML.
Returns
A return value < 0 indicates an error. If a class information was passed and an error occurred, the values of the class information are undefined!

◆ streamBlobInData() [1/8]

int glo::DataStreamer::streamBlobInData ( ClassInfo *& rpClassInfo,
const eut::Blob & rBlob )

Returns respectively fills a ClassInfo from the transferred eut::Blob.

Structure of the blob see here....

Parameters
[in,out]rpClassInfoThe class information to which the values from the blob are transferred. If nullptr is passed, a new class information is instantiated; the calling instance must then remove the object from memory.
If a valid class information was passed, its values are set from the blob.
[in]rBlobThe blob with the values of the class information as XML.
Returns
A return value < 0 indicates an error. If a class information was passed and an error occurred, the values of the class information are undefined!

◆ streamBlobInData() [2/8]

int glo::DataStreamer::streamBlobInData ( ClassInfoAttribute::Type *& rpClassInfoAttributeType,
const eut::Blob & rBlob )

Returns respectively fills a ClassInfoAttribute::Type from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rpClassInfoAttributeTypeThe ClassInfoAttribute::Type to which the values from the blob are transferred. if nullptr is passed, a new ClassInfoAttribute::Type is instantiated; the calling instance must then remove the object from memory.
If a valid ClassInfoAttribute::Type was passed, its values are set from the blob.
[in]rBlobThe blob with the values of the ClassInfoAttribute::Type as XML.
Returns
A return value < 0 indicates an error. If a ClassInfoAttribute::Type was passed and an error occurred, the values of the ClassInfoAttribute::Type are undefined!

◆ streamBlobInData() [3/8]

int glo::DataStreamer::streamBlobInData ( LimitRecord *& prLimitRecord,
const eut::Blob & rBlob )

Returns respectively fills a LimitRecord from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]prLimitRecordThe LimitRecord to which the values from the blob are transferred. If nullptr is passed, a new LimitRecord is instantiated; the calling instance must then remove the object from memory.
If a valid LimitRecord was passed, its values are set from the blob.
[in]rBlobThe blob with the values of the LimitRecord as XML.
Returns
A return value < 0 indicates an error. If a LimitRecord was passed and an error occurred, the values of the LimitRecord are undefined!

◆ streamBlobInData() [4/8]

int glo::DataStreamer::streamBlobInData ( Record *& rpRecord,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap,
unsigned long ulClassID = 0 )

Delivers respectively fills a Record from the transferred eut::Blob.

Structure of the blob see here....

Parameters
[in,out]rpRecordThe record to which the values from the blob are transferred. If nullptr is passed, a new record is instantiated; the calling instance must then remove the object from memory.
If a valid record is passed, its attributes are set from the blob.
[in]rBlobThe blob with the values of the Record as XML.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
[in]ulClassIDIf > 0, then the record is only filled with the data from the table of this class.
Returns
A return value < 0 indicates an error. If a record was passed and an error occurred, the values of the record are undefined!

◆ streamBlobInData() [5/8]

int glo::DataStreamer::streamBlobInData ( std::list< Record * > *& rpRecordList,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap )

Returns respectively fills a std::list of GloRecords from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rpRecordListThe container into which the values from the blob are transferred. If "nullptr" is passed, a new container is instantiated; the calling instance must remove the object from memory.
If a valid container is passed, the contents (if not already inside) from the blob are inserted without changing the original content of the container.
[in]rBlobThe blob with the values of the GloRecords as XML.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
Returns
A return value < 0 indicates an error. If a container was passed and an error occurred, the values of the container are undefined!

◆ streamBlobInData() [6/8]

int glo::DataStreamer::streamBlobInData ( std::map< ObjID, Record *, std::less< ObjID > > *& rpRecordMap,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap )

Returns respectively fills a std::map of GloRecords from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rpRecordMapThe container into which the values from the blob are transferred. If "nullptr" is passed, a new container is instantiated; the calling instance must remove the object from memory.
If a valid container is passed, the contents (if not already inside) from the blob are inserted without changing the original content of the container.
[in]rBlobThe blob with the values of the GloRecords as XML.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
Returns
A return value < 0 indicates an error. If a container was passed and an error occurred, the values of the container are undefined!

◆ streamBlobInData() [7/8]

int glo::DataStreamer::streamBlobInData ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prClassInfoMap,
const eut::Blob & rBlob )

Returns respectively fills a std::map of GloClassInfos from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]prClassInfoMapThe container into which the values from the blob are transferred. If "nullptr" is passed, a new container is instantiated; the calling instance must remove the object from memory.
If a valid container is passed, the contents (if not already inside) from the blob are inserted without changing the original content of the container.
[in]rBlobThe blob with the values of the class information as XML.
Returns
A return value < 0 indicates an error. If a container was passed and an error occurred, the values of the container are undefined!

◆ streamBlobInData() [8/8]

int glo::DataStreamer::streamBlobInData ( std::vector< LimitRecord > *& prLimitRecordVector,
const eut::Blob & rBlob )

Returns respectively fills a std::vector of GloLimitRecords from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]prLimitRecordVectorThe container into which the values from the blob are transferred. If "nullptr" is passed, a new container is instantiated; the calling instance must remove the object from memory.
If a valid container is passed, the contents (if not already inside) from the blob are inserted without changing the original content of the container.
[in]rBlobThe blob with the values of the GloLimitRecords as XML.
Returns
A return value < 0 indicates an error. If a container was passed and an error occurred, the values of the container are undefined!

◆ streamBlobIndexItemsInClassInfoIndex()

int glo::DataStreamer::streamBlobIndexItemsInClassInfoIndex ( ClassInfoIndex & rClassInfoIndex,
const eut::Blob & rBlob )
private

Fills the ClassInfoIndex::IndexAttributeItems in a passed ClassInfoIndex from passed eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rClassInfoIndexThe ClassInfoIndex, into which the data from the passed blob is copied.
[in]rBlobThe blob with the values of the ClassInfoIndex::IndexAttributeItem as XML.
Returns
A return value < 0 indicates an error.

◆ streamBlobIndexListInClassInfo()

int glo::DataStreamer::streamBlobIndexListInClassInfo ( ClassInfo & rClassInfo,
const eut::Blob & rBlob )
private

Fills the GloClassInfoIndexe in a passed ClassInfo from passed eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rClassInfoThe class information, into which the data from the passed blob is copied.
[in]rBlobThe blob with the values of the ClassInfoIndex as XML.
Returns
A return value < 0 indicates an error.

◆ streamBlobInRecord()

int glo::DataStreamer::streamBlobInRecord ( Record *& rpRecord,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap,
std::map< ObjID, Record *, std::less< ObjID > > & rReadyRecordMap,
unsigned long ulClassID = 0 )
private

Delivers respectively fills a Record from the transferred eut::Blob.

Structure of the blob see here...

Parameters
[in,out]rpRecordThe record to which the values from the blob are transferred. If nullptr is passed, a new record is instantiated; the calling instance must then remove the object from memory.
If a valid record is passed, its attributes are set from the blob.
[in]rBlobThe blob with the values of the Record as XML.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
[in]rReadyRecordMapThe already streamed records; if the record to be streamed is already in these containers, then rpRecord is returned from this container with error ERR_RECORD_READY.
[in]ulClassIDIf > 0, then the record is only filled with the data from the table of this class.
Returns
A return value < 0 indicates an error. If a record was passed and an error occurred, the values of the record are undefined!

◆ streamBlobInRecordContainer()

int glo::DataStreamer::streamBlobInRecordContainer ( std::map< ObjID, Record *, std::less< ObjID > > *& rpRecordMap,
std::list< Record * > *& rpRecordList,
ContainerType eContainerType,
const eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo * > & prClassInfoMap )
private

Returns respectively fills a std::map or std::list of GloRecords from passed eut::Blob depending on passed ContainerType.

Structure of the blob see here....

Parameters
[in,out]rpRecordMapThe container into which the values from the blob are transferred. If "nullptr" is passed, a new container is instantiated; the calling instance must remove the object from memory.
If a valid container is passed, the contents (if not already inside) from the blob are inserted without changing the original content of the container.
[in,out]rpRecordListSee description of rpRecordMap.
[in]rBlobThe blob with the values of the record as XML.
[in]eContainerTypeSpecifies whether rpRecordMap or rpRecordList is taken into account as a parameter.
[in]prClassInfoMapThe class information from which the structure of the data records emerges.
Returns
A return value < 0 indicates an error. If a container was passed and an error occurred, the values of the container or the contained records are undefined!

◆ streamBlobLimitRecordInLimitRecordAttribute()

int glo::DataStreamer::streamBlobLimitRecordInLimitRecordAttribute ( LimitRecord & rLimitRecord,
const eut::Blob & rBlob )
private

Fills LimitRecord from the transferred eut::Blob.

Example structure (here with a comment):

<!-- dt=DataTypeNumber, dn=DataTypeName mi=MinValue mx=MaxValue fs=Field size in table -->
<atr dt="1" dn="ObjID" mi="0" mx="1" fs="1"></atr>
Parameters
[in,out]rLimitRecordThe LimitRecord to which the values from the blob are transferred.
[in]rBlobThe blob with the values of the LimitRecord as XML.
Returns
A return value < 0 indicates an error.

◆ streamDataClassInfoAttributeInBlob()

std::size_t glo::DataStreamer::streamDataClassInfoAttributeInBlob ( eut::Blob & rBlob,
const ClassInfoAttribute & rAttribute )
private

Streams the values of the passed GloClassInfoAttributes as XML-string into a passed eut::Blob (without header etc.).

Example structure (here with line break, indents and comments):

<!-- n->Name, ty->TypeEnum ts->TypeAsStr, ti->TypeInfo, tt->TypeSubType, tn->TableName, fn->Fieldname, fp->FieldPos -->
<atr n="m_ObjID" ty="1" ts="objid" ti="" tt="" tn="Autor" fn="ObjID" fp="0"></atr>
<!-- oder -->
<atr n="m_sName" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Name" fp="1"></atr>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rAttributeThe class information attribute whose values are to be appended to the passed eut::Blob as XML string.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataClassInfoInBlob()

std::size_t glo::DataStreamer::streamDataClassInfoInBlob ( eut::Blob & rBlob,
const ClassInfo & rClassInfo )
private

Streams the values of the passed ClassInfo as XML-string into a passed eut::Blob (without header etc.)

Example structure (here with line break, indents and comments):

<!-- sn=SchemaName, na=Name, id=ClassID sid=SuperClassIDs sci=SuperClassInfo -->
<atr sn="MyBase" na="Autor" id="3" sid="1|" sci=" |"></atr>
<ats l="354"> <!-- Class == ClassInfoAttribute -->
<!-- n->Name, ty->TypeEnum ts->TypeAsStr, ti->TypeInfo, tt->TypeSubType, tn->TableName, fn->Fieldname, fp->FieldPos -->
<atr n="m_ObjID" ty="1" ts="objid" ti="" tt="" tn="Autor" fn="ObjID" fp="0"></atr>
<atr n="m_sName" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Name" fp="1"></atr>
<atr n="m_sFirstname" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Firstname" fp="2"></atr>
<atr n="m_BookSet" ty="18" ts="refsetondemand" ti="" tt="Book" tn="Autor" fn="Books" fp="3"></atr>
</ats>
<idxs l="266"> <!-- Class == ClassInfoIndex -->
<!-- n->Name, uq->unique, cs->CaseSensitive, lg->Language l->Number of all IndexAttributItems -->
<idx n="IDX_FullName" uq="0" cs="0" lg="2|" l="97"> <!-- Class == IndexAttributeItem -->
<!-- tn=TableName, fn=Fieldname, sc=significant characters nm=is a number -->
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
<atr tn="Autor" fn="Firstname" sc="20" nm="0"></atr>
</idx>
<idx n="IDX_Name" uq="0" cs="0" lg="2|" l="47">
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
</idx>
</idxs>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rClassInfoThe ClassInfo whose values are to be appended to the passed eut::Blob as XML string.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataClassInfoIndexAttributeInBlob()

std::size_t glo::DataStreamer::streamDataClassInfoIndexAttributeInBlob ( eut::Blob & rBlob,
const ClassInfoIndex::IndexAttributeItem & rIndexAttributeInfo )
private

Streams the values of the passed ClassInfoIndex::IndexAttributeItem as XML-string into a passed eut::Blob (without header etc.).

Example structure (here with line break, indents and comments):

<!-- ip=index path, sc=significant characters nm=is number -->
<atr ip="3.6" sc="20" nm="0"></atr>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rIndexAttributeInfoThe class information index element whose values are to be appended to the passed eut::Blob as XML string.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataClassInfoIndexInBlob()

std::size_t glo::DataStreamer::streamDataClassInfoIndexInBlob ( eut::Blob & rBlob,
const ClassInfoIndex & rIndex )
private

Streams the values of the passed ClassInfoIndex as XML-string into a passed eut::Blob (without header etc.).

Example structure (here with line break, indents and comments):

<idx n="IDX_FullName" uq="0" cs="0" lg="2|" l="97"> <!-- Class == IndexAttributeItem -->
<!-- ip=index path, sc=significant characters nm=is number -->
<atr ip="3.6" sc="20" nm="0"></atr>
<atr ip="4.5.6.4" sc="20" nm="0"></atr>
</idx>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rIndexThe class information index whose values are to be appended to the passed eut::Blob as XML string.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [1/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const ClassInfo & rClassInfo )

Streams the values of the passed ClassInfo as XML-string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- <data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="classinfo" l="646">
<!-- sn=SchemaName, na=Name, id=ClassID sid=SuperClassIDs sci=SuperClassInfo -->
<atr sn="MyBase" na="Autor" id="3" sid="1|" sci=" |"></atr>
<ats l="354"> <!-- Class == ClassInfoAttribute -->
<!-- n->Name, ty->TypeEnum ts->TypeAsStr, ti->TypeInfo, tt->TypeSubType, tn->TableName, fn->Fieldname, fp->FieldPos -->
<atr n="m_ObjID" ty="1" ts="objid" ti="" tt="" tn="Autor" fn="ObjID" fp="0"></atr>
<atr n="m_sName" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Name" fp="1"></atr>
<atr n="m_sFirstname" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Firstname" fp="2"></atr>
<atr n="m_BookSet" ty="18" ts="refsetondemand" ti="" tt="Book" tn="Autor" fn="Books" fp="3"></atr>
</ats>
<idxs l="266"> <!-- Class == ClassInfoIndex -->
<!-- n->Name, uq->unique, cs->CaseSensitive, lg->Language l->Number of all IndexAttributItems -->
<idx n="IDX_FullName" uq="0" cs="0" lg="2|" l="97"> <!-- Class == IndexAttributeItem -->
<!-- tn=TableName, fn=Fieldname, sc=significant characters nm=is a number -->
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
<atr tn="Autor" fn="Firstname" sc="20" nm="0"></atr>
</idx>
<idx n="IDX_Name" uq="0" cs="0" lg="2|" l="47">
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
</idx>
</idxs>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rClassInfoThe ClassInfo whose values are to be appended to the passed eut::Blob as XML string.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [2/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const ClassInfoAttribute::Type & rClassInfoAttributeType )

Streams the values of the passed ClassInfoAttribute::Type as XML-string into a passed eut::Blob how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="ClassInfoAttributeType" l="31">
<!-- dt=DatenTypEnum, inf=TypeInfo st=SubTyp stid=SubTypClassID -->
<atr dt="1" inf="20" st="" stid=""></atr>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rClassInfoAttributeTypeThe ClassInfoAttribute::Type whose values are to be appended to the passed eut::Blob as XML string.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [3/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const LimitRecord & rLimitRecord )

Streams the values of the passed LimitRecord as XML-string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="limitrecord" l="23">
<!-- dt=DataTypeNumber, dn=DataTypeName mi=MinValue mx=MaxValue fs=Field size in table -->
<atr dt="1" dn="ObjID" mi="0" mx="1" fs="1"></atr>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rLimitRecordThe LimitRecord whose values are to be appended to the passed eut::Blob as XML string.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [4/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const Record & rRecord,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap )

Streams the record attribute values of the passed Record as an XML string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="record" l="798">
<oid>8.0.10908</oid> <!-- ObjectID of the record -->
<ats l="609"> <!-- Attribute list of the record l->Length of the section from the end of the line to '</ats>' -->
<!-- n->Name of the attribute t->Type of the attribute p->file position l->length of section from end of line to '</atr>' -->
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1371785421 <!-- Attribute value -->
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<!-- With embedded or PointerRecords n->Name of the attribute t->Type here pointer g->If generic and l->As before -->
<atr n="Test3.m_pTest" t="pointer" p="0" g="0" l="403">
<oid>6.0.10915</oid>
<ats l="208">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1371785930
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="3">
123
</atr>
</ats>
<oids l="135">
<atr n="glo::Persistent.m_ObjID" t="objid" p="430" l="9">
6.0.10915
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="17" l="9">
6.0.10915
</atr>
</oids>
</atr>
</ats>
<!-- ObjID list Structure like attribute list; only with ObjIDs -->
<oids l="129">
<atr n="glo::Persistent.m_ObjID" t="objid" p="31" l="9">
8.0.10908
</atr>
<atr n="Test3.m_ObjID" t="objid" p="17" l="9">
8.0.10908
</atr>
</oids>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rRecordThe data record whose attributes are to be appended to the passed eut::Blob as XML string.
[in]rReadyRecordMapThe already streamed data records must be passed, so that they are not streamed again completely, but only as object ID.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [5/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const std::list< Record * > & rRecordList,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap )

Streams the record attribute values of the passed GloRecords in a std::list as XML-string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="recordlist" l="869">
<e l="403">
<oid>6.0.8</oid>
<ats l="219">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1383154754
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="13">
-6.27744e+066
</atr>
</ats>
<oids l="128">
<atr n="glo::Persistent.m_ObjID" t="objid" p="316" l="5">
6.0.8
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="185" l="5">
6.0.8
</atr>
</oids>
</e>
<e l="16">
<oid>6.0.4</oid> <!-- here a record already read -->
</e>
<e l="406">
<oid>6.0.10</oid>
<ats l="219">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1383154764
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="13">
-6.27744e+066
</atr>
</ats>
<oids l="130">
<atr n="glo::Persistent.m_ObjID" t="objid" p="373" l="6">
6.0.10
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="241" l="6">
6.0.10
</atr>
</oids>
</e>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rRecordListThe records whose record attribute values are to be appended as an XML string to the passed eut::Blob.
[in]rReadyRecordMapThe already streamed data records must be passed, so that they are not streamed again completely, but only as object ID.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [6/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const std::map< ObjID, Record *, std::less< ObjID > > & rRecordMap,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap )

Streams the record attribute values of the passed GloRecords in a std::map as XML-string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="recordmap" l="869">
<e l="403">
<oid>6.0.8</oid>
<ats l="219">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1383154754
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="13">
-6.27744e+066
</atr>
</ats>
<oids l="128">
<atr n="glo::Persistent.m_ObjID" t="objid" p="316" l="5">
6.0.8
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="185" l="5">
6.0.8
</atr>
</oids>
</e>
<e l="16">
<oid>6.0.4</oid> <!-- here a record already read -->
</e>
<e l="406">
<oid>6.0.10</oid>
<ats l="219">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1383154764
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="13">
-6.27744e+066
</atr>
</ats>
<oids l="130">
<atr n="glo::Persistent.m_ObjID" t="objid" p="373" l="6">
6.0.10
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="241" l="6">
6.0.10
</atr>
</oids>
</e>
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rRecordMapThe records whose record attribute values are to be appended as an XML string to the passed eut::Blob.
[in]rReadyRecordMapThe already streamed data records must be passed, so that they are not streamed again completely, but only as object ID.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [7/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const std::map< unsigned long, ClassInfo *, std::less< unsigned long > > & rClassInfoMap )

Streams the values of the passed GloClassInfos in a std::map as XML-string into a passed eut::Blob, how it is sent.

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="classinfomap" l="4517">
...
<e l="709">
<!-- n->Name, id->ClassID sid->SuperClassIDs sci->SuperClassInfo -->
<atr n="Autor" id="3" sid="1|" sci=" |"></atr>
<ats l="354"> <!-- Class == ClassInfoAttribute -->
<!-- n->Name, ty->TypeEnum ts->TypeAsStr, ti->TypeInfo, tt->TypeSubType, tn->TableName, fn->Fieldname, fp->FieldPos -->
<atr n="m_ObjID" ty="1" ts="objid" ti="" tt="" tn="Autor" fn="ObjID" fp="0"></atr>
<atr n="m_sName" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Name" fp="1"></atr>
<atr n="m_sFirstname" ty="11" ts="string" ti="" tt="" tn="Autor" fn="Firstname" fp="2"></atr>
<atr n="m_BookSet" ty="18" ts="refsetondemand" ti="" tt="Book" tn="Autor" fn="Books" fp="3"></atr>
</ats>
<idxs l="266"> <!-- Class == ClassInfoIndex -->
<!-- n->Name, uq->unique, cs->CaseSensitive, lg->2| l->Number of all IndexAttributItems -->
<idx n="IDX_FullName" uq="0" cs="0" lg="2|" l="97"> <!-- Class == IndexAttributeItem -->
<!-- tn=TableName, fn=Fieldname, sc=significant characters nm=is a number -->
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
<atr tn="Autor" fn="Firstname" sc="20" nm="0"></atr>
</idx>
<idx n="IDX_Name" uq="0" cs="0" lg="2|" l="47">
<atr tn="Autor" fn="Name" sc="20" nm="0"></atr>
</idx>
</idxs>
</e>
...
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rClassInfoMapThe GloClassInfos whose values are to be appended to the passed eut::Blob as XML string.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataInBlob() [8/8]

int glo::DataStreamer::streamDataInBlob ( eut::Blob & rBlob,
const std::vector< LimitRecord > & rLimitRecordVector )

Streams the values of the passed LimitRecord's in a std::vector as XML-string into a passed eut::Blob how it is sent

Example structure (here with line break, indents and comments):

<!-- '<data' is the introduction, t->Data type l->Length of the section from the end of the line to '</data>' -->
<data t="limitrecordvector" l="647">
<!-- dt=DataTypeNummer, dn=DataTypeName mi=MinValue mx=MaxValue fs=Field size in table -->
<atr dt="1" dn="ObjID" mi="0" mx="1" fs="1"></atr>
<atr dt="2" dn="char" mi="0" mx="1" fs="1"></atr>
...
<atr dt="13" dn="time_t" mi="1900.01.01" mx="2038.12.31" fs="10"></atr>
...
</data>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rLimitRecordVectorThe GloLimitRecords whose values are to be appended to the passed eut::Blob as XML string.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataLimitRecordInBlob()

std::size_t glo::DataStreamer::streamDataLimitRecordInBlob ( eut::Blob & rBlob,
const LimitRecord & rLimitRecord )
private

Streams the values of the passed LimitRecord as XML-string into a passed eut::Blob (without header etc.).

Example structure (here with line break, indents and comments):

<!-- dt=DataTypeNumber, dn=DataTypeName mi=MinValue mx=MaxValue fs=Field size in table -->
<atr dt="1" dn="ObjID" mi="0" mx="1" fs="1"></atr>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rLimitRecordThe LimitRecord whose values are to be appended to the passed eut::Blob as XML string.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ streamDataLotAttributeInBlob()

template<typename T >
int glo::DataStreamer::streamDataLotAttributeInBlob ( eut::Blob & rAttributeValueBlob,
T & rSet )
private

The individual values from a container are appended to an eut::Blob as XML string.

Example: The container has the two values "123456789012345" and "BabblingRhubarb". The XML string would then be...

<e l="15">
123456789012345
</e>
<e l="15">
BabblingRhubarb
</e>
Parameters
[in,out]rAttributeValueBlobThe blob to which the XML string is appended.
[in]rSetThe container with the individual values.
Note
For Glo developers: Is implemented in GloRecordAttributeFunctions.cpp, so that extensions of record attributes can be made there collected.

◆ streamDataRecordAttributeInBlob()

std::size_t glo::DataStreamer::streamDataRecordAttributeInBlob ( eut::Blob & rBlob,
BaseRecordAttribute & rAttribute,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap )
private

Streams the values of the passed BaseRecordAttribute as an XML-string into a passed eut::Blob (without headers etc.).4

Example structure (here with line break, indents and comments) for the individual attribute types:

After the "atr" tag the next variables have the following meaning:

  • n->Name of the attribute
  • t->Type of the attribute
  • p->FilePosition
  • f->Filename
  • g->Generic
  • l->Length of the section to '

</atr>'

<!-- ------------------------------ -->
<!-- BoolRecordAttribute: -->
<atr n="OOMyClass.m_IsIt" t="bool" p="23" l="1">
0
</atr>
<!-- ------------------------------ -->
<!-- CharRecordAttribute: -->
<atr n="OOMyClass.m_Letter" t="char" p="23" l="2">
65
</atr>
<!-- ------------------------------ -->
<!-- DateTimeRecordAttribute: -->
<atr n="OOMyClass.m_Birthday" t="time_t" p="23" l="6">
765863
</atr>
<!-- ------------------------------ -->
<!-- DoubleRecordAttribute: -->
<atr n="OOMyClass.m_Float" t="double" p="23" l="5">
13.75
</atr>
<!-- ------------------------------ -->
<!-- OdRefRecordAttribute: -->
<atr n="OOMyClass.ObjID" t="ondemand" p="23" l="8">
6.0.3421
</atr>
<!-- ------------------------------ -->
<!-- IntRecordAttribute: -->
<atr n="ClassB.m_Number" t="int" p="23" l="4">
<!-- ------------------------------ -->
<!-- LongRecordAttribute: -->
<atr n="ClassB.m_Number" t="long" p="23" l="4">
<!-- ------------------------------ -->
<!-- ShortRecordAttribute: -->
<atr n="ClassB.m_Number" t="short" p="23" l="4">
<!-- ------------------------------ -->
<!-- UIntRecordAttribute: -->
<atr n="ClassB.m_Number" t="unsigned int" p="23" l="4">
<!-- ------------------------------ -->
<!-- ULongRecordAttribute: -->
<atr n="ClassB.m_Number" t="unsigned long" p="23" l="4">
<!-- ------------------------------ -->
<!-- UShortRecordAttribute:v
<atr n="ClassB.m_Number" t="unsigned short" p="23" l="4">
<!-- ------------------------------ -->
<!-- StringRecordAttribute: -->
<atr n="OOMyClass.Name" t="string" p="23" f="1234.x" l="3">
ABC
</atr>
<!-- ------------------------------ -->
<!-- BlobRecordAttribute: -->
<atr n="OOMyClass.m_Blob" t="blob" p="23" f="2345.x" l="6">
765863 <!-- Attributewert -->
</atr>
<!-- ------------------------------ -->
<!-- EmbeddedRecordAttribute: -->
<atr n="OOMyClass.m_ClassB" t="embedded" p="23" g="0" l="354">
<oid>6.0.3421</oid>
<ats l="172">
<atr n="glo::Persistent.CreateDate" t="time_t" p="23" l="6">
765863
</atr>
<atr n="glo::Persistent.LastChange" t="time_t" p="23" l="1">
0
</atr>
<atr n="ClassB.m_iNumber" t="int" p="23" l="4">
1234
</atr>
</ats>
<oids len="121">
<atr n="glo::Persistent.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
<atr n="ClassB.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
</oids>
</atr>
<!-- ------------------------------ -->
<!-- PoRefRecordAttribute: -->
<!-- StdShrdPoRefRecordAttribute: -->
<!-- StdUnqPoRefRecordAttribute: -->
<atr n="OOMyClass.m_ClassB" t="pointer" p="23" l="354">
<oid>6.0.3421</oid>
<ats l="172">
<atr n="glo::Persistent.CreateDate" t="time_t" p="23" l="6">
765863
</atr>
<atr n="glo::Persistent.LastChange" t="time_t" p="23" l="1">
0
</atr>
<atr n="ClassB.m_iNumber" t="int" p="23" l="4">
1234
</atr>
</ats>
<oids len="121">
<atr n="glo::Persistent.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
<atr n="ClassB.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
</oids>
</atr>
<!-- ------------------------------ -->
<!-- ObjIDRecordAttribute: -->
<atr n="OOMyClass.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
<!-- ------------------------------ -->
<!-- OdRefListRecordAttribute: -->
<atr n="OOMyClass.ChildList" t="refsetondemand" p="23" l="27">
<e>6.0.3421</e>
<e>6.0.3434</e>
<e>6.0.3465</e>
</atr>
<!-- ------------------------------ -->
<!-- PoRefSetRecordAttribute: -->
<atr n="OOMyClass.ChildList" t="refsetpointer" p="23" l="708">
<e l="354">
<oid>6.0.3421</oid>
<ats l="172">
<atr n="glo::Persistent.CreateDate" t="time_t" p="23" l="6">
765863
</atr>
<atr n="glo::Persistent.LastChange" t="time_t" p="23" l="1">
0
</atr>
<atr n="ClassB.m_iNumber" t="int" p="23" l="4">
1234
</atr>
</ats>
<oids len="121">
<atr n="glo::Persistent.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
<atr n="ClassB.ObjID" t="objid" p="0" l="8">
6.0.3421
</atr>
</oids>
</e>
<e l="354">
<oid>6.0.3422</oid>
<ats l="172">
<atr n="glo::Persistent.CreateDate" t="time_t" p="23" l="6">
765864
</atr>
<atr n="glo::Persistent.LastChange" t="time_t" p="23" l="1">
0
</atr>
<atr n="ClassB.m_iNumber" t="int" p="23" l="4">
5678
</atr>
</ats>
<oids len="121">
<atr n="glo::Persistent.ObjID" t="objid" p="0" l="8">
6.0.3422
</atr>
<atr n="ClassB.ObjID" t="objid" p="0" l="8">
6.0.3422
</atr>
</oids>
</e>
</atr>
<!-- ------------------------------ -->
<!-- StringVectorRecordAttribute: -->
<!-- StringListRecordAttribute: -->
<!-- StringSetRecordAttribute: -->
<atr n="OOMyClass.NameVector" t="vector<string>" p="23" f="2345.txl" l="58">
oder
<atr n="OOMyClass.NameVector" t="list<string>" p="23" f="2345.txl" l="58">
oder
<atr n="OOMyClass.NameVector" t="set<string>" p="23" f="2345.txl" l="58">
<e l="15">
123456789012345
</e>
<e l="15">
ajsddfdhuscwuiw
</e>
</atr>
<!-- ------------------------------ -->
<!-- IntVectorRecordAttribute: -->
<!-- IntListRecordAttribute: -->
<!-- IntSetRecordAttribute: -->
<atr n="OOMyClass.NameVector" t="vector<int>" p="23" f="2345.txl" l="32">
oder
<atr n="OOMyClass.NameVector" t="list<int>" p="23" f="2345.txl" l="32">
oder
<atr n="OOMyClass.NameVector" t="set<int>" p="23" f="2345.txl" l="32">
<e l="3">
123
</e>
<e l="3">
456
</e>
</atr>
<!-- ------------------------------ -->
<!-- DoubleVectorRecordAttribute: -->
<!-- DoubleListRecordAttribute: -->
<!-- DoubleSetRecordAttribute: -->
<atr n="OOMyClass.NameVector" t="vector<double>" p="23" f="2345.txl" l="44">
oder
<atr n="OOMyClass.NameVector" t="list<double>" p="23" f="2345.txl" l="44">
oder
<atr n="OOMyClass.NameVector" t="set<double>" p="23" f="2345.txl" l="44">
<e l="6">
123.04
</e>
<e l="6">
456.98
</e>
</atr>
<!-- ------------------------------ -->
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rAttributeThe data record attribute whose values are to be appended to the eut::Blob passed as XML string.
[in]rReadyRecordMapThe already streamed data records must be passed, so that they are not streamed again completely, but only as object ID.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.
Note
For Glo developers: Is implemented in GloRecordAttributeFunctions.cpp, so that extensions of record attributes can be made there collected.

◆ streamDataRecordInBlob()

std::size_t glo::DataStreamer::streamDataRecordInBlob ( eut::Blob & rBlob,
const Record & rRecord,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap )
private

Streams the record attribute values of the passed Record as XML-string into a passed eut::Blob (without header etc.).

Example structure (here with line break, indents and comments):

<oid>8.0.10908</oid> <!-- ObjectID of the record -->
<ats l="609"> <!-- Attribute list of the record l->Length of the section from the end of the line to '</ats>' -->
<!-- n->Name of the attribute t->Type of the attribute p->file position l->length of section from end of line to '</atr>' -->
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1371785421 <!-- Attribute value -->
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<!-- With embedded or PointerRecords n->Name of the attribute t->Type here pointer g->If generic and l->As before -->
<atr n="Test3.m_pTest" t="pointer" p="0" g="0" l="403">
<oid>6.0.10915</oid>
<ats l="208">
<atr n="glo::Persistent.m_dtCreateDate" t="time_t" p="0" l="10">
1371785930
</atr>
<atr n="glo::Persistent.m_dtLastChange" t="time_t" p="0" l="1">
0
</atr>
<atr n="EmbEmbTest.m_dTest" t="double" p="0" l="3">
123
</atr>
</ats>
<oids l="135">
<atr n="glo::Persistent.m_ObjID" t="objid" p="430" l="9">
6.0.10915
</atr>
<atr n="EmbEmbTest.m_ObjID" t="objid" p="17" l="9">
6.0.10915
</atr>
</oids>
</atr>
</ats>
<!-- ObjID list Structure like attribute list; only with ObjIDs -->
<oids l="129">
<atr n="glo::Persistent.m_ObjID" t="objid" p="31" l="9">
8.0.10908
</atr>
<atr n="Test3.m_ObjID" t="objid" p="17" l="9">
8.0.10908
</atr>
</oids>
Parameters
[in,out]rBlobThe blob to which the XML string is appended.
[in]rRecordThe data record whose attributes are to be appended to the passed eut::Blob as XML string.
[in]rReadyRecordMapThe already streamed data records must be passed, so that they are not streamed again completely, but only as object ID.
Returns
The new size of the passed rBlob.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

Member Data Documentation

◆ m_LocalCriticalSection

eut::CriticalSection glo::DataStreamer::m_LocalCriticalSection
private

To ensure thread-safe access to the elements of the DataStreamer, access is synchronized via this local CriticalSection.


The documentation for this class was generated from the following file: