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

This class is used to handle the communication between the application that uses GlobalObjects and GlobalObjects. More...

#include <GloOrderMsg.h>

Public Types

enum  EnOrderType {
  eUNDEF = 0 , eGET_ALL_BASES , eGET_CLASSINFO_BY_CLASSID , eGET_CLASSINFO_BY_CLASSNAME ,
  eGET_ALL_DEFAULT_LIMITS , eGET_DATATYPE_LIMITS , eGET_SUBCLASS_INFOS , eGET_BASECLASS_INFOS ,
  eGET_ALL_SUBCLASS_INFOS , eGET_ALL_BASECLASS_INFOS , eGET_ALL_CLASS_INFOS , eIS_KNOWN_CLASSID ,
  eIS_SUPER_CLASS_FROM , eGET_ALL_CLIENTS , eOPEN_BASE , eCLOSE_BASE ,
  eASSIGN , eOPEN_ALLSET , eCLOSE_ALLSET , eGET_OBJID_WITH_OBJECT_FROM_ALLSET ,
  eGET_OBJID_FROM_ALLSET , eSET_INDEX_FILTER_BY_SEARCHVALUE_IN_ALLSET , eSET_INDEX_FILTER_BY_COMPARING_IN_ALLSET , eSET_INDEX_FILTER_BY_RANGE_IN_ALLSET ,
  eREMOVE_INDEX_FILTER , eGET_INDEXED_OBJIDS_BY_SEARCHVALUE_FROM_ALLSET , eGET_INDEXED_OBJIDS_BY_COMPARING_FROM_ALLSET , eGET_INDEXED_OBJIDS_BY_RANGE_FROM_ALLSET ,
  eGET_ALLSET_SIZE , eSET_CURRENT_OBJECT_IN_ALLSET , eSET_POSITION_IN_ALLSET , eCHECK_OBJID_IN_ALLSET ,
  eGET , eGET_REC , eREFRESH , eSTORE ,
  eIS_STORED , eDELETE , eLOCK , eUNLOCK ,
  eIS_LOCKED , eIS_ALLOWED , eGET_PROCESSING_POSSIBILITIES , eWATCH_OBJECT ,
  eUNWATCH_OBJECT , eWATCH_CLASS , eUNWATCH_CLASS , eWATCH_CLIENT ,
  eUNWATCH_CLIENT , eWATCH_INDEX_READWRITE , eUNWATCH_INDEX_READWRITE , eBEGIN_TRANSACTION ,
  eCOMMIT_TRANSACTION , eABORT_TRANSACTION , ePROCESS_TRANSACTION , eREINDEX_BASE ,
  eCOMPRESS_BASE , eREPAIR_BASE , eNOTIFY_CLIENT , eNOTIFY_OBJECT_AS_WRITTEN ,
  ePROCESS_NOTIFY , eDELETE_COMMUNICATOR_WATCHES , eNEW_CONNECTED_CLIENT , eDISCONNECTED_CLIENT
}
 
enum  EnSendDirection { eTO_CLIENT_ANSWER , eTO_CLIENT_NOTIFY , eTO_SERVER , eINTERN }
 
enum  EnStreamOrderDataType { eORDERDATA , eRESULTDATA }
 

Public Member Functions

 OrderMsg (const eut::Blob &rBlob, EnStreamOrderDataType eStreamDataType, const std::map< unsigned long, ClassInfo * > *pSchemaInfoMap)
 
 OrderMsg (const std::string &rsSchemaName, Communicator *pCommunicator, EnOrderType eOrderType, void *pOrderObject, void *pOrderResult, void *pFirstAdditionalInfo, void *pSecondAdditionalInfo)
 
 OrderMsg (const std::string &rsSchemaName, EnOrderType eOrderType, void *pOrderObject, void *pFirstAdditionalInfo=NULL_PTR)
 
virtual ~OrderMsg ()
 
void deleteFirstAdditionalInfo ()
 
void deleteOrderObject ()
 
void deleteOrderResult ()
 
void deleteSecondAdditionalInfo ()
 
CommunicatorgetCommunicator () const
 
std::string getCommunicatorClientName () const
 
unsigned int getCommunicatorID () const
 
int getErr () const
 
void * getFirstAdditionalInfo () const
 
unsigned int getOrderMsgID () const
 
void * getOrderObject () const
 
void * getOrderResult () const
 
OrderMsg::EnOrderType getOrderType () const
 
std::string getOrderTypeAsStr () const
 
std::string getSchemaName () const
 
void * getSecondAdditionalInfo () const
 
OrderMsg::EnSendDirection getSendDirection () const
 
NUM_PTR getThreadID () const
 
bool isProcessed ()
 
void * ReleaseOrderResult ()
 
void setCommunicator (Communicator *pCommunicator)
 
void setErr (int iErr)
 
void setFirstAdditionalInfo (void *pFirstAdditionalInfo)
 
void setOrderMsgID (unsigned int uiID)
 
void setOrderObject (void *pOrderObject)
 
void setOrderResult (void *pOrderResult)
 
void setSecondAdditionalInfo (void *pSecondAdditionalInfo)
 
void setSendDirection (EnSendDirection eSendDirection)
 
void setThreadID (NUM_PTR ipThreadID)
 
int streamBlobInOrder (const eut::Blob &rBlob, EnStreamOrderDataType eStreamOrderDataType, const std::map< unsigned long, ClassInfo * > *pSchemaInfoMap)
 
