GlobalObjects
Loading...
Searching...
No Matches
glo::IndexPool::ObjStrIdTuple Class Reference

Class to manage objects in the IndexPool::ObjectStrIndex. More...

#include <GloIndexPool.h>

Public Member Functions

 ObjStrIdTuple ()
 
 ObjStrIdTuple (const ObjStrIdTuple &rT)
 
 ObjStrIdTuple (const std::string &rsIndex, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
 
virtual ~ObjStrIdTuple ()
 
std::string getIndex () const
 
ObjID getObjID () const
 
NUM_PTR getReservingComunicatorTrx () const
 
IndexPool::ObjStrIdTupleoperator= (const ObjStrIdTuple &rT)
 
void setIndex (const std::string &rsIndex)
 
void setObjID (const ObjID &rObjID)
 
void setReservingComunicatorTrx (NUM_PTR ipReservingComunicatorTrx)
 
void setValues (const std::string &rsIndex, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
 
std::string toString () const
 
bool operator== (const ObjStrIdTuple &rT) const
 
bool operator!= (const ObjStrIdTuple &rT) const
 
bool operator> (const ObjStrIdTuple &rT) const
 
bool operator>= (const ObjStrIdTuple &rT) const
 
bool operator< (const ObjStrIdTuple &rT) const
 
bool operator<= (const ObjStrIdTuple &rT) const
 

Private Attributes

NUM_PTR m_ipReservingComunicatorTrx
 
ObjID m_ObjID
 
std::string m_sIndex
 

Detailed Description

Class to manage objects in the IndexPool::ObjectStrIndex.

An ObjStrIdTuple has as attributes the index as sortable string and the object ID of a stored record.
Additionally, the string can be marked as reserved in a transaction.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ObjStrIdTuple() [1/3]

glo::IndexPool::ObjStrIdTuple::ObjStrIdTuple ( )

Standard constructor.

◆ ObjStrIdTuple() [2/3]

glo::IndexPool::ObjStrIdTuple::ObjStrIdTuple ( const std::string & rsIndex,
const ObjID & rObjID,
NUM_PTR ipReservingComunicatorTrx = 0 )

Constructor with parameter passing.

Parameters
[in]rsIndexThe index of an object.
[in]rObjIDThe object ID of the object with the index.
[in]ipReservingComunicatorTrxThe address, casted to NUM_PTR, of a Communicator in whose transaction the index was reserved, if applicable. If this is set, the index is 'only' reserved.

◆ ObjStrIdTuple() [3/3]

glo::IndexPool::ObjStrIdTuple::ObjStrIdTuple ( const ObjStrIdTuple & rT)

Copy constructor.

Parameters
[in]rTThe data is copied from this object.

◆ ~ObjStrIdTuple()

virtual glo::IndexPool::ObjStrIdTuple::~ObjStrIdTuple ( )
virtual

Destructor.

Member Function Documentation

◆ getIndex()

std::string glo::IndexPool::ObjStrIdTuple::getIndex ( ) const

Get method for m_sIndex.

Returns
The index of an object.

◆ getObjID()

ObjID glo::IndexPool::ObjStrIdTuple::getObjID ( ) const

Get method for m_ObjID.

Returns
The object ID of the object with the index.

◆ getReservingComunicatorTrx()

NUM_PTR glo::IndexPool::ObjStrIdTuple::getReservingComunicatorTrx ( ) const

Get method for m_ipReservingComunicatorTrx.

Returns
The address, casted to NUM_PTR, of a Communicator in whose transaction the index was reserved, if applicable. If this is set, the index is 'only' reserved.

◆ operator!=()

bool glo::IndexPool::ObjStrIdTuple::operator!= ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ operator<()

bool glo::IndexPool::ObjStrIdTuple::operator< ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ operator<=()

bool glo::IndexPool::ObjStrIdTuple::operator<= ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ operator=()

IndexPool::ObjStrIdTuple & glo::IndexPool::ObjStrIdTuple::operator= ( const ObjStrIdTuple & rT)

Assignment operator.

Parameters
[in]rTThe data is transferred from this object.

◆ operator==()

bool glo::IndexPool::ObjStrIdTuple::operator== ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ operator>()

bool glo::IndexPool::ObjStrIdTuple::operator> ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ operator>=()

bool glo::IndexPool::ObjStrIdTuple::operator>= ( const ObjStrIdTuple & rT) const

Comparison operator.

Parameters
[in]rTThe ObjStrIdTuple to compare.
Note
The attribute m_ipReservingComunicatorTrx is NOT considered.

◆ setIndex()

void glo::IndexPool::ObjStrIdTuple::setIndex ( const std::string & rsIndex)

Set method for m_sIndex.

Parameters
[in]rsIndexThe index of an object.

◆ setObjID()

void glo::IndexPool::ObjStrIdTuple::setObjID ( const ObjID & rObjID)

Set method for m_ObjID.

Parameters
[in]rObjIDThe object ID of the object with the index.

◆ setReservingComunicatorTrx()

void glo::IndexPool::ObjStrIdTuple::setReservingComunicatorTrx ( NUM_PTR ipReservingComunicatorTrx)

Set method for m_ipReservingComunicatorTrx.

Parameters
[in]ipReservingComunicatorTrxThe address, casted to NUM_PTR, of a Communicator in whose transaction the index was reserved, if applicable. If this is set, the index is 'only' reserved.

◆ setValues()

void glo::IndexPool::ObjStrIdTuple::setValues ( const std::string & rsIndex,
const ObjID & rObjID,
NUM_PTR ipReservingComunicatorTrx = 0 )

Sets its values.

Parameters
[in]rsIndexThe index of an object.
[in]rObjIDThe object ID of the object with the index.
[in]ipReservingComunicatorTrxThe address, casted to NUM_PTR, of a Communicator in whose transaction the index was reserved, if applicable. If this is set, the index is 'only' reserved.
Exceptions
eut::ErrorNExceptionIf an error occurs, an exception is thrown.

◆ toString()

std::string glo::IndexPool::ObjStrIdTuple::toString ( ) const

Returns in the form 'Index|Object ID|' e.g. "MUELLER KARL-THEOD|7.0.2743|"

Returns
The index with the object ID in a string.

Member Data Documentation

◆ m_ipReservingComunicatorTrx

NUM_PTR glo::IndexPool::ObjStrIdTuple::m_ipReservingComunicatorTrx
private

The address of the TransactionManager::TransactionStep casted to NUM_PTR, in which the index was reserved.

Note
Is not copied in the copy-ctor and on assignment.

◆ m_ObjID

ObjID glo::IndexPool::ObjStrIdTuple::m_ObjID
private

The object ID of the object with the index.

◆ m_sIndex

std::string glo::IndexPool::ObjStrIdTuple::m_sIndex
private

A possibly composed index (e.g., if the index in the schema: 'Index=Person.m_sName[10]|NaturalPerson.m_sFirstName[7]|' and the language 'de', then the name "Müller" and the first name "Karl-Theodor" become the index "Mueller Karl-Theod" and if not 'CaseSensitive' the index "MUELLER KARL-THEOD".


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