GlobalObjects
|
Abstract class for pointer and embeddet attributes of a Record. More...
#include <GloAPointerRecordAttribute.h>
Public Member Functions | |
APointerRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
APointerRecordAttribute (ClassInfoAttribute *pType, ObjID Value, const std::streampos &rFilePos) | |
void | getGeneric (GenericPersistent *&prRetVal) |
void | getGeneric (std::shared_ptr< GenericPersistent > &rRetVal) |
int | getReferencedRecord (Record *&prRetVal) |
int | getReferencedRecord (std::shared_ptr< Record > &rRetVal) |
bool | hasRecord () const |
bool | isGeneric () const |
void | setGeneric (GenericPersistent *pPersGeneric) |
void | setGeneric (std::shared_ptr< GenericPersistent > spPersGeneric) |
void | setReferencedRecord (Record *pRecord) |
void | setReferencedRecord (std::shared_ptr< Record > spRecord) |
virtual void | setValue (ObjID Value) |
virtual void | setValueFromVoid (void *pValue) |
bool | operator== (const APointerRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const APointerRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::IDRecordAttribute | |
IDRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
IDRecordAttribute (ClassInfoAttribute *pType, ObjID Value, const std::streampos &rFilePos) | |
virtual bool | dataIsFieldContent () const |
virtual unsigned short | getDataFieldLength () const |
virtual std::string | getValueAsDataString () const |
virtual std::string | getValueAsDisplayString () const |
virtual std::string | getValueAsStreamString () const |
virtual std::string | getValueAsString () const |
std::string | getValueAsString (const ObjID &rValue) const |
virtual void * | getValueAsVoidPointer () |
const ObjID & | getValueRef () const |
virtual void | initNew () |
virtual int | takeValue (const BaseRecordAttribute &rT) |
bool | operator== (const IDRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const IDRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute (ClassInfoAttribute *pClassInfoAttribut, const std::streampos &rFilePos) | |
virtual | ~BaseRecordAttribute () |
unsigned int | forget () |
AttributeID | getAttributeID () const |
virtual int | getAttributeValueBlob (eut::Blob &rBlob) const |
ClassInfoAttribute * | getClassInfoAttribute () const |
std::string | getClassMemberName () const |
std::string | getClassName () const |
virtual BaseRecordAttribute * | getCopy ()=0 |
virtual std::string | getDataReference () const |
EnDataType | getDataType () const |
std::string | getFieldName () const |
int | getFieldPos () |
std::streampos | getFilePosition () const |
virtual int | getFormattedFieldContents (std::string &rsRetVal, DATA_REFERENCE_INFO &rRetValInfo, ObjID ObjID) |
EnDataTypeGroup | getInfoType () |
unsigned int | getReferenceCount () const |
std::string | getTableFieldName () const |
std::string | getTableName () const |
ClassInfoAttribute::Type | getType () const |
std::string | getTypeAsCppString () const |
std::string | getTypeAsString () const |
std::string | getTypeInfo () const |
unsigned int | remember () |
virtual void | setDataReference (const std::string &rsDataReference) |
void | setFilePosition (const std::streampos &rFilePos) |
virtual int | setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID) |
virtual int | updateDataReference (const std::string &rsDataPath, DATA_REFERENCE_INFO MethodInfo) |
bool | operator== (const BaseRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const BaseRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Protected Member Functions | |
APointerRecordAttribute () | |
APointerRecordAttribute (const APointerRecordAttribute &) | |
virtual | ~APointerRecordAttribute () |
Protected Member Functions inherited from glo::IDRecordAttribute | |
IDRecordAttribute () | |
IDRecordAttribute (const IDRecordAttribute &rT) | |
virtual | ~IDRecordAttribute () |
Protected Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute () | |
BaseRecordAttribute (const BaseRecordAttribute &rT) | |
Private Member Functions | |
APointerRecordAttribute & | operator= (const APointerRecordAttribute &) |
void | setReferencedRecordDeep (Record *pRecord) |
Private Attributes | |
GenericPersistent * | m_pGeneric |
Record * | m_pReferencedRecord |
Abstract class for pointer and embeddet attributes of a Record.
|
protected |
The standard constructor is not available.
|
protectedvirtual |
The destructor is not available. The object may only be removed from memory using forget().
glo::APointerRecordAttribute::APointerRecordAttribute | ( | ClassInfoAttribute * | pType, |
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | rFilePos | The file position. |
eut::ErrorNException | An exception will be thrown if an error occurs. |
glo::APointerRecordAttribute::APointerRecordAttribute | ( | ClassInfoAttribute * | pType, |
ObjID | Value, | ||
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | Value | The value of the attribute. |
[in] | rFilePos | The file position. |
eut::ErrorNException | An exception will be thrown if an error occurs. |
|
protected |
The copy constructor is not available.
void glo::APointerRecordAttribute::getGeneric | ( | GenericPersistent *& | prRetVal | ) |
Returns the referenced generic object.
[in,out] | prRetVal | The referenced generic object, if available. |
void glo::APointerRecordAttribute::getGeneric | ( | std::shared_ptr< GenericPersistent > & | rRetVal | ) |
Returns the referenced generic object.
[in,out] | rRetVal | The referenced generic object in a std::shared_ptr, if available. |
int glo::APointerRecordAttribute::getReferencedRecord | ( | Record *& | prRetVal | ) |
Returns the record of the referenced object.
[in,out] | prRetVal | The record of the referenced object, if available. |
int glo::APointerRecordAttribute::getReferencedRecord | ( | std::shared_ptr< Record > & | rRetVal | ) |
Returns the record of the referenced object.
[in,out] | rRetVal | The record of the referenced object in a std::shared_ptr, if available. |
bool glo::APointerRecordAttribute::hasRecord | ( | ) | const |
Checks whether a Record is referenced in m_pReferencedRecord.
bool glo::APointerRecordAttribute::isGeneric | ( | ) | const |
Checks whether a GenericPersistent is referenced.
bool glo::APointerRecordAttribute::operator!= | ( | const APointerRecordAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
|
private |
The assignment operator is not available.
bool glo::APointerRecordAttribute::operator== | ( | const APointerRecordAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
void glo::APointerRecordAttribute::setGeneric | ( | GenericPersistent * | pPersGeneric | ) |
Sets the referenced generic object.
[in] | pPersGeneric | Sets the referenced generic object. |
void glo::APointerRecordAttribute::setGeneric | ( | std::shared_ptr< GenericPersistent > | spPersGeneric | ) |
Sets the referenced generic object.
[in] | spPersGeneric | Sets the referenced generic object in a std::shared_ptr. |
void glo::APointerRecordAttribute::setReferencedRecord | ( | Record * | pRecord | ) |
Sets the record of the referenced object.
[in] | pRecord | The record of the referenced object. |
void glo::APointerRecordAttribute::setReferencedRecord | ( | std::shared_ptr< Record > | spRecord | ) |
Sets the record of the referenced object.
[in] | spRecord | The record of the referenced object in a std::shared_ptr. |
|
private |
Creates a copy of the transferred record and inserts it into m_pReferencedRecord.
[in] | pRecord | The new record to be inserted is only used in the copy constructor. |
|
virtual |
Sets the value of the attribute. Overwritten here to set a possibly set m_pGeneric to "NULL_PTR" when passing a NULL-ObjID.
[in] | Value | The new value. |
Reimplemented from glo::IDRecordAttribute.
|
virtual |
Sets the value of the attribute. Is assigned via a static_cast. Overwritten here to set a possibly set m_pGeneric to NULL_PTR when passing a NULL-ObjID.
[in] | pValue | The raw pointer to the value. |
Reimplemented from glo::IDRecordAttribute.
|
private |
Is only set if the attribute is part of a generic object.
A referenced generic object is stored here so that it can be instantiated and be in GenPersObjectSpy. If only the record of the generic object were stored, the generic object would be lost.
|
private |
In addition to the ObjID (in superclass) the record of the referenced object.