void streamOrderInBlob (eut::Blob &rBlob, EnStreamOrderDataType eStreamOrderDataType) const
 
virtual std::string toString () const
 
bool willDestroyOrderObjectInDTor () const
 

Static Public Member Functions

static std::string getOrderTypeAsString (EnOrderType eOrderType)
 

Public Attributes

std::string m_strStatus
 

Protected Member Functions

 OrderMsg ()
 
template<typename T >
int addStreamData0terminated (eut::Blob &rBlob, const T tData) const
 
int addStreamDataType (eut::Blob &rBlob, void *pData, EnStreamDataType eStreamDataType, std::map< ObjID, ObjID, std::less< ObjID > > &rReadyRecordMap) const
 
void deleteFirstAdditionalInfo (OrderMsg::EnOrderType eOrderType)
 
void deleteOrderObject (OrderMsg::EnOrderType eOrderType)
 
void deleteOrderResult (OrderMsg::EnOrderType eOrderType)
 
void deleteSecondAdditionalInfo (OrderMsg::EnOrderType eOrderType)
 
int setDataFromStream (const eut::Blob &rBlob, std::size_t &rnCurrentBlobPosition, std::size_t &rnBlobPosition, void *&prData, EnStreamDataType eStreamDataType, const std::map< unsigned long, ClassInfo * > *pSchemaInfoMap)
 

Private Types

enum  EnStreamDataType {
  eUNDEF_DATATYPE = 0 , eALLSET_ITER_RESULT , eALLSET_STRUCT , eBOOL ,
  eCLASSINFO , eCLASSINFO_MAP , eCLIENTINFO_VECTOR , eCLIENTONFO ,
  eCOMPARISION_QUERRY_STRUCT , eDATATYPE , eDATATYPELIMITS , eDATATYPELIMITS_VECTOR ,
  eFLOAT , eLOCKSPEC_STRUCT , eNOTIFYNOTE_STRUCT , eOBJID ,
  eOBJID_LIST , eOPENSPEC_STRUCT , eQUERRY_STRUCT , eRANGE_QUERRY_STRUCT ,
  eRECORD , eRECORD_LIST , eRECORD_MAP , eSIGNED ,
  eSTRING , eSTRING_VECTOR , eUNSIGNED_INT , eUNSIGNED_INTPTR ,
  eUNSIGNED_LONG , eUNSIGNED_SIZE , eWATCHSPEC_STRUCT
}
 

Private Member Functions

 OrderMsg (const OrderMsg &)
 
OrderMsgoperator= (const OrderMsg &)
 

Private Attributes

bool m_bDestroyOrderObject
 
bool m_bFirstAdditionalInfoModified
 
bool m_bOrderObjectModified
 
bool m_bProcessed
 
bool m_bSecondAdditionalInfoModified
 
OrderMsg::EnSendDirection m_eDirection
 
OrderMsg::EnOrderType m_eOrderType
 
int m_iErr
 
NUM_PTR m_ipThreadID
 
Communicatorm_pCommunicator
 
void * m_pFirstAdditionalInfo
 
void * m_pOrderObject
 
void * m_pOrderResult
 
void * m_pSecondAdditionalInfo
 
std::string m_sCommunicatorClientName
 
std::string m_sSchemaName
 
unsigned int m_uiCommunicatorID
 
unsigned int m_uiID
 

Friends

class CommunicaterThread
 

Detailed Description

This class is used to handle the communication between the application that uses GlobalObjects and GlobalObjects.

The OrderMsg is used to transport queries, requests to the database and their results.

Author
Helmut Jakoby

Member Enumeration Documentation

◆ EnOrderType

The order type. If extended, adjust method OrderMsg::getOrderTypeAsString( EnOrderType )!

Enumerator
eUNDEF 

Undefined.

eGET_ALL_BASES 

Order: Return all database names.
m_pOrderObject = int (Dummy)
m_pOrderResult = vector<std::string>
m_pFirstAdditionalInfo = NULL_PTR

eGET_CLASSINFO_BY_CLASSID 

Order: Return the class information of a class by the passed Class-ID.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = ClassInfo
m_pFirstAdditionalInfo = NULL_PTR

eGET_CLASSINFO_BY_CLASSNAME 

Order: Return the class information of a class by the passed Classname.
m_pOrderObject = std::string (Clientname)
m_pOrderResult = ClassInfo
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALL_DEFAULT_LIMITS 

Order: Return all attribute limits.
m_pOrderObject = int (Dummy)
m_pOrderResult = vector<LimitRecord>
m_pFirstAdditionalInfo = NULL_PTR

eGET_DATATYPE_LIMITS 

Order: Return the limits of an attribute.
m_pOrderObject = ClassInfoAttribute::Type
m_pOrderResult = LimitRecord
m_pFirstAdditionalInfo = NULL_PTR

eGET_SUBCLASS_INFOS 

Order: Return the class information of the direct subclasses of a class.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = std::map< unsigned long, ClassInfo *, std::less<unsigned long> >
m_pFirstAdditionalInfo = NULL_PTR

eGET_BASECLASS_INFOS 

Order: Return the class information of the direct superclasses of a class.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = std::map< unsigned long, ClassInfo *, std::less<unsigned long> >
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALL_SUBCLASS_INFOS 

