GlobalObjects
|
Class for the pointer list attributes of a Record. More...
#include <GloPoRefListRecordAttribute.h>
Public Member Functions | |
PoRefListRecordAttribute (ClassInfoAttribute *pType, const std::list< ObjIDRecordTuple * > &rValueList, const std::streampos &rFilePos) | |
PoRefListRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
virtual void | clearGenericList () |
virtual void | clearValueList () |
virtual void | clearValueLot () |
virtual BaseRecordAttribute * | getCopy () |
const std::list< GenericPersistent * > & | getGenericListRef () const |
virtual std::string | getValueAsStreamString () const |
virtual void * | getValueAsVoidPointer () |
const std::list< ObjIDRecordTuple * > & | getValueRef () const |
virtual std::size_t | getValueSize () const |
bool | hasRecords () const |
void | insert (const std::list< ObjIDRecordTuple * >::const_iterator &rIter, const ObjIDRecordTuple &rObjIDRecordTuple) |
bool | isGeneric () const |
void | push_back (const ObjIDRecordTuple &rObjIDRecordTuple) |
void | push_front (const ObjIDRecordTuple &rObjIDRecordTuple) |
void | setGenericList (const std::list< GenericPersistent * > &rPersGenericList) |
void | setValue (const std::list< ObjIDRecordTuple * > &rValueList) |
virtual int | setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID) |
virtual int | setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID, bool bWithRefRecords) |
virtual void | setValueFromVoid (void *pValueList) |
virtual int | takeValue (const BaseRecordAttribute &rT) |
Public Member Functions inherited from glo::LotRecordAttribute | |
LotRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
virtual bool | dataIsFieldContent () const |
virtual int | getAttributeValueBlob (eut::Blob &rBlob) const |
virtual unsigned short | getDataFieldLength () const |
virtual std::string | getDataReference () const |
const std::string & | getFileName () const |
virtual int | getFormattedFieldContents (std::string &rsRetVal, DATA_REFERENCE_INFO &rRetValInfo, ObjID ObjID) |
virtual std::string | getValueAsDataString () const |
virtual std::string | getValueAsDisplayString () const |
virtual std::string | getValueAsString () const |
virtual void | initNew () |
void | setDeterminedFileNameFromAttributeValue (ObjID ObjID) |
void | setFileName (const std::string &rsFileName) |
virtual int | updateDataReference (const std::string &rsDataPath, DATA_REFERENCE_INFO MethodInfo) |
bool | operator== (const LotRecordAttribute &rT) const |
Comparison operator. | |
bool | operator!= (const LotRecordAttribute &rT) const |
Comparison operator. | |
Public Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute (ClassInfoAttribute *pClassInfoAttribut, const std::streampos &rFilePos) | |
virtual | ~BaseRecordAttribute () |
unsigned int | forget () |
AttributeID | getAttributeID () const |
ClassInfoAttribute * | getClassInfoAttribute () const |
std::string | getClassMemberName () const |
std::string | getClassName () const |
EnDataType | getDataType () const |
std::string | getFieldName () const |
int | getFieldPos () |
std::streampos | getFilePosition () const |
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) |
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 | |
PoRefListRecordAttribute () | |
PoRefListRecordAttribute (const PoRefListRecordAttribute &rT) | |
virtual | ~PoRefListRecordAttribute () |
virtual void | streamValueListInFileStream (std::ofstream &rFileStream) |
bool | operator== (const PoRefListRecordAttribute &rT) const |
Comparison operator. | |
bool | operator!= (const PoRefListRecordAttribute &rT) const |
Comparison operator. | |
Protected Member Functions inherited from glo::LotRecordAttribute | |
LotRecordAttribute () | |
LotRecordAttribute (const LotRecordAttribute &rT) | |
virtual | ~LotRecordAttribute () |
Protected Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute () | |
BaseRecordAttribute (const BaseRecordAttribute &rT) | |
Private Member Functions | |
PoRefListRecordAttribute & | operator= (const PoRefListRecordAttribute &) |
Private Attributes | |
std::list< GenericPersistent * > | m_GenericList |
std::list< ObjIDRecordTuple * > | m_ValueList |
Additional Inherited Members | |
Protected Attributes inherited from glo::LotRecordAttribute | |
std::string | m_sFileName |
Class for the pointer list attributes of a Record.
Represents an attribute of the type TPointerList<MyPersClass> and MyPersClass is a persistent object.
The objects in the list are usually loaded along with the owning object.
|
protected |
The standard constructor is not available.
|
protectedvirtual |
The destructor is not available. The object may only be removed from memory using forget().
glo::PoRefListRecordAttribute::PoRefListRecordAttribute | ( | 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::PoRefListRecordAttribute::PoRefListRecordAttribute | ( | ClassInfoAttribute * | pType, |
const std::list< ObjIDRecordTuple * > & | rValueList, | ||
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | rValueList | The list of referenced objects of the attribute. |
[in] | rFilePos | The file position. |
eut::ErrorNException | An exception will be thrown if an error occurs. |
|
protected |
|
virtual |
The list of generic objects is cleaned up (emptied and the objects are removed from the memory).
|
virtual |
The list of referenced objects is cleaned up (emptied and the objects are removed from the memory).
|
virtual |
The list of referenced objects and, if available, the list of generic objects are cleaned up (emptied and the objects are removed from memory).
Implements glo::LotRecordAttribute.
|
virtual |
Returns a copy of the object. Sometimes a copy of an attribute is needed, e.g. if a deep-copied record (with copied attributes) is needed.
Implements glo::BaseRecordAttribute.
const std::list< GenericPersistent * > & glo::PoRefListRecordAttribute::getGenericListRef | ( | ) | const |
Returns a reference to the list of generic objects.
|
virtual |
Returns the value as string for the DataStreamer.
Reimplemented from glo::LotRecordAttribute.
|
virtual |
Returns a raw pointer to the value.
Implements glo::BaseRecordAttribute.
const std::list< ObjIDRecordTuple * > & glo::PoRefListRecordAttribute::getValueRef | ( | ) | const |
Returns a reference to m_ValueList.
|
virtual |
Returns the number of objects in the list of referenced objects.
Implements glo::LotRecordAttribute.
bool glo::PoRefListRecordAttribute::hasRecords | ( | ) | const |
Checks whether a Record is referenced from the first ObjIDRecordTuple in m_ValueList.
void glo::PoRefListRecordAttribute::insert | ( | const std::list< ObjIDRecordTuple * >::const_iterator & | rIter, |
const ObjIDRecordTuple & | rObjIDRecordTuple ) |
Inserts the passed ObjIDRecordTuple in m_ValueList at the position of the passed iterator.
[in] | rIter | The Iterator. |
[in] | rObjIDRecordTuple | The ObjIDRecordTuple to be inserted. |
bool glo::PoRefListRecordAttribute::isGeneric | ( | ) | const |
Checks whether a GenericPersistent is referenced in m_GenericList.
|
protected |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
private |
The assignment operator is not available.
|
protected |
Comparison operator.
[in] | rT | The object to be compared with this one. |
void glo::PoRefListRecordAttribute::push_back | ( | const ObjIDRecordTuple & | rObjIDRecordTuple | ) |
Inserts passed ObjIDRecordTuple in m_ValueList at the end.
[in] | rObjIDRecordTuple | The ObjIDRecordTuple to be inserted. |
void glo::PoRefListRecordAttribute::push_front | ( | const ObjIDRecordTuple & | rObjIDRecordTuple | ) |
Inserts passed ObjIDRecordTuple in m_ValueList at the beginning.
[in] | rObjIDRecordTuple | The ObjIDRecordTuple to be inserted. |
void glo::PoRefListRecordAttribute::setGenericList | ( | const std::list< GenericPersistent * > & | rPersGenericList | ) |
Sets the list of generic objects with objects from passed list. The own list is deleted first.
[in] | rPersGenericList | The list of referenced generic objects. |
void glo::PoRefListRecordAttribute::setValue | ( | const std::list< ObjIDRecordTuple * > & | rValueList | ) |
Copies the objects of the transferred list to its own list of referenced objects. The own list is deleted first.
[in] | rValueList | The list of referenced objects. |
|
virtual |
The value of the RecordAttribut from the class attribute of the passed Persistent is determined and set based on the passed AttributeID.
[in] | rObject | The persistent object whose attribute is used. |
[in] | rAttributeID | The ID of the attribute of the passed object. |
eut::ErrorNException | An exception is thrown in case of a fatal error, e.g. if rObject does not have the attribute. |
Reimplemented from glo::BaseRecordAttribute.
|
virtual |
The value of the RecordAttribut from the class attribute of the passed Persistent is determined and set based on the passed AttributeID.
[in] | rObject | The persistent object whose attribute is used. |
[in] | rAttributeID | The ID of the attribute of the passed object. |
[in] | bWithRefRecords | If true and a valid object is referenced, the respective record is generated and referenced. |
eut::ErrorNException | An exception is thrown in case of a fatal error, e.g. if rObject does not have the attribute. |
|
virtual |
Copies the objects of the transferred list to its own list of referenced objects. The own list is deleted first.
This is guaranteed by a static_cast.
[in] | pValueList | The raw pointer to the list of referenced objects. |
Implements glo::BaseRecordAttribute.
|
protectedvirtual |
Transfers the contents of the element container for LotRecordAttribute::updateDataReference (...) in a suitable form in the file stream passed.
[in,out] | rFileStream | The filestream. |
eut::ErrorNException | An exception is thrown if parameter rFileStream is invalid or not open for writing. |
Implements glo::LotRecordAttribute.
|
virtual |
Adopts the value from transferred attribute, if possible. An attempt is made to cast the value in some way.
[in] | rT | The persistent attribute from which the values are to be taken. |
Reimplemented from glo::BaseRecordAttribute.
|
private |
The list of referenced generic objects. Is only set if part of a generic object.
|
private |
The value of the attribute. The list of referenced objects using object ObjIDRecordTuple's.