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

Class for the string-set attributes of a Record. More...

#include <GloStringSetRecordAttribute.h>

Inheritance diagram for glo::StringSetRecordAttribute:

Public Member Functions

 StringSetRecordAttribute (ClassInfoAttribute *pType, const std::set< std::string > &rValueSet, const std::streampos &rFilePos)
 
 StringSetRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
virtual void addValue (const std::string rsValue)
 
virtual void clearValueLot ()
 
virtual BaseRecordAttributegetCopy ()
 
virtual void * getValueAsVoidPointer ()
 
const std::set< std::string > & getValueRef () const
 
virtual std::size_t getValueSize () const
 
void setValue (const std::set< std::string > &rValueSet)
 
virtual void setValueFromVoid (void *pValueSet)
 
virtual int takeValue (const BaseRecordAttribute &rT)
 
- Public Member Functions inherited from glo::StringLotRecordAttribute
 StringLotRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos)
 
bool operator== (const StringLotRecordAttribute &rT) const
 Comparison operator.
 
bool operator!= (const StringLotRecordAttribute &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

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

StringSetRecordAttributeoperator= (const StringSetRecordAttribute &)
 

Private Attributes

std::set< std::string > m_ValueSet
 

Additional Inherited Members

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

Detailed Description

Class for the string-set attributes of a Record.

Represents an attribute of the type 'std::set<string>' of a persistent object.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ StringSetRecordAttribute() [1/4]

glo::StringSetRecordAttribute::StringSetRecordAttribute ( )
protected

The standard constructor is not available.

◆ ~StringSetRecordAttribute()

virtual glo::StringSetRecordAttribute::~StringSetRecordAttribute ( )
protectedvirtual

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

◆ StringSetRecordAttribute() [2/4]

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

◆ StringSetRecordAttribute() [3/4]

glo::StringSetRecordAttribute::StringSetRecordAttribute ( ClassInfoAttribute * pType,
const std::set< std::string > & rValueSet,
const std::streampos & rFilePos )

Constructor with parameter passing.

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

◆ StringSetRecordAttribute() [4/4]

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

Copy constructor.

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

Member Function Documentation

◆ addValue()

virtual void glo::StringSetRecordAttribute::addValue ( const std::string rsValue)
virtual

Inserts passed value at the end of the set of strings.

Parameters
[in]rsValueThe value to be inserted.

Implements glo::TypeLotRecordAttribute.

◆ clearValueLot()

virtual void glo::StringSetRecordAttribute::clearValueLot ( )
virtual

The set of strings is cleared.

Implements glo::LotRecordAttribute.

◆ getCopy()

virtual BaseRecordAttribute * glo::StringSetRecordAttribute::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::StringSetRecordAttribute::getValueAsVoidPointer ( )
virtual

Returns a raw pointer to the set of strings.

Returns
The raw pointer to the value.

Implements glo::BaseRecordAttribute.

◆ getValueRef()

const std::set< std::string > & glo::StringSetRecordAttribute::getValueRef ( ) const

Returns a reference to m_ValueSet.

Returns
The reference to the set of strings.

◆ getValueSize()

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

Returns the number of elements in the set of strings.

Returns
The number.

Implements glo::LotRecordAttribute.

◆ operator!=()

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

Comparison operator.

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

◆ operator=()

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

The assignment operator is not available.

◆ operator==()

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

Comparison operator.

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

◆ setValue()

void glo::StringSetRecordAttribute::setValue ( const std::set< std::string > & rValueSet)

Copies the strings of the transferred set into the own set of strings (the own set is emptied first).

Parameters
[in]rValueSetThe set of strings.

◆ setValueFromVoid()

virtual void glo::StringSetRecordAttribute::setValueFromVoid ( void * pValueSet)
virtual

Copies the strings of the transferred set to its own set of strings (the own set is emptied first).

This is guaranteed by a static_cast.

Parameters
[in]pValueSetThe raw pointer to the set of of strings.

Implements glo::BaseRecordAttribute.

◆ streamValueListInFileStream()

virtual void glo::StringSetRecordAttribute::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::StringSetRecordAttribute::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::StringLotRecordAttribute.

Member Data Documentation

◆ m_ValueSet

std::set<std::string> glo::StringSetRecordAttribute::m_ValueSet
private

The set of strings.


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