Order: Return the class information of all subclasses of a class.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = std::map< unsigned long, ClassInfo *, std::less<unsigned long> >
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALL_BASECLASS_INFOS 

Order: Return the class information of all superclasses of a class.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = std::map< unsigned long, ClassInfo *, std::less<unsigned long> >
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALL_CLASS_INFOS 

Order: Return all class information.
m_pOrderObject = unsigned long (Dummy)
m_pOrderResult = std::map< unsigned long, ClassInfo *, std::less<unsigned long> >
m_pFirstAdditionalInfo = NULL_PTR

eIS_KNOWN_CLASSID 

Order: Check if a class id is known in the database.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = bool
m_pFirstAdditionalInfo = NULL_PTR

eIS_SUPER_CLASS_FROM 

Order: Check if a class is superclass of another class.
m_pOrderObject = ObjID (ObjID::m_ulClassID -> super class id, ObjID::m_ulBaseID -> sub class id)
m_pOrderResult = bool
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALL_CLIENTS 

Order: Return all clients that have opened a database or in server mode connected to the GloServer.
m_pOrderObject = int (Dummy)
m_pOrderResult = std::vector< ClientInfo >
m_pFirstAdditionalInfo = std::string (Databasename)

eOPEN_BASE 

Order: Open the database.
m_pOrderObject = std::string (Clientname)
m_pOrderResult = unsigned int ClientID || CommunicatorID
m_pFirstAdditionalInfo = OpenSpecification

eCLOSE_BASE 

Order: Close the database.
m_pOrderObject = unsigned int (ClientID) || CommunicatorID
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eASSIGN 

Job: Registrate the object of a class in the database and returns the object ID.

eOPEN_ALLSET 

Order: Open an AllSet.
m_pOrderObject = AllSetStruct
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eCLOSE_ALLSET 

Order: Close an AllSet.
m_pOrderObject = AllSetStruct
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eGET_OBJID_WITH_OBJECT_FROM_ALLSET 

Order: Return an object ID and the object from an AllSet.
m_pOrderObject = AllSetStruct
m_pOrderResult = AllSetIteratorResult
m_pFirstAdditionalInfo = between for transfer a ReaderInfo

eGET_OBJID_FROM_ALLSET 

Order: Return an object ID from an AllSet.
m_pOrderObject = AllSetStruct
m_pOrderResult = ObjID
m_pFirstAdditionalInfo = NULL_PTR

eSET_INDEX_FILTER_BY_SEARCHVALUE_IN_ALLSET 

Order: Set an index filter in an AllSet.
m_pOrderObject = IndexQueryStruct
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eSET_INDEX_FILTER_BY_COMPARING_IN_ALLSET 

Order: Set an index filter in an AllSet.
m_pOrderObject = ComparisionIndexQueryStruct
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eSET_INDEX_FILTER_BY_RANGE_IN_ALLSET 

Order: Set an index filter in an AllSet.
m_pOrderObject = RangeIndexQueryStruct
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eREMOVE_INDEX_FILTER 

Order: Remove a possibly existing index filter in AllSet.
m_pOrderObject = NUM_PTR, Address of the AllSet, no delete!
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eGET_INDEXED_OBJIDS_BY_SEARCHVALUE_FROM_ALLSET 

Order: Return object IDs from index query from AllSet.
m_pOrderObject = IndexQueryStruct
m_pOrderResult = std::list<ObjID>
m_pFirstAdditionalInfo = NULL_PTR

eGET_INDEXED_OBJIDS_BY_COMPARING_FROM_ALLSET 

Order: Return object IDs from index query from AllSet.
m_pOrderObject = ComparisionIndexQueryStruct
m_pOrderResult = std::list<ObjID>
m_pFirstAdditionalInfo = NULL_PTR

eGET_INDEXED_OBJIDS_BY_RANGE_FROM_ALLSET 

Order: Return object IDs from index query from AllSet.
m_pOrderObject = RangeIndexQueryStruct
m_pOrderResult = std::list<ObjID>
m_pFirstAdditionalInfo = NULL_PTR

eGET_ALLSET_SIZE 

Order: Return number of objects in an AllSet.
m_pOrderObject = AllSetStruct
m_pOrderResult = size_t
m_pFirstAdditionalInfo = NULL_PTR

eSET_CURRENT_OBJECT_IN_ALLSET 

Order: Set the position pointer to the object with an object ID in an AllSet.
m_pOrderObject = ObjID
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NUM_PTR, Address of the AllSet

eSET_POSITION_IN_ALLSET 

Order: Set the position pointer in an AllSet.
m_pOrderObject = size_t (Position)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NUM_PTR, Address of the AllSet

eCHECK_OBJID_IN_ALLSET 

Order: Check whether object ID is in AllSet.
m_pOrderObject = ObjID
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NUM_PTR, Address of the AllSet

eGET 

Order: Return a complete record of an object with an object ID from the database.
m_pOrderObject = ObjID
m_pOrderResult = Record (neu)
m_pFirstAdditionalInfo = in between for transfer a ReaderInfo

eGET_REC 

Order: Return a record of the object with an object ID from the database.
m_pOrderObject = ObjID
m_pOrderResult = Record (new)
m_pFirstAdditionalInfo = -> unsigned long ClassID, between for transfer a ReaderInfo

eREFRESH 

