GlobalObjects
|
Class for the ondemand set attributes of a Record. More...
#include <GloOdRefSetRecordAttribute.h>
Public Member Functions | |
OdRefSetRecordAttribute (ClassInfoAttribute *pType, const std::set< ObjID > &rValueSet, const std::streampos &rFilePos) | |
OdRefSetRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
virtual void | clearValueLot () |
virtual BaseRecordAttribute * | getCopy () |
virtual std::string | getValueAsStreamString () const |
virtual void * | getValueAsVoidPointer () |
const std::set< ObjID > & | getValueRef () const |
virtual std::size_t | getValueSize () const |
void | insert (const ObjID &rObjID) |
void | setValue (const std::set< ObjID > &rValueSet) |
virtual int | setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID) |
virtual void | setValueFromVoid (void *pValueSet) |
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 | |
OdRefSetRecordAttribute () | |
OdRefSetRecordAttribute (const OdRefSetRecordAttribute &rT) | |
virtual | ~OdRefSetRecordAttribute () |
virtual void | streamValueListInFileStream (std::ofstream &rFileStream) |
bool | operator== (const OdRefSetRecordAttribute &rT) const |
Comparison operator. | |
bool | operator!= (const OdRefSetRecordAttribute &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 | |
OdRefSetRecordAttribute & | operator= (const OdRefSetRecordAttribute &) |
Private Attributes | |
std::set< ObjID > | m_ValueSet |
Additional Inherited Members | |
Protected Attributes inherited from glo::LotRecordAttribute | |
std::string | m_sFileName |
Class for the ondemand set attributes of a Record.
Represents an attribute of the type glo::TOndemandSet<MyPersClass> and MyPersClass is a persistent object.
The objects in the set are usually not loaded 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::OdRefSetRecordAttribute::OdRefSetRecordAttribute | ( | 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::OdRefSetRecordAttribute::OdRefSetRecordAttribute | ( | ClassInfoAttribute * | pType, |
const std::set< ObjID > & | rValueSet, | ||
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | rValueSet | The set 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 set of referenced objects is cleared.
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.
|
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::set< ObjID > & glo::OdRefSetRecordAttribute::getValueRef | ( | ) | const |
Returns a reference to m_ValueSet.
|
virtual |
Returns the number of objects in the set of referenced objects.
Implements glo::LotRecordAttribute.
void glo::OdRefSetRecordAttribute::insert | ( | const ObjID & | rObjID | ) |
Inserts passed ObjID in m_ValueSet at the end.
[in] | rObjID | The ObjID to be inserted. |
|
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::OdRefSetRecordAttribute::setValue | ( | const std::set< ObjID > & | rValueSet | ) |
Copies the objects of the transferred set to its own set of referenced objects. The own set is deleted first.
[in] | rValueSet | The set 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 |
Copies the objects of the transferred set to its own set of referenced objects. The own set is deleted first.
This is guaranteed by a static_cast.
[in] | pValueSet | The raw pointer to the set 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 value of the attribute. The set of referenced objects using object IDs.