GlobalObjects
Loading...
Searching...
No Matches
glo::LotRecordAttribute Class Referenceabstract

Base class for item container attributes of a Record. More...

#include <GloLotRecordAttribute.h>

Inheritance diagram for glo::LotRecordAttribute:

Public Member Functions

 LotRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
virtual void clearValueLot ()=0
 
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 getValueAsStreamString () const
 
virtual std::string getValueAsString () const
 
virtual std::size_t getValueSize () const =0
 
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
 
ClassInfoAttributegetClassInfoAttribute () const
 
std::string getClassMemberName () const
 
std::string getClassName () const
 
virtual BaseRecordAttributegetCopy ()=0
 
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
 
virtual void * getValueAsVoidPointer ()=0
 
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 void setValueFromVoid (void *pValue)=0
 
virtual int takeValue (const BaseRecordAttribute &rT)
 
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

 LotRecordAttribute ()
 
 LotRecordAttribute (const LotRecordAttribute &rT)
 
virtual ~LotRecordAttribute ()
 
virtual void streamValueListInFileStream (std::ofstream &rFileStream)=0
 
- Protected Member Functions inherited from glo::BaseRecordAttribute
 BaseRecordAttribute ()
 
 BaseRecordAttribute (const BaseRecordAttribute &rT)
 

Protected Attributes

std::string m_sFileName
 

Private Member Functions

LotRecordAttributeoperator= (const LotRecordAttribute &)
 

Detailed Description

Base class for item container attributes of a Record.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ LotRecordAttribute() [1/3]

glo::LotRecordAttribute::LotRecordAttribute ( )
protected

The standard constructor is not available.

◆ ~LotRecordAttribute()

virtual glo::LotRecordAttribute::~LotRecordAttribute ( )
protectedvirtual

The destructor is not available. The object may only be removed from memory using forget().

◆ LotRecordAttribute() [2/3]

glo::LotRecordAttribute::LotRecordAttribute ( ClassInfoAttribute * pType,
const std::streampos & rFilePos )

Constructor with parameter passing.

Parameters
[in]pTypeA class information attribute is expected.
[in]rFilePosThe file position.
Exceptions
eut::ErrorNExceptionAn exception will be thrown if an error occurs.
Attention
Since objects of these classes are only instantiated by internal objects like Record and TableReaderInterface, and they know what they are doing, a type check of the class information attribute is omitted!

◆ LotRecordAttribute() [3/3]

glo::LotRecordAttribute::LotRecordAttribute ( const LotRecordAttribute & rT)
protected

Copy constructor.

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

Member Function Documentation

◆ clearValueLot()

◆ dataIsFieldContent()

virtual bool glo::LotRecordAttribute::dataIsFieldContent ( ) const
virtual

Returns false, because attribute data is always stored outside the table in a file. The reference to the file is stored in the table.

Returns
see above.

Implements glo::BaseRecordAttribute.

◆ getAttributeValueBlob()

virtual int glo::LotRecordAttribute::getAttributeValueBlob ( eut::Blob & rBlob) const
virtual

Out of bounds!

Returns
Always returns ERR_METHOD_FORBIDDEN.

Reimplemented from glo::BaseRecordAttribute.

◆ getDataFieldLength()

virtual unsigned short glo::LotRecordAttribute::getDataFieldLength ( ) const
virtual

Returns the field length of the attribute value converted to a formatted data string. In this case is always the length of the file name of the file in which the item container is to be placed.

Returns
The field length.

Implements glo::BaseRecordAttribute.

◆ getDataReference()

virtual std::string glo::LotRecordAttribute::getDataReference ( ) const
virtual

Returns the file name (composed of the file name and the attribute ID) in which the attribute data is stored.

Returns
If necessary the existing file name. If empty, I guess there isn't any.

Reimplemented from glo::BaseRecordAttribute.

◆ getFileName()

const std::string & glo::LotRecordAttribute::getFileName ( ) const

Returns the name of the file in which the item container should be placed.

Returns
The file name.
Note
The file name is delivered without path and without file extension.

◆ getFormattedFieldContents()

virtual int glo::LotRecordAttribute::getFormattedFieldContents ( std::string & rsRetVal,
DATA_REFERENCE_INFO & rRetValInfo,
ObjID ObjID )
virtual

Provides the name of the external file with the attribute's data and a information whether it needs to be rewritten, kept or deleted if there is content to be saved. The name of the external file is also set in the m_sFileName attribute.