Order: Refresh a record of an object with an object ID from the database.
m_pOrderObject = ObjID
m_pOrderResult = Record (new)

eSTORE 

Order: Store records in the database.
m_pOrderObject = std::map< ObjID, Record *, std::less<ObjID> >
m_pOrderResult = std::list< Record * > (new)
m_pFirstAdditionalInfo = unsigned int (EnDeepMode)

eIS_STORED 

Order: Check if object with an object ID is stored in the database.
m_pOrderObject = ObjID
m_pOrderResult = bool
m_pFirstAdditionalInfo = NULL_PTR

eDELETE 

Order: Delete records in the database.
m_pOrderObject = std::map< ObjID, Record *, std::less<ObjID> >
m_pOrderResult = std::list<Record*> (neu)
m_pFirstAdditionalInfo = int (EnDeepMode)

eLOCK 

Order: Lock objects with object ID in the database.
m_pOrderObject = std::list<ObjID> br> m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = LockSpecification

eUNLOCK 

Order: Unlock objects with object ID in the database.
m_pOrderObject = std::list<ObjID> br> m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = LockSpecification

eIS_LOCKED 

Order: Check if objects with object ID are locked in database.
m_pOrderObject = std::list<ObjID> br> m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = LockSpecification

eIS_ALLOWED 

Order: Check specific action allowed with objects with object ID in database (regarding locks).
m_pOrderObject = std::list<ObjID> br> m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = LockSpecification

eGET_PROCESSING_POSSIBILITIES 

Order: Deliver allowed actions that are allowed with objects with object ID in the database (in terms of locks)
m_pOrderObject = std::list<ObjID>
m_pOrderResult = unsigned long (Bit 1 = Read, Bit 2 = Write, Bit 3 = Delete)
m_pFirstAdditionalInfo = LockSpecification

eWATCH_OBJECT 

Order: Watch the objects with object ID in the database and notify.
m_pOrderObject = std::list<ObjID>
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eUNWATCH_OBJECT 

Order: End the watching of objects with object ID in the database.
m_pOrderObject = std::list<ObjID>
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eWATCH_CLASS 

Order: Watch an AllSet in the database and notify.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eUNWATCH_CLASS 

Order: End the watching of an AllSet in the database.
m_pOrderObject = unsigned long (ClassID)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eWATCH_CLIENT 

Order: Watch the login to a GloServer and the opening of a database of clients and notify.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eUNWATCH_CLIENT 

Order: End watching of clients.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eWATCH_INDEX_READWRITE 

Order: Watch the re-indexing of a database and notify.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eUNWATCH_INDEX_READWRITE 

Order: End the monitoring of the reindexing of a database.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = WatchSpecification

eBEGIN_TRANSACTION 

Order: Begin transaction.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eCOMMIT_TRANSACTION 

Order: Commit transaction and perform actions.
m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eABORT_TRANSACTION 

Order: Abort transaction and do not perform actions.

m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

ePROCESS_TRANSACTION 

Order: Only used internally in Manager, processes a transaction.

m_pOrderObject = TransactionManager::CommunicatorTransactionStack *
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eREINDEX_BASE 

Order: Reindex the database.

m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eCOMPRESS_BASE 

Order: Compresses the database.

m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eREPAIR_BASE 

Order: Repair the database.

m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eNOTIFY_CLIENT 

Order: Only used internally in Manager, initiates notifications to clients.

m_pOrderObject = NULL_PTR
m_pOrderResult = NotifyNote
m_pFirstAdditionalInfo = NULL_PTR

eNOTIFY_OBJECT_AS_WRITTEN 

Order: Report objects of a persistent class as changed in the database.

m_pOrderObject = std::list<ObjID> br> m_pOrderResult = NULL_PTR m_pFirstAdditionalInfo = NULL_PTR

ePROCESS_NOTIFY 

Order: Used by the Manager, LockManager and TableReaderInterface to instruct the WatchNotifyManager to notify clients that something has happened

m_pOrderObject = WatchNotifyManager::NotifyInfo
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eDELETE_COMMUNICATOR_WATCHES 

Order: Used by the Manager to order the WatchNotifyManager to remove all outstanding watches of a communicator.

m_pOrderObject = int (Dummy)
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eNEW_CONNECTED_CLIENT 

Order: Only used internally by GloServer to inform Manager that a new client has connected to the GloServer.

m_pOrderObject = ClientInfo
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

eDISCONNECTED_CLIENT 

Auftrag: Wird nur intern vom GloServer genutzt, um den Manager zu informieren, dass sich ein Client beim GloServer abgemeldet hat.

m_pOrderObject = ClientInfo
m_pOrderResult = NULL_PTR
m_pFirstAdditionalInfo = NULL_PTR

◆ EnSendDirection

The order has a send direction, which is marked with this enumeration.

Enumerator
eTO_CLIENT_ANSWER 

The order is a response or a result to the client.

eTO_CLIENT_NOTIFY 

The order is a notification to the client.

eTO_SERVER 

An order to the GloServer.

eINTERN 

An internal order e.g. from GloServer to Manager.

◆ EnStreamDataType

Indicates the type of the order or result data.

Enumerator
eUNDEF_DATATYPE 

undefined

eALLSET_ITER_RESULT 

AllSetIteratorResult

eALLSET_STRUCT 

AllSetStruct *

eBOOL 

bool

eCLASSINFO 

ClassInfo *

