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

This class reflects a unique ID of a class information attribute. More...

#include <GloAttributeID.h>

Public Member Functions

 AttributeID ()
 
 AttributeID (const AttributeID &rT)
 
 AttributeID (const ClassInfoAttribute &rClassInfoAttribute)
 
 AttributeID (const std::string &sAttributeId, const std::string &sDelimiter=".")
 
 AttributeID (unsigned long ulClassID, int iFieldPos)
 
virtual ~AttributeID ()
 
unsigned long getClassID () const
 
ClassInfoAttributegetClassInfoAttribute () const
 
int getFieldPos () const
 
bool isNULL () const
 
AttributeIDoperator= (const AttributeID &rT)
 
void setClassID (unsigned long ulClassID)
 
virtual void setClassInfoAttribute (const ClassInfoAttribute &rClassInfoAttribute)
 
void setFieldPos (int iFieldPos)
 
int setID (const std::string &sAttributeId, const std::string &sDelimiter=".")
 
void setID (unsigned long ulClassID, int iFieldPos)
 
virtual void setNULL ()
 
std::string toString () const
 
std::string toString (const std::string &sDelimiter) const
 
bool operator== (const AttributeID &rT) const
 Comparison operator.
 
bool operator!= (const AttributeID &rT) const
 Comparison operator.
 
bool operator> (const AttributeID &rT) const
 Comparison operator.
 
bool operator>= (const AttributeID &rT) const
 Comparison operator.
 
bool operator< (const AttributeID &rT) const
 Comparison operator.
 
bool operator<= (const AttributeID &rT) const
 Comparison operator.
 

Private Attributes

int m_iFieldPos
 
ClassInfoAttributem_pGloClassInfoAttribute
 
unsigned long m_ulClassID
 

Detailed Description

This class reflects a unique ID of a class information attribute.

Class information attributes are assigned to a class via the class ID. A class information attribute also has a field position in the table. A unique ID can be formed from these two values. The address of the index attribute is also included.

Is used to search and sort attributes.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ AttributeID() [1/5]

glo::AttributeID::AttributeID ( )

Standard constructor.

◆ AttributeID() [2/5]

glo::AttributeID::AttributeID ( unsigned long ulClassID,
int iFieldPos )

Constructor with parameter passing.

Parameters
[in]ulClassIDThe class ID.
[in]iFieldPosThe column position in the table (start at 0).

◆ AttributeID() [3/5]

glo::AttributeID::AttributeID ( const std::string & sAttributeId,
const std::string & sDelimiter = "." )

Constructor with parameter passing. Takes the class ID and column position from a string if it is in the following form: e.g. "2.6" => class ID = 2, column position = 6. Leading and following blanks are ignored.

Parameters
[in]sAttributeIdClass ID and columnPosition in a string.
[in]sDelimiterThe separator (default ".").
Exceptions
eut::ErrorNExceptionAn exception is thrown if the passed parameters are invalid.

◆ AttributeID() [4/5]

glo::AttributeID::AttributeID ( const ClassInfoAttribute & rClassInfoAttribute)

Constructor with parameter passing.

Parameters
[in]rClassInfoAttributeThe class ID and column position as well as the address of the class information attribute are adopted.

◆ AttributeID() [5/5]

glo::AttributeID::AttributeID ( const AttributeID & rT)

Copy constructor.

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

◆ ~AttributeID()

virtual glo::AttributeID::~AttributeID ( )
virtual

Destructor.

Member Function Documentation

◆ getClassID()

unsigned long glo::AttributeID::getClassID ( ) const
Returns
The class ID.

◆ getClassInfoAttribute()

ClassInfoAttribute * glo::AttributeID::getClassInfoAttribute ( ) const

Returns a pointer to the m_pGloClassInfoAttribute

Returns
see above.
Attention
The delivered object must not be changed or removed from memory. The pointer should only be used for information.

◆ getFieldPos()

int glo::AttributeID::getFieldPos ( ) const
Returns
The column position in the table (start at 0).

◆ isNULL()

bool glo::AttributeID::isNULL ( ) const

Checks whether class ID > 0, i.e. whether it is valid.

Returns
If true, then the class ID is valid.

◆ operator!=()

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

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ operator<()

bool glo::AttributeID::operator< ( const AttributeID & rT) const

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ operator<=()

bool glo::AttributeID::operator<= ( const AttributeID & rT) const

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ operator=()

AttributeID & glo::AttributeID::operator= ( const AttributeID & rT)

Assignment operator.

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

◆ operator==()

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

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ operator>()

bool glo::AttributeID::operator> ( const AttributeID & rT) const

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ operator>=()

bool glo::AttributeID::operator>= ( const AttributeID & rT) const

Comparison operator.

All attributes are compared except m_pGloClassInfoAttribute.

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

◆ setClassID()

void glo::AttributeID::setClassID ( unsigned long ulClassID)

Sets the class ID.

Parameters
[in]ulClassIDThe class ID.

◆ setClassInfoAttribute()

virtual void glo::AttributeID::setClassInfoAttribute ( const ClassInfoAttribute & rClassInfoAttribute)
virtual

Sets m_pGloClassInfoAttribute, all attributes are changed to the values of the passed ClassInfoAttribute.

Parameters
[in]rClassInfoAttributeThe ClassInfoAttribute.

◆ setFieldPos()

void glo::AttributeID::setFieldPos ( int iFieldPos)

Sets the column position.

Parameters
[in]iFieldPosThe column position in the table (start at 0).

◆ setID() [1/2]

int glo::AttributeID::setID ( const std::string & sAttributeId,
const std::string & sDelimiter = "." )

Takes the class ID and column position from a string if it is in the following form: e.g. "2.6" => class ID = 2, column position = 6. Leading and following blanks are ignored.

Parameters
[in]sAttributeIdClass ID and columnPosition in a string.
[in]sDelimiterThe separator (default ".").
Returns
A return < 0 indicates an error.

◆ setID() [2/2]

void glo::AttributeID::setID ( unsigned long ulClassID,
int iFieldPos )

Sets the class ID and the column position.

Parameters
[in]ulClassIDThe class ID.
[in]iFieldPosThe column position in the table (start at 0).

◆ setNULL()

virtual void glo::AttributeID::setNULL ( )
virtual

Sets the class ID and column position to 0.

◆ toString() [1/2]

std::string glo::AttributeID::toString ( ) const

Returns the class ID and column position in a string. The "." is used as separator. For example, "2.6" => class ID = 2, column position = 6.

Returns
The class ID and column position in a string.
See also
toString(const std::string&)const

◆ toString() [2/2]

std::string glo::AttributeID::toString ( const std::string & sDelimiter) const

Returns the class ID and column position in a string with optional separators. For example, if sDelimiter == "-": "2-6" => Class ID = 2, ColumnPosition = 6.

Parameters
[in]sDelimiterThe delimiter.
Returns
The class ID and column position in a string.

Member Data Documentation

◆ m_iFieldPos

int glo::AttributeID::m_iFieldPos
private

The column position in the table (start at 0).

◆ m_pGloClassInfoAttribute

ClassInfoAttribute* glo::AttributeID::m_pGloClassInfoAttribute
private

The address to the IndexAttribute.

Note
Is filled by the SchemaInterface only in developer mode to allow changing an attribute which is used as index attribute.
Is not compared in a comparison.

◆ m_ulClassID

unsigned long glo::AttributeID::m_ulClassID
private

The class id


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