Parameters
[in,out]rsRetValThe name of the external file with the data of the attribute. The name of the external file is also set in the m_sFileName attribute.
[in,out]rRetValInfoThe information how to handle the external file.
[in]ObjIDIf a file name has to be created, it will be formed from this object ID. Usually this is the object ID of the object with this attribute. If an invalid ObjID (ObjID.isNULL()) is transferred, a name filled only with blanks will be returned.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::BaseRecordAttribute.

◆ getValueAsDataString()

virtual std::string glo::LotRecordAttribute::getValueAsDataString ( ) const
virtual

Cannot return the value as string, returns "?" instead.

Returns
"?".

Implements glo::BaseRecordAttribute.

◆ getValueAsDisplayString()

virtual std::string glo::LotRecordAttribute::getValueAsDisplayString ( ) const
virtual

Returns the value as it can be displayed for the GUI, the type and the number of objects in the item container.

Returns
The value for the display.

Implements glo::BaseRecordAttribute.

◆ getValueAsStreamString()

virtual std::string glo::LotRecordAttribute::getValueAsStreamString ( ) const
virtual

Cannot return the value as string, returns "?" instead.

Returns
"?".

Implements glo::BaseRecordAttribute.

Reimplemented in glo::OdRefListRecordAttribute, glo::OdRefSetRecordAttribute, glo::PoRefListRecordAttribute, and glo::PoRefSetRecordAttribute.

◆ getValueAsString()

virtual std::string glo::LotRecordAttribute::getValueAsString ( ) const
virtual

Cannot return the value as string, returns "?" instead.

Returns
"?".

Implements glo::BaseRecordAttribute.

◆ getValueSize()

◆ initNew()

virtual void glo::LotRecordAttribute::initNew ( )
virtual

Reinitializes the attribute, the item container is emptied.

See also
clearValueLot()

Implements glo::BaseRecordAttribute.

◆ operator!=()

bool glo::LotRecordAttribute::operator!= ( const LotRecordAttribute & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator=()

LotRecordAttribute & glo::LotRecordAttribute::operator= ( const LotRecordAttribute & )
private

The assignment operator is not available.

◆ operator==()

bool glo::LotRecordAttribute::operator== ( const LotRecordAttribute & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ setDeterminedFileNameFromAttributeValue()

void glo::LotRecordAttribute::setDeterminedFileNameFromAttributeValue ( ObjID ObjID)

Sets the identified designation of the file in which the item container is to be accommodated if there is something to save.

Parameters
[in]ObjIDIf a file name has to be created, the file name is formed from this object ID. Usually this is the object ID of the object whose attribute value is requested.

◆ setFileName()

void glo::LotRecordAttribute::setFileName ( const std::string & rsFileName)

Sets the name of the file in which the item container should be placed.

Parameters
[in]rsFileNameThe file name.
Note
The file name is passed without path and without file extension.

◆ streamValueListInFileStream()

virtual void glo::LotRecordAttribute::streamValueListInFileStream ( std::ofstream & rFileStream)
protectedpure virtual

Transfers the contents of the element container in subclasses for updateDataReference (...) in a suitable form in the file stream passed.

Parameters
[in,out]rFileStreamThe filestream.
Note
Passed filestream must be valid and open for writing.
Exceptions
eut::ErrorNExceptionAn exception is thrown if parameter rFileStream is invalid or not open for writing.

Implemented in glo::DoubleListRecordAttribute, glo::DoubleSetRecordAttribute, glo::DoubleVectorRecordAttribute, glo::IntListRecordAttribute, glo::IntSetRecordAttribute, glo::IntVectorRecordAttribute, glo::OdRefListRecordAttribute, glo::OdRefSetRecordAttribute, glo::PoRefListRecordAttribute, glo::PoRefSetRecordAttribute, glo::StringListRecordAttribute, glo::StringSetRecordAttribute, and glo::StringVectorRecordAttribute.

◆ updateDataReference()

virtual int glo::LotRecordAttribute::updateDataReference ( const std::string & rsDataPath,
DATA_REFERENCE_INFO MethodInfo )
virtual

Deletes or saves an external file containing the attribute data.

Parameters
[in]rsDataPathThe full directory name where the data can be found. The data is always located in a subdirectory of the directory in which the schema file is located.
[in]MethodInfoThe information how to handle an external file.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::BaseRecordAttribute.

Member Data Documentation

◆ m_sFileName

std::string glo::LotRecordAttribute::m_sFileName
protected

Item containers are stored in files, here the file name.


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