eCLASSINFO_MAP 

std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *

eCLIENTINFO_VECTOR 

std::vector<ClientInfo>

eCLIENTONFO 

ClientInfo

eCOMPARISION_QUERRY_STRUCT 

ComparisionIndexQueryStruct *

eDATATYPE 

ClassInfoAttribute::Type *

eDATATYPELIMITS 

LimitRecord *

eDATATYPELIMITS_VECTOR 

std::vector< LimitRecord > *

eFLOAT 

double

eLOCKSPEC_STRUCT 

LockSpecification *

eNOTIFYNOTE_STRUCT 

NotifyNote *

eOBJID 

ObjID *

eOBJID_LIST 

std::list< ObjID > *

eOPENSPEC_STRUCT 

OpenSpecification *

eQUERRY_STRUCT 

IndexQueryStruct *

eRANGE_QUERRY_STRUCT 

RangeIndexQueryStruct *

eRECORD 

Record

eRECORD_LIST 

std::list< Record * > *

eRECORD_MAP 

std::map< ObjID, Record *, std::less<ObjID> *

eSIGNED 

int

eSTRING 

std::string

eSTRING_VECTOR 

std::vector<std::string> *

eUNSIGNED_INT 

unsigned int

eUNSIGNED_INTPTR 

NUM_PTR

eUNSIGNED_LONG 

unsigned long

eUNSIGNED_SIZE 

size_t

eWATCHSPEC_STRUCT 

. WatchSpecification *

◆ EnStreamOrderDataType

Orders are sent with the order data by an ordering instance. The same order is usually used to send the result data back to the ordering instance, then the status changes from eORDERDATA to eRESULTDATA.

Enumerator
eORDERDATA 

The order is not yet processed, has order data.

eRESULTDATA 

The order is processed, has result data.

Constructor & Destructor Documentation

◆ OrderMsg() [1/5]

glo::OrderMsg::OrderMsg ( )
protected

The standard constructor is not available.

◆ OrderMsg() [2/5]

glo::OrderMsg::OrderMsg ( const std::string & rsSchemaName,
Communicator * pCommunicator,
EnOrderType eOrderType,
void * pOrderObject,
void * pOrderResult,
void * pFirstAdditionalInfo,
void * pSecondAdditionalInfo )

Constructor with parameter passing. Instantiates an order with either order or result data and optional additional information data.

Parameters
[in]rsSchemaNameThe schema name or the database name to which the order applies.
[in]pCommunicatorThe requesting communicator.
[in]eOrderTypeThe order type.
[in]pOrderObjectRaw pointer to the order data (types see m_pOrderObject).
[in]pOrderResultRaw pointer to the result data (types see m_pOrderResult).
[in]pFirstAdditionalInfoRaw pointer to a first additional information (optional).
[in]pSecondAdditionalInfoRaw pointer to a second additional information (optional).
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.
Attention
pOrderObject, pOrderResult, pFirstAdditionalInfo and pSecondAdditionalInfo become property of OrderMsg. This means that the passing instance must not remove these objects from memory.

◆ OrderMsg() [3/5]

glo::OrderMsg::OrderMsg ( const std::string & rsSchemaName,
EnOrderType eOrderType,
void * pOrderObject,
void * pFirstAdditionalInfo = NULL_PTR )

Constructor with parameter passing. Instantiates an order with order data. Since without communicator, for 'internal' use and not for communication between client and server resp. database.

Parameters
[in]rsSchemaNameThe schema name or the database name to which the order applies.
[in]eOrderTypeThe order type.
[in]pOrderObjectRaw pointer to the order data (types see m_pOrderObject).
[in]pFirstAdditionalInfoRaw pointer to additional information.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.
Attention
pOrderObject and pFirstAdditionalInfo become property of OrderMsg. This means that the passing instance must not remove these objects from memory.

◆ OrderMsg() [4/5]

glo::OrderMsg::OrderMsg ( const eut::Blob & rBlob,
EnStreamOrderDataType eStreamDataType,
const std::map< unsigned long, ClassInfo * > * pSchemaInfoMap )

Constructor with parameter passing. Sets the attributes from the passed blob.

Parameters
[in]rBlobThe order as blob.
[in]eStreamDataTypeOrder or result.
[in]pSchemaInfoMapThe class information must be passed in order to build data sets.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ ~OrderMsg()

virtual glo::OrderMsg::~OrderMsg ( )
virtual

Destroyer. If present, m_pOrderObject (see also m_bDestroyOrderObject), m_pOrderResult and m_pFirstAdditionalInfo are removed from memory.

◆ OrderMsg() [5/5]

glo::OrderMsg::OrderMsg ( const OrderMsg & )
private

The copy constructor is not available.

Member Function Documentation

◆ addStreamData0terminated()

template<typename T >
int glo::OrderMsg::addStreamData0terminated ( eut::Blob & rBlob,
const T tData ) const
protected

Appends a value as a 0-terminated string to the passed blob.

Parameters
[in,out]rBlobThe blob to be extended.
[in]tDataThe value to append.
Returns
A return value < 0 indicates an error.

◆ addStreamDataType()

int glo::OrderMsg::addStreamDataType ( eut::Blob & rBlob,
void * pData,
EnStreamDataType eStreamDataType,
std::map< ObjID, ObjID, std::less< ObjID > > & rReadyRecordMap ) const
protected

