GlobalObjects
Loading...
Searching...
No Matches
glo::DoubleVectorRecordAttribute Class Reference

Class for the double-vector attributes of a GloRecord. More...

#include <GloDoubleVectorRecordAttribute.h>

Inheritance diagram for glo::DoubleVectorRecordAttribute:

Public Member Functions

 DoubleVectorRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
 DoubleVectorRecordAttribute (ClassInfoAttribute *pType, const std::vector< double > &rValueVector, const std::streampos &rFilePos)
 
virtual void addValue (double dValue)
 
virtual void clearValueLot ()
 
virtual BaseRecordAttributegetCopy ()
 
virtual void * getValueAsVoidPointer ()
 
const std::vector< double > & getValueRef () const
 
virtual std::size_t getValueSize () const
 
void setValue (const std::vector< double > &rValueVector)
 
virtual void setValueFromVoid (void *pValueVector)
 
virtual int takeValue (const BaseRecordAttribute &rT)
 
- Public Member Functions inherited from glo::DoubleLotRecordAttribute
 DoubleLotRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
virtual void addValue (const std::string rsValue)
 
bool operator== (const DoubleLotRecordAttribute &rT) const
 Comparison operator.
 
bool operator!= (const DoubleLotRecordAttribute &rT) const
 Comparison operator.
 
- Public Member Functions inherited from glo::TypeLotRecordAttribute
 TypeLotRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
bool operator== (const TypeLotRecordAttribute &rT) const
 Comparison operator.
 
bool operator!= (const TypeLotRecordAttribute &rT) const
 Comparison operator.
 
- 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 getValueAsStreamString () 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
 
ClassInfoAttributegetClassInfoAttribute () 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)
 
virtual int setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID)
 
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

 DoubleVectorRecordAttribute ()
 
 DoubleVectorRecordAttribute (const DoubleVectorRecordAttribute &rT)
 
virtual ~DoubleVectorRecordAttribute ()
 
virtual void streamValueListInFileStream (std::ofstream &rFileStream)
 
bool operator== (const DoubleVectorRecordAttribute &rT) const
 Comparison operator.
 
bool operator!= (const DoubleVectorRecordAttribute &rT) const
 Comparison operator.
 
- Protected Member Functions inherited from glo::DoubleLotRecordAttribute
 DoubleLotRecordAttribute ()
 
 DoubleLotRecordAttribute (const DoubleLotRecordAttribute &rT)
 
virtual ~DoubleLotRecordAttribute ()
 
- Protected Member Functions inherited from glo::TypeLotRecordAttribute
 TypeLotRecordAttribute ()
 
 TypeLotRecordAttribute (const TypeLotRecordAttribute &rT)
 
virtual ~TypeLotRecordAttribute ()
 
- 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

DoubleVectorRecordAttributeoperator= (const DoubleVectorRecordAttribute &)
 

Private Attributes

std::vector< double > m_ValueVector
 

Additional Inherited Members

- Protected Attributes inherited from glo::LotRecordAttribute
std::string m_sFileName
 

Detailed Description

Class for the double-vector attributes of a GloRecord.

Represents an attribute of the type 'std::vector<double>' of a persistent object.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ DoubleVectorRecordAttribute() [1/4]

glo::DoubleVectorRecordAttribute::DoubleVectorRecordAttribute ( )
protected

The standard constructor is not available.

◆ ~DoubleVectorRecordAttribute()

virtual glo::DoubleVectorRecordAttribute::~DoubleVectorRecordAttribute ( )
protectedvirtual

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

◆ DoubleVectorRecordAttribute() [2/4]

glo::DoubleVectorRecordAttribute::DoubleVectorRecordAttribute ( 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!

◆ DoubleVectorRecordAttribute() [3/4]

glo::DoubleVectorRecordAttribute::DoubleVectorRecordAttribute ( ClassInfoAttribute * pType,
const std::vector< double > & rValueVector,
const std::streampos & rFilePos )

Constructor with parameter passing.

Parameters
[in]pTypeA class information attribute is expected.
[in]rValueVectorThe vector of double.
[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!

◆ DoubleVectorRecordAttribute() [4/4]

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

Copy constructor.

Parameters
[in]rTThe data is copied from this object.
See also
getCopy()

Member Function Documentation

◆ addValue()

virtual void glo::DoubleVectorRecordAttribute::addValue ( double dValue)
virtual

Inserts passed value at the end of the vector of double.

Parameters
[in]dValueThe value to be inserted.

Implements glo::DoubleLotRecordAttribute.

◆ clearValueLot()

virtual void glo::DoubleVectorRecordAttribute::clearValueLot ( )
virtual

The vector of double is cleared.

Implements glo::LotRecordAttribute.

◆ getCopy()

virtual BaseRecordAttribute * glo::DoubleVectorRecordAttribute::getCopy ( )
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.

Returns
The copy of this attribute
Attention
The supplied object must be removed from memory by the calling instance.

Implements glo::BaseRecordAttribute.

◆ getValueAsVoidPointer()

virtual void * glo::DoubleVectorRecordAttribute::getValueAsVoidPointer ( )
virtual

Returns a raw pointer to the vector of double.

Returns
The raw pointer to the value.

Implements glo::BaseRecordAttribute.

◆ getValueRef()

const std::vector< double > & glo::DoubleVectorRecordAttribute::getValueRef ( ) const

Returns a reference to m_ValueVector.

Returns
The reference to the vector of double.

◆ getValueSize()

virtual std::size_t glo::DoubleVectorRecordAttribute::getValueSize ( ) const
virtual

Returns the number of elements in the vector of double.

Returns
The number.

Implements glo::LotRecordAttribute.

◆ operator!=()

bool glo::DoubleVectorRecordAttribute::operator!= ( const DoubleVectorRecordAttribute & rT) const
protected

Comparison operator.

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

◆ operator=()

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

The assignment operator is not available.

◆ operator==()

bool glo::DoubleVectorRecordAttribute::operator== ( const DoubleVectorRecordAttribute & rT) const
protected

Comparison operator.

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

◆ setValue()

void glo::DoubleVectorRecordAttribute::setValue ( const std::vector< double > & rValueVector)

Copies the doubles of the transferred vector into the own vector of double (this vector is emptied first).

Parameters
[in]rValueVectorThe vector of double.

◆ setValueFromVoid()

virtual void glo::DoubleVectorRecordAttribute::setValueFromVoid ( void * pValueVector)
virtual

Copies the doubles of the transferred vector to its own vector of double (the own vector is emptied first).

This is guaranteed by a static_cast.

Parameters
[in]pValueVectorThe raw pointer to the vector of of double.

Implements glo::BaseRecordAttribute.

◆ streamValueListInFileStream()

virtual void glo::DoubleVectorRecordAttribute::streamValueListInFileStream ( std::ofstream & rFileStream)
protectedvirtual

Transfers the contents of the element container for LotRecordAttribute::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.

Implements glo::LotRecordAttribute.

◆ takeValue()

virtual int glo::DoubleVectorRecordAttribute::takeValue ( const BaseRecordAttribute & rT)
virtual

Adopts the value from transferred attribute, if possible. An attempt is made to cast the value in some way.

Parameters
[in]rTThe persistent attribute from which the values are to be taken.
Returns
An error or warning message from subclasses will be delivered if the cast does not work.

Reimplemented from glo::DoubleLotRecordAttribute.

Member Data Documentation

◆ m_ValueVector

std::vector<double> glo::DoubleVectorRecordAttribute::m_ValueVector
private

The vector of double.


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