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

Class for the long double attributes of a Record. More...

#include <GloLongDoubleRecordAttribute.h>

Inheritance diagram for glo::LongDoubleRecordAttribute:

Public Member Functions

 LongDoubleRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
 LongDoubleRecordAttribute (ClassInfoAttribute *pType, long double ldValue, const std::streampos &rFilePos)
 
virtual bool dataIsFieldContent () const
 
int getAcceptedDecimals () const
 
virtual BaseRecordAttributegetCopy ()
 
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
 
virtual void * getValueAsVoidPointer ()
 
const long double & getValueRef () const
 
virtual void initNew ()
 
void setValue (long double ldValue)
 
virtual void setValueFromVoid (void *pValue)
 
virtual int takeValue (const BaseRecordAttribute &rT)
 
bool operator== (const LongDoubleRecordAttribute &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const LongDoubleRecordAttribute &rT) const
 Comparison operator, all attributes are compared.
 
- Public Member Functions inherited from glo::FNumRecordAttribute
 FNumRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
template<typename T >
std::string getTValueAsString (const T &rTValue, bool bFillBlanks) const
 
bool operator== (const FNumRecordAttribute &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const FNumRecordAttribute &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
 
ClassInfoAttributegetClassInfoAttribute () const
 
std::string getClassMemberName () const
 
std::string getClassName () const
 
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

 LongDoubleRecordAttribute ()
 
 LongDoubleRecordAttribute (const LongDoubleRecordAttribute &rT)
 
virtual ~LongDoubleRecordAttribute ()
 
- Protected Member Functions inherited from glo::FNumRecordAttribute
 FNumRecordAttribute ()
 
 FNumRecordAttribute (const FNumRecordAttribute &rT)
 
virtual ~FNumRecordAttribute ()
 
- Protected Member Functions inherited from glo::BaseRecordAttribute
 BaseRecordAttribute ()
 
 BaseRecordAttribute (const BaseRecordAttribute &rT)
 

Private Member Functions

LongDoubleRecordAttributeoperator= (const LongDoubleRecordAttribute &)
 

Private Attributes

long double m_ldValue
 

Detailed Description

Class for the long double attributes of a Record.

Represents an attribute of the type 'long double' of a persistent object.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ LongDoubleRecordAttribute() [1/4]

glo::LongDoubleRecordAttribute::LongDoubleRecordAttribute ( )
protected

The standard constructor is not available.

◆ ~LongDoubleRecordAttribute()

virtual glo::LongDoubleRecordAttribute::~LongDoubleRecordAttribute ( )
protectedvirtual

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

◆ LongDoubleRecordAttribute() [2/4]

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

◆ LongDoubleRecordAttribute() [3/4]

glo::LongDoubleRecordAttribute::LongDoubleRecordAttribute ( ClassInfoAttribute * pType,
long double ldValue,
const std::streampos & rFilePos )

Constructor with parameter passing.

Parameters
[in]pTypeA class information attribute is expected.
[in]ldValueThe value of the attribute.
[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!

◆ LongDoubleRecordAttribute() [4/4]

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

Copy constructor.

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

Member Function Documentation

◆ dataIsFieldContent()

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

Returns true, because the attribute data is stored as field content.

Returns
see above

Implements glo::BaseRecordAttribute.

◆ getAcceptedDecimals()

int glo::LongDoubleRecordAttribute::getAcceptedDecimals ( ) const

Returns the number of the specified decimal places.

Returns
See above.

◆ getCopy()

virtual BaseRecordAttribute * glo::LongDoubleRecordAttribute::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.

◆ getDataFieldLength()

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

Returns the record field length of the attribute value.

Returns
The field length.
See also
LONGDOUBLE_TEXT_LENGTH

Implements glo::BaseRecordAttribute.

◆ getValueAsDataString()

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

Returns the value as a formatted data string with the correct length with the correct length for the entry in the table file.
If decimal places are defined in the class information attribute, these are taken into account (e.g. the number 123 with 4 decimal places => " 123.0000", otherwise the number is delivered in "scientific-mode" (e.g. the number 123 => " 1.230000e+002").

Returns
The value as formatted data string in the correct length.

Implements glo::BaseRecordAttribute.

◆ getValueAsDisplayString()

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

Returns the value as it can be displayed for the GUI.

Returns
The value for the display, usually like getValueAsString()

Implements glo::BaseRecordAttribute.

◆ getValueAsStreamString()

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

Returns the value as string for the DataStreamer.

Returns
The value for the DataStreamer.

Implements glo::BaseRecordAttribute.

◆ getValueAsString()

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

Returns the value of the attribute as a string. If decimal places are defined in the class information attribute, these are taken into account (e.g. the number 123 with 4 decimal places => "123.0000", otherwise the number is delivered in "scientific-mode" (e.g. the number 123 => "1.230000e+002").

Returns
The value as string.

Implements glo::BaseRecordAttribute.

◆ getValueAsVoidPointer()

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

Returns a raw pointer to the value.

Returns
The raw pointer to the value.

Implements glo::BaseRecordAttribute.

◆ getValueRef()

const long double & glo::LongDoubleRecordAttribute::getValueRef ( ) const

Returns the reference to the value.

Returns
The value.

◆ initNew()

virtual void glo::LongDoubleRecordAttribute::initNew ( )
virtual

Reinitializes the attribute, the value is set to 0.

Implements glo::BaseRecordAttribute.

◆ operator!=()

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

Comparison operator, all attributes are compared.

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

◆ operator=()

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

The assignment operator is not available.

◆ operator==()

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

Comparison operator, all attributes are compared.

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

◆ setValue()

void glo::LongDoubleRecordAttribute::setValue ( long double ldValue)

Sets the value of the attribute.

Parameters
[in]ldValueThe new value.

◆ setValueFromVoid()

virtual void glo::LongDoubleRecordAttribute::setValueFromVoid ( void * pValue)
virtual

Sets the value of the attribute. Is assigned via a static_cast.

Parameters
[in]pValueThe raw pointer to the value.

Implements glo::BaseRecordAttribute.

◆ takeValue()

virtual int glo::LongDoubleRecordAttribute::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::BaseRecordAttribute.

Member Data Documentation

◆ m_ldValue

long double glo::LongDoubleRecordAttribute::m_ldValue
private

The value of the attribute.


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