GlobalObjects
|
A tuple of record and object ID. More...
#include <GloObjIDRecordTuple.h>
Public Member Functions | |
ObjIDRecordTuple (const ObjID &rObjID) | |
ObjIDRecordTuple (const ObjID &rObjID, Record *pRecord) | |
ObjIDRecordTuple (const ObjIDRecordTuple &rT) | |
ObjIDRecordTuple (Record *pRecord) | |
virtual | ~ObjIDRecordTuple () |
ObjID | getObjID () const |
bool | getRecord (Record *&prRetVal) const |
bool | hasRecord () const |
ObjIDRecordTuple & | operator= (const ObjIDRecordTuple &) |
int | setObjID (const ObjID &rObjID) |
int | setRecord (Record *pRecord) |
void | unsetRecord () |
bool | operator== (const ObjIDRecordTuple &rT) const |
bool | operator!= (const ObjIDRecordTuple &rT) const |
bool | operator> (const ObjIDRecordTuple &rT) const |
bool | operator>= (const ObjIDRecordTuple &rT) const |
bool | operator< (const ObjIDRecordTuple &rT) const |
bool | operator<= (const ObjIDRecordTuple &rT) const |
Private Member Functions | |
ObjIDRecordTuple () | |
Private Attributes | |
ObjID | m_ObjID |
Record * | m_pRecord |
A tuple of record and object ID.
Why the Object ID, which can also be present in the data set?
In order not to burden the data transfer between client/server with duplicate data records, objects of this class are transferred during transfers. If a data record is already in the transfer, only the ObjID is entered. This comes into play, for example, when a persistent object references another object several times.
|
private |
The standard constructor is not available.
glo::ObjIDRecordTuple::ObjIDRecordTuple | ( | const ObjID & | rObjID | ) |
Constructor with parameter passing.
[in] | rObjID | A valid object ID is expected. |
eut::ErrorNException | An exception is thrown if an error occurs. |
glo::ObjIDRecordTuple::ObjIDRecordTuple | ( | Record * | pRecord | ) |
Constructor with parameter passing.
[in] | pRecord | A valid record is expected. The reference counter of the record is incremented. |
eut::ErrorNException | An exception is thrown if an error occurs. |
Constructor with parameter passing.
[in] | rObjID | A valid object ID is expected. |
[in] | pRecord | A valid record is expected. Its object ID must match the passed object ID. The reference counter of the record is incremented. |
eut::ErrorNException | An exception is thrown if an error occurs. |
glo::ObjIDRecordTuple::ObjIDRecordTuple | ( | const ObjIDRecordTuple & | rT | ) |
Copy constructor.
[in] | rT | The data is copied from this object. |
|
virtual |
Destructor. The reference counter of the referenced data set is decremented.
ObjID glo::ObjIDRecordTuple::getObjID | ( | ) | const |
Returns the object ID.
bool glo::ObjIDRecordTuple::getRecord | ( | Record *& | prRetVal | ) | const |
Returns the referenced record, if available.
[in,out] | prRetVal | If present, the referenced record. |
bool glo::ObjIDRecordTuple::hasRecord | ( | ) | const |
bool glo::ObjIDRecordTuple::operator!= | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
bool glo::ObjIDRecordTuple::operator< | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
bool glo::ObjIDRecordTuple::operator<= | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
ObjIDRecordTuple & glo::ObjIDRecordTuple::operator= | ( | const ObjIDRecordTuple & | ) |
The assignment operator is not available.
bool glo::ObjIDRecordTuple::operator== | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
bool glo::ObjIDRecordTuple::operator> | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
bool glo::ObjIDRecordTuple::operator>= | ( | const ObjIDRecordTuple & | rT | ) | const |
All comparison operators ignore the record, only the ObjID is compared.
int glo::ObjIDRecordTuple::setObjID | ( | const ObjID & | rObjID | ) |
Adopts the ObjID if a record with a different Object ID is not already referenced.
[in] | rObjID | A valid object ID is expected. |
int glo::ObjIDRecordTuple::setRecord | ( | Record * | pRecord | ) |
Accepts the passed record. If a record is already referenced, it is forgotten and the object ID is set to NULL.
[in] | pRecord | A valid data record is expected. The reference counter of the data set is incremented and stored in m_pRecord. The object ID of the data set is written to m_ObjID. |
void glo::ObjIDRecordTuple::unsetRecord | ( | ) |
|
private |
The object ID.
|
private |
The record.