GlobalObjects
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glo::BoolRecordAttribute Class Reference

Class for the bool attributes of a Record. More...

#include <GloBoolRecordAttribute.h>

Inheritance diagram for glo::BoolRecordAttribute:

Public Member Functions

 BoolRecordAttribute (ClassInfoAttribute *pType, bool bValue, const std::streampos &rFilePos)
 
 BoolRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
virtual bool dataIsFieldContent () const override
 
virtual BaseRecordAttributegetCopy () override
 
virtual unsigned short getDataFieldLength () const override
 
virtual std::string getValueAsDataString () const override
 
virtual std::string getValueAsDisplayString () const override
 
virtual std::string getValueAsStreamString () const override
 
virtual std::string getValueAsString () const override
 
virtual void * getValueAsVoidPointer () override
 
const bool & getValueRef () const
 
virtual void initNew () override
 
void setValue (bool bValue)
 
virtual void setValueFromVoid (void *pValue) override
 
virtual int takeValue (const BaseRecordAttribute &rT) override
 
bool operator== (const BoolRecordAttribute &rT) const
 
bool operator!= (const BoolRecordAttribute &rT) const
 
- 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
 
unsigned long getClassID () 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

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

Private Member Functions

BoolRecordAttributeoperator= (const BoolRecordAttribute &)
 

Private Attributes

bool m_bValue
 

Detailed Description

Class for the bool attributes of a Record.

Represents an attribute of the type 'bool' of a persistent object.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ BoolRecordAttribute() [1/4]

glo::BoolRecordAttribute::BoolRecordAttribute ( )
protected

The standard constructor is not available.

Referenced by BoolRecordAttribute(), operator!=(), operator=(), and operator==().

◆ ~BoolRecordAttribute()

virtual glo::BoolRecordAttribute::~BoolRecordAttribute ( )
protectedvirtual

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

◆ BoolRecordAttribute() [2/4]

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

◆ BoolRecordAttribute() [3/4]

glo::BoolRecordAttribute::BoolRecordAttribute ( ClassInfoAttribute * pType,
bool bValue,
const std::streampos & rFilePos )

Constructor with parameter passing.

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

◆ BoolRecordAttribute() [4/4]

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

Copy constructor.

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

References BoolRecordAttribute().

Member Function Documentation

◆ dataIsFieldContent()

virtual bool glo::BoolRecordAttribute::dataIsFieldContent ( ) const
overridevirtual

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

Returns
see above

Implements glo::BaseRecordAttribute.

◆ getCopy()

virtual BaseRecordAttribute * glo::BoolRecordAttribute::getCopy ( )
overridevirtual

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.

References glo::BaseRecordAttribute::BaseRecordAttribute().

◆ getDataFieldLength()

virtual unsigned short glo::BoolRecordAttribute::getDataFieldLength ( ) const
overridevirtual

Returns the record field length of the attribute value.

Returns
The field length.
See also
BOOL_TEXT_LENGTH

Implements glo::BaseRecordAttribute.

◆ getValueAsDataString()

virtual std::string glo::BoolRecordAttribute::getValueAsDataString ( ) const
overridevirtual

Returns the value as a formatted data string with the correct length with the correct length for the entry in the table file.

Returns
The value as formatted data string, true => "1", false => "0".

Implements glo::BaseRecordAttribute.

◆ getValueAsDisplayString()

virtual std::string glo::BoolRecordAttribute::getValueAsDisplayString ( ) const
overridevirtual

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

Returns
The value for the display, true => "true", false => "false".

Implements glo::BaseRecordAttribute.

◆ getValueAsStreamString()

virtual std::string glo::BoolRecordAttribute::getValueAsStreamString ( ) const
overridevirtual

Returns the value as string for the DataStreamer.

Returns
The value for the DataStreamer, true => "1", false => "0".

Implements glo::BaseRecordAttribute.

◆ getValueAsString()

virtual std::string glo::BoolRecordAttribute::getValueAsString ( ) const
overridevirtual

Returns the value as string.

Returns
The value as string, true => "1", false => "0".

Implements glo::BaseRecordAttribute.

◆ getValueAsVoidPointer()

virtual void * glo::BoolRecordAttribute::getValueAsVoidPointer ( )
overridevirtual

Returns a raw pointer to the value.

Returns
The raw pointer to the value.

Implements glo::BaseRecordAttribute.

◆ getValueRef()

const bool & glo::BoolRecordAttribute::getValueRef ( ) const

Returns the reference to the value.

Returns
The value.

◆ initNew()

virtual void glo::BoolRecordAttribute::initNew ( )
overridevirtual

Reinitializes the attribute, the value is set to 'false'.

Implements glo::BaseRecordAttribute.

◆ operator!=()

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

Comparison operator, all attributes are compared.

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

References BoolRecordAttribute().

◆ operator=()

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

The assignment operator is not available.

References BoolRecordAttribute().

◆ operator==()

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

Comparison operator, all attributes are compared.

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

References BoolRecordAttribute().

◆ setValue()

void glo::BoolRecordAttribute::setValue ( bool bValue)

Sets the value of the attribute.

Parameters
[in]bValueThe new value.

◆ setValueFromVoid()

virtual void glo::BoolRecordAttribute::setValueFromVoid ( void * pValue)
overridevirtual

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::BoolRecordAttribute::takeValue ( const BaseRecordAttribute & rT)
overridevirtual

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 respectively warning message from subclasses will be delivered if the cast does not work.

Reimplemented from glo::BaseRecordAttribute.

References glo::BaseRecordAttribute::BaseRecordAttribute().

Member Data Documentation

◆ m_bValue

bool glo::BoolRecordAttribute::m_bValue
private

The value of the attribute.


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