Help method for OrderMsg::streamOrderInBlob (...); appends data to the passed blob.

Parameters
[in,out]rBlobThe blob to be extended.
[in]pDataThe value to append; is casted depending on the passed OrderMsg::EnStreamDataType.
[in]eStreamDataTypeThe type of the value to append.
[in]rReadyRecordMapA map with object IDs that are already in the blob.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ deleteFirstAdditionalInfo() [1/2]

void glo::OrderMsg::deleteFirstAdditionalInfo ( )

Deletes the first additional info, if set, from memory.

See also
m_pFirstAdditionalInfo

◆ deleteFirstAdditionalInfo() [2/2]

void glo::OrderMsg::deleteFirstAdditionalInfo ( OrderMsg::EnOrderType eOrderType)
protected

Deletes the first additional info, if set, from memory.

Parameters
[in]eOrderTypeThe additional info corresponding to the order type is casted and then deleted.
See also
m_pFirstAdditionalInfo

◆ deleteOrderObject() [1/2]

void glo::OrderMsg::deleteOrderObject ( )

Deletes the order data, if set, from memory.

See also
m_pOrderObject

◆ deleteOrderObject() [2/2]

void glo::OrderMsg::deleteOrderObject ( OrderMsg::EnOrderType eOrderType)
protected

Deletes the order data, if set, from memory.

Parameters
[in]eOrderTypeThe order data corresponding to the order type is casted and then deleted.
See also
m_pOrderObject

◆ deleteOrderResult() [1/2]

void glo::OrderMsg::deleteOrderResult ( )

Deletes the result data, if set, from memory.

See also
m_pOrderResult

◆ deleteOrderResult() [2/2]

void glo::OrderMsg::deleteOrderResult ( OrderMsg::EnOrderType eOrderType)
protected

Deletes the result data, if set, from memory.

Parameters
[in]eOrderTypeThe result data corresponding to the order type is casted and then deleted.
See also
m_pOrderResult

◆ deleteSecondAdditionalInfo() [1/2]

void glo::OrderMsg::deleteSecondAdditionalInfo ( )

Deletes the second additional info, if set, from memory.

See also
m_pFirstAdditionalInfo

◆ deleteSecondAdditionalInfo() [2/2]

void glo::OrderMsg::deleteSecondAdditionalInfo ( OrderMsg::EnOrderType eOrderType)
protected

Deletes the second additional info, if set, from memory.

Parameters
[in]eOrderTypeThe additional info corresponding to the order type is casted and then deleted.
See also
m_pSecondAdditionalInfo

◆ getCommunicator()

Communicator * glo::OrderMsg::getCommunicator ( ) const

Returns a pointer to the referenced communicator.

Returns
See above.
See also
m_sCommunicatorClientName

◆ getCommunicatorClientName()

std::string glo::OrderMsg::getCommunicatorClientName ( ) const

Returns communicator name.

Returns
See above.
See also
m_uiCommunicatorID

◆ getCommunicatorID()

unsigned int glo::OrderMsg::getCommunicatorID ( ) const

Returns communicator client ID.

Returns
See above.
See also
m_pCommunicator

◆ getErr()

int glo::OrderMsg::getErr ( ) const

Returns the error code.

Returns
See above.
See also
m_iErr

◆ getFirstAdditionalInfo()

void * glo::OrderMsg::getFirstAdditionalInfo ( ) const

Returns a raw pointer to a possibly existing first additional information.

Returns
See above.
Attention
If returned, the calling instance must not remove the object from memory.
See also
m_pFirstAdditionalInfo

◆ getOrderMsgID()

unsigned int glo::OrderMsg::getOrderMsgID ( ) const

Returns the unique order number.

Returns
See above.
See also
m_uiID

◆ getOrderObject()

void * glo::OrderMsg::getOrderObject ( ) const

Returns a raw pointer to possible existing order data.

Returns
See above.
Attention
If supplied, the calling instance must not remove the order data from memory.
See also
m_pOrderObject

◆ getOrderResult()

void * glo::OrderMsg::getOrderResult ( ) const

Returns a raw pointer to possibly existing result data.

Returns
See above.
Attention
If returned, the calling instance must not remove the result data from memory.
See also
m_pOrderResult

◆ getOrderType()

OrderMsg::EnOrderType glo::OrderMsg::getOrderType ( ) const

Returns the order type.

Returns
See above.
See also
m_eOrderType

◆ getOrderTypeAsStr()

std::string glo::OrderMsg::getOrderTypeAsStr ( ) const

Returns the order type as string.

Returns
See above.

◆ getOrderTypeAsString()

static std::string glo::OrderMsg::getOrderTypeAsString ( EnOrderType eOrderType)
static

Returns the order type as string.

Parameters
[in]eOrderTypeThe order type.
Returns
The order type as string.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ getSchemaName()

std::string glo::OrderMsg::getSchemaName ( ) const

Returns the schema name.

Returns
See above.
See also
m_sSchemaName

◆ getSecondAdditionalInfo()

void * glo::OrderMsg::getSecondAdditionalInfo ( ) const

Returns a raw pointer to a possibly existing second additional information.

Returns
See above.
Attention
If returned, the calling instance must not remove the object from memory.
See also
m_pFirstAdditionalInfo

◆ getSendDirection()

OrderMsg::EnSendDirection glo::OrderMsg::getSendDirection ( ) const

Returns the send direction.

Returns
The send direction.
See also
m_eDirection

◆ getThreadID()

NUM_PTR glo::OrderMsg::getThreadID ( ) const

Returns the ThreadID of the creator of the order.

Returns
See above.
See also
m_ipThreadID

◆ isProcessed()

bool glo::OrderMsg::isProcessed ( )

Checks whether the order has been processed.

Returns
If true, the order was processed.
See also
m_bProcessed

◆ operator=()

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

The assignment operator is not available.

◆ ReleaseOrderResult()

void * glo::OrderMsg::ReleaseOrderResult ( )

Returns a raw pointer to the result data, if set.

Returns
The raw pointer to the result data.
Note
After calling this method, the reference to the result data is set to NULL_PTR
Attention
If delivered, the responsibility for the result data passes to the calling instance. The calling instance must remove the delivered result data from memory.
See also
m_pOrderResult

◆ setCommunicator()

void glo::OrderMsg::setCommunicator ( Communicator * pCommunicator)

Sets the communicator.

Parameters
[in]pCommunicatorThe communicator.
Attention
The communicator must not be removed from memory during the lifetime of this object.
See also
m_pCommunicator

◆ setDataFromStream()

int glo::OrderMsg::setDataFromStream ( const eut::Blob & rBlob,
std::size_t & rnCurrentBlobPosition,
std::size_t & rnBlobPosition,
void *& prData,
EnStreamDataType eStreamDataType,
const std::map< unsigned long, ClassInfo * > * pSchemaInfoMap )
protected

Help method for OrderMsg::streamBlobInOrder (...); parses the blob passed and sets m_pOrderObject, m_pOrderResult or m_pFirstAdditionalInfo.

Parameters
[in,out]rBlobThe blob to be evaluated.
[in,out]rnCurrentBlobPositionThe current pointer in the blob.
[in,out]rnBlobPositionThe resulting pointer in the blob.
[in,out]prDataRaw pointer to m_pOrderObject, m_pOrderResult or m_pFirstAdditionalInfo. This is where the data comes in.
[in]eStreamDataTypeThe type of the value to be determined.
[in]pSchemaInfoMapThe class information must be passed in order to be able to build records.
Returns
A return value < 0 indicates an error.
Exceptions
eut::ErrorNExceptionIn case of an unrecoverable error an exception is thrown.

◆ setErr()

void glo::OrderMsg::setErr ( int iErr)

Sets the error code.

Parameters
[in]iErrThe error code.
See also
m_iErr

◆ setFirstAdditionalInfo()

void glo::OrderMsg::setFirstAdditionalInfo ( void * pFirstAdditionalInfo)

Sets the first additional information.

Parameters
[in]pFirstAdditionalInfoThe first additional information.
Attention
The additional information becomes property of OrderMsg. This means that the passing instance must not remove the passed additional information from memory. Any previously existing additional information is removed from memory.
See also
m_pFirstAdditionalInfo

◆ setOrderMsgID()

void glo::OrderMsg::setOrderMsgID ( unsigned int uiID)

Sets the unique job number.

Parameters
[in]uiIDThe unique job number.
See also
m_uiID

◆ setOrderObject()

void glo::OrderMsg::setOrderObject ( void * pOrderObject)

Sets the job data new.

Parameters
[in]pOrderObjectRaw pointer to the order data (types see m_pOrderObject).
Attention
The order data becomes property of OrderMsg. This means that the passing instance must not remove the order data from memory. If there is any previously existing order data it will be removed from memory.
This method may only be called once; see attribute m_bOrderObjectModified.
See also
m_pOrderObject

◆ setOrderResult()

void glo::OrderMsg::setOrderResult ( void * pOrderResult)

Sets the result data.

Parameters
[in]pOrderResultRaw pointer to the result data (types see m_pOrderResult).
Attention
The result data becomes property of OrderMsg. This means that the passing instance must not remove the result data from memory. Any previously existing result data will be removed from memory.
See also
m_pOrderResult

◆ setSecondAdditionalInfo()

void glo::OrderMsg::setSecondAdditionalInfo ( void * pSecondAdditionalInfo)

Sets the second additional information.

Parameters
[in]pSecondAdditionalInfoThe second additional information.
Attention
The additional information becomes property of OrderMsg. This means that the passing instance must not remove the passed additional information from memory. Any previously existing additional information is removed from memory.
See also
m_pSecondAdditionalInfo

◆ setSendDirection()

void glo::OrderMsg::setSendDirection ( EnSendDirection eSendDirection)

Sets the sending direction.

Parameters
[in]eSendDirectionThe send direction.
See also
m_eDirection

◆ setThreadID()

void glo::OrderMsg::setThreadID ( NUM_PTR ipThreadID)

Sets the ThreadID of the creator of the order.

Parameters
[in]ipThreadIDThe ThreadID.
See also
m_ipThreadID

◆ streamBlobInOrder()

int glo::OrderMsg::streamBlobInOrder ( const eut::Blob & rBlob,
EnStreamOrderDataType eStreamOrderDataType,
const std::map< unsigned long, ClassInfo * > * pSchemaInfoMap )

Sets its data from passed blob.

Parameters
[in]rBlobThe blob with the data.
[in]eStreamOrderDataTypeOrder or result.
[in]pSchemaInfoMapThe class information must be passed in order to build records.
Returns
A return value < 0 indicates an error.
See also
DataStreamer::streamBlobInData (...)

◆ streamOrderInBlob()

void glo::OrderMsg::streamOrderInBlob ( eut::Blob & rBlob,
EnStreamOrderDataType eStreamOrderDataType ) const

Fills a passed blob with its data.

Parameters
[in,out]rBlobThe blob to be filled.
[in]eStreamOrderDataTypeOrder or result.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.
Attention
The passed blob is not reinitialized, but the own data is appended additionally.
See also
DataStreamer::streamDataInBlob (...)

◆ toString()

virtual std::string glo::OrderMsg::toString ( ) const
virtual

◆ willDestroyOrderObjectInDTor()

bool glo::OrderMsg::willDestroyOrderObjectInDTor ( ) const

Returns m_bDestroyOrderObject.

Returns
If false, the order data in the destructor is not destroyed.
See also
m_bDestroyOrderObject

Friends And Related Symbol Documentation

◆ CommunicaterThread

friend class CommunicaterThread
friend

Member Data Documentation

◆ m_bDestroyOrderObject

bool glo::OrderMsg::m_bDestroyOrderObject
private

Usually the object behind m_pOrderObject in the destructor is removed from memory. This attribute is true by default. If false, m_pOrderObject will not be removed from memory in the destructor.

See also
OrderMsg::setDestroyOrderObjectInDTor (...)

◆ m_bFirstAdditionalInfoModified

bool glo::OrderMsg::m_bFirstAdditionalInfoModified
private

An additional information can be changed once during the existence of the order. In order for OrderMsg::deleteFirstAdditionalInfo() to know what to delete, this attribute is automatically set in OrderMsg::setFirstAdditionalInfo (...).

◆ m_bOrderObjectModified

bool glo::OrderMsg::m_bOrderObjectModified
private

An order object can be changed once during the existence of the order. In order for OrderMsg::deleteOrderObject() to know what to delete, this attribute is automatically set in OrderMsg::setOrderObject (...).

◆ m_bProcessed

bool glo::OrderMsg::m_bProcessed
private

Becomes true when the order is processed.

◆ m_bSecondAdditionalInfoModified

bool glo::OrderMsg::m_bSecondAdditionalInfoModified
private

An additional information can be changed once during the existence of the order. In order for OrderMsg::deleteSecondAdditionalInfo() to know what to delete, this attribute is automatically set in OrderMsg::setSecondAdditionalInfo (...).

◆ m_eDirection

OrderMsg::EnSendDirection glo::OrderMsg::m_eDirection
private

Send direction.

◆ m_eOrderType

OrderMsg::EnOrderType glo::OrderMsg::m_eOrderType
private

The order type.

◆ m_iErr

int glo::OrderMsg::m_iErr
private

An error code; usually set in the 'answer'.

◆ m_ipThreadID

NUM_PTR glo::OrderMsg::m_ipThreadID
private

The thread ID of the creator of the job.

◆ m_pCommunicator

Communicator* glo::OrderMsg::m_pCommunicator
private

For the callback, when the order is completed or the recipient for a notification.

◆ m_pFirstAdditionalInfo

void* glo::OrderMsg::m_pFirstAdditionalInfo
private

Raw pointer to first additional information. Possible types:
int
LockSpecification
long
OpenSpecification
ReaderInfo
std::string
WatchSpecification
/sa m_pSecondAdditionalInfo

◆ m_pOrderObject

void* glo::OrderMsg::m_pOrderObject
private

Raw pointer to the order data .

Possible types:
AllSetStruct
ClassInfoAttribute::Type
ObjID
TransactionManager::CommunicatorTransactionStack
WatchNotifyManager::NotifyInfo
int
std::list< Manager::ObjIdWithDepends * >
std::list<ObjID>
std::list<ObjID>
std::map< ObjID, Record *, std::less<ObjID> >
std::string
unsigned long

See also
OrderMsg::EnOrderType

◆ m_pOrderResult

void* glo::OrderMsg::m_pOrderResult
private

Raw pointer to the result data.

Possible types:
bool ClassInfo LimitRecord NotifyNote ObjID Record std::list<Record*> std::map< unsigned long, ClassInfo *, std::less<unsigned long> > std::vector<ClientInfo> std::vector<LimitRecord> std::vector<std::string> unsigned long ClientInfo

See also
OrderMsg::EnOrderType

◆ m_pSecondAdditionalInfo

void* glo::OrderMsg::m_pSecondAdditionalInfo
private

Raw pointer to second additional information.

See also
m_pFirstAdditionalInfo

◆ m_sCommunicatorClientName

std::string glo::OrderMsg::m_sCommunicatorClientName
private

Each communicator can have a name. Because the communicator may no longer be valid, the name is recorded here again.

◆ m_sSchemaName

std::string glo::OrderMsg::m_sSchemaName
private

The schema name or the database name for which the order is.

◆ m_strStatus

std::string glo::OrderMsg::m_strStatus

Here you can write something in for debug purposes.

◆ m_uiCommunicatorID

unsigned int glo::OrderMsg::m_uiCommunicatorID
private

Each communicator can have a name. Because the communicator may no longer be valid, the ID is recorded here again.

◆ m_uiID

unsigned int glo::OrderMsg::m_uiID
private

Each order gets a unique order number. This is necessary to assign a response with the same order number to an order.


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