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

This class contains all information to store objects of a class in a database, to build objects from tables and to build tables from objects. More...

#include <GloClassInfo.h>

Classes

class  SuperClassIdInfoTuple
 This parameter class is used to deliver and receive the Superclass IDs with additional information. More...
 

Public Member Functions

 ClassInfo ()
 
 ClassInfo (const ClassInfo &rT)
 
 ClassInfo (const std::string &rsSchemaName, const std::string &rsName, unsigned long ulClassID, const std::string &rsSuperClasses, const std::string &rsSuperClassesInfo)
 
virtual ~ClassInfo ()
 
std::string _DEBUG_ToString ()
 
bool asSubClassAvailable (unsigned long ulSubClassID) const
 
bool attributeExisting (ClassInfoAttribute *pAttribute) const
 
bool attributeExisting (const std::string &rsAttributeName) const
 
int attributeFieldNameExisting (const std::string &rsAttributeFieldName)
 
void deleteAllInfoAttributes ()
 
void deleteAllInfoIndexes ()
 
std::string getAllAttributeFildNamesAsColumnRow (char cColumnDelimiter=g_cTableColumnDelimiter) const
 
void getAllAttributesSortByFieldPos (std::map< int, ClassInfoAttribute *, std::less< int > > &rRetValMap) const
 
void getAllClassMemberNamesSortByID (std::map< AttributeID, std::string > &rRetValMap) const
 
ClassInfoAttributegetAttribute (EnSeekMode eMode)
 
ClassInfoAttributegetAttributeByFieldName (const std::string &rsTableName, const std::string &rsFieldName) const
 
ClassInfoAttributegetAttributeByID (const AttributeID &rAttributeID) const
 
ClassInfoAttributegetAttributeByName (const std::string &rsName) const
 
std::string getClassDescription () const
 
unsigned long getClassID () const
 
std::string getClassModifier () const
 
std::string getClassName () const
 
std::string getFileDescription () const
 
std::string getFileName () const
 
ClassInfoIndexgetIndex (EnSeekMode eMode)
 
void getIndexes (std::vector< AllSetIndexInfo > &rIndexes) const
 
ClassInfoIndexgetIndexFromName (const std::string &rsIndexName) const
 
std::string getName () const
 
void getNamespaces (std::vector< std::string > &rNamespaces) const
 
std::size_t getNumberOfAttributes () const
 
std::size_t getNumberOfIndexes () const
 
std::string getSchemaName () const
 
std::list< ClassInfo * > & getSubClassInfos ()
 
std::string getSuperClasses () const
 
void getSuperClasses (std::vector< unsigned long > &rSuperClassIdVector) const
 
std::string getSuperClassesInfo () const
 
void getSuperClassesInfo (std::vector< std::string > &rSuperClassesInfoVector) const
 
void getSuperClassesInfoTuples (std::vector< std::shared_ptr< SuperClassIdInfoTuple > > &rSuperClassesInfoTuplesVector) const
 
std::string getTableNameFirstAttribute () const
 
int indexExisting (ClassInfoIndex *pIndex) const
 
int indexExisting (const std::string &rsIndexName) const
 
void insertSubClassInfo (ClassInfo *pSubClassInfo)
 
bool isDirectSubclassOf (unsigned long ulSuperClassID) const
 
ClassInfooperator= (const ClassInfo &rT)
 
int removeAttribute (ClassInfoAttribute *pAttribute, bool bDelete=false)
 
int removeIndex (ClassInfoIndex *pIndex, bool bDelete=false)
 
void removeSubClassInfo (unsigned long ulClassID)
 
void setAllAttributesTableName (const std::string &rsTableName) const
 
void setClassDescription (const std::string &rstrClassDescription)
 
void setClassID (unsigned long ulClassID)
 
void setClassModifier (const std::string &rstrClassModifier)
 
void setFileDescription (const std::string &rstrFileDescription)
 
void setFileName (const std::string &rsFileName)
 
void setName (const std::string &rsName)
 
void setSchemaName (const std::string &rsSchemaName)
 
void setSuperClasses (const std::string &rsSuperClasses)
 
void setSuperClassesInfo (const std::string &rsSuperClassesInfo)
 
void setSuperClassesInfoTuples (const std::vector< std::shared_ptr< SuperClassIdInfoTuple > > &rSuperClassesInfoTuplesVector)
 
int takeOverAttribute (ClassInfoAttribute *pAttribute)
 
int takeOverIndex (ClassInfoIndex *pIndex)
 

Private Member Functions

void copyAttributListFrom (const ClassInfo &rT)
 
void copyIndexListFrom (const ClassInfo &rT)
 

Private Attributes

std::list< ClassInfoAttribute * > m_AttributeList
 
std::list< ClassInfoAttribute * >::iterator m_AttributeListIterator
 
std::list< ClassInfoIndex * > m_IndexList
 
std::list< ClassInfoIndex * >::iterator m_IndexListIterator
 
std::string m_sClassDescription
 
std::string m_sClassModifier
 
std::string m_sFileDescription
 
std::string m_sFileName
 
std::string m_sName
 
std::string m_sSchemaName
 
std::string m_sSuperClasses
 
std::string m_sSuperClassesInfo
 
std::list< ClassInfo * > m_SubClassInfoList
 
unsigned long m_ulClassID
 

Friends

class SchemaInterface
 

Detailed Description

This class contains all information to store objects of a class in a database, to build objects from tables and to build tables from objects.

The SchemaInterface provides an object of this class for each class.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ClassInfo() [1/3]

glo::ClassInfo::ClassInfo ( )

Standard constructor.

◆ ClassInfo() [2/3]

glo::ClassInfo::ClassInfo ( const std::string & rsSchemaName,
const std::string & rsName,
unsigned long ulClassID,
const std::string & rsSuperClasses,
const std::string & rsSuperClassesInfo )

Constructor with parameter passing.

Parameters
[in]rsSchemaNameThe schema respectively database name.
[in]rsNameThe class name.
[in]ulClassIDThe class ID.
[in]rsSuperClassesThe superclass(es) as class ID separated by '|' (e.g. "3|").
[in]rsSuperClassesInfoInformation about the inheritance of superclass(es) such as "virtual|".

◆ ClassInfo() [3/3]

glo::ClassInfo::ClassInfo ( const ClassInfo & rT)

Copy constructor.

Parameters
[in]rTThe data is copied from this object.
Note
All attributes except m_SubClassInfoList are considered.

◆ ~ClassInfo()

virtual glo::ClassInfo::~ClassInfo ( )
virtual

Destructor.

Member Function Documentation

◆ _DEBUG_ToString()

std::string glo::ClassInfo::_DEBUG_ToString ( )

Returns the object content as a string.

◆ asSubClassAvailable()

bool glo::ClassInfo::asSubClassAvailable ( unsigned long ulSubClassID) const

Checks whether a class with passed class ID is a direct subclass.

Parameters
[in]ulSubClassIDThe class ID which is checked.
Returns
Returns true if there is a direct subclass with a passed class ID.
Attention
If the class information was not provided by SchemaInterface (possibly by Base) the list of subclasses may be empty (see also m_SubClassInfoList).

◆ attributeExisting() [1/2]

bool glo::ClassInfo::attributeExisting ( ClassInfoAttribute * pAttribute) const

Checks whether a class information attribute is included in its list of attributes.

Parameters
[in]pAttributeThe class information attribute to be checked.
Attention
It is not compared for content, but for equality of the pointers.
Returns
Returns true if the passed attribute is contained in the list of attributes.

◆ attributeExisting() [2/2]

bool glo::ClassInfo::attributeExisting ( const std::string & rsAttributeName) const

Checks whether a class information attribute with the passed name is included in its list of attributes.

Parameters
[in]rsAttributeNameThe name (from ClassInfoAttribute::getName()) of the class information attribute to be checked.
Returns
Returns true, if an attribute with with the passed name is contained in the list of attributes.

◆ attributeFieldNameExisting()

int glo::ClassInfo::attributeFieldNameExisting ( const std::string & rsAttributeFieldName)

Checks whether a class information attribute with the passed table field label is included in the list of attributes.

Parameters
[in]rsAttributeFieldNameThe table field name of the class information attribute to be checked.
Returns
Returns true if an attribute with the given table field name is contained in its list of attributes.

◆ copyAttributListFrom()

void glo::ClassInfo::copyAttributListFrom ( const ClassInfo & rT)
private

Copies from passed class information all class information attributes to its list of attributes.

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

◆ copyIndexListFrom()

void glo::ClassInfo::copyIndexListFrom ( const ClassInfo & rT)
private

Copies all class information indexes from transferred class information to its list of indexes.

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

◆ deleteAllInfoAttributes()

void glo::ClassInfo::deleteAllInfoAttributes ( )

Removes all class information attributes from the list of attributes and from memory.

◆ deleteAllInfoIndexes()

void glo::ClassInfo::deleteAllInfoIndexes ( )

Removes all class information indexes from the list of indexes and from memory.

◆ getAllAttributeFildNamesAsColumnRow()

std::string glo::ClassInfo::getAllAttributeFildNamesAsColumnRow ( char cColumnDelimiter = g_cTableColumnDelimiter) const

Returns all class information attributes as a complete field name line. The individual attributes are separated by g_cTableColumnDelimiter.
For example, if g_cTableColumnDelimiter == '\a': "ObjID[BEL]CreateDate[BEL]LastChange[BEL]"

Parameters
[in]cColumnDelimiterA different delimiter can be passed.
Returns
see above.

◆ getAllAttributesSortByFieldPos()

void glo::ClassInfo::getAllAttributesSortByFieldPos ( std::map< int, ClassInfoAttribute *, std::less< int > > & rRetValMap) const

Returns all class information attributes sorted by column position.

Parameters
[in,out]rRetValMapThe class information attributes.
Attention
Delivered objects in rRetValMap must not be removed from memory and live only as long as this object.

◆ getAllClassMemberNamesSortByID()

void glo::ClassInfo::getAllClassMemberNamesSortByID ( std::map< AttributeID, std::string > & rRetValMap) const

Returns, of all class information attributes from its list of attributes, the attribute name with class description, separated by a period and sorted by attribute ID (e.g. "MyClass.m_MyAttribute").

Parameters
[in,out]rRetValMapThe attribute names with class ID of the class information attributes (see also ClassInfoAttribute::getClassAttributeName()).

◆ getAttribute()

ClassInfoAttribute * glo::ClassInfo::getAttribute ( EnSeekMode eMode)

Returns a class information attribute from its list of attributes related to eMode.

Parameters
[in]eModeThe seek mode.

Parameter examples:

Returns
A class information attribute. A return == NULL_PTR indicates the end of the list of attributes
Attention
The returned object must not be removed from memory!
See also
ClassInfo::takeOverAttribute (...), ClassInfo::removeAttribute (...), ClassInfo::getAttributeByName (...), ClassInfo::getAttributeByFieldName (...) ClassInfo::getAttributeByID (...)

◆ getAttributeByFieldName()

ClassInfoAttribute * glo::ClassInfo::getAttributeByFieldName ( const std::string & rsTableName,
const std::string & rsFieldName ) const

Returns a class information attribute from its list of attributes whose table name and table field name matches the names passed

Parameters
[in]rsTableNameThe table name of the class information attribute you are looking for.
[in]rsFieldNameThe table field name of the class information attribute you are looking for.
Attention
Delivered object must not be removed from memory!
See also
ClassInfo::getAttribute (...), ClassInfo::removeAttribute (...), ClassInfo::getAttributeByName (...), ClassInfo::takeOverAttribute (...) ClassInfo::getAttributeByID (...)

◆ getAttributeByID()

ClassInfoAttribute * glo::ClassInfo::getAttributeByID ( const AttributeID & rAttributeID) const

Returns a class information attribute from its list of attributes whose attribute ID matches the attribute ID passed.

Parameters
[in]rAttributeIDThe AttributeID of the searched class information attribute.
Attention
Supplied object must not be removed from memory!
See also
ClassInfo::getAttribute (...), ClassInfo::removeAttribute (...), ClassInfo::getAttributeByName (...), ClassInfo::takeOverAttribute (...)

◆ getAttributeByName()

ClassInfoAttribute * glo::ClassInfo::getAttributeByName ( const std::string & rsName) const

Returns a class information attribute from its list of attributes whose name matches the name passed

Parameters
[in]rsNameThe name of the class information attribute you are looking for.
Attention
Delivered object must not be removed from memory!
See also
ClassInfo::getAttribute (...), ClassInfo::removeAttribute (...), ClassInfo::takeOverAttribute (...), ClassInfo::getAttributeByFieldName (...) ClassInfo::getAttributeByID (...)

◆ getClassDescription()

std::string glo::ClassInfo::getClassDescription ( ) const

Returns the class description which can be copied into the generated header file of the class.

Returns
the class description.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::setClassDescription (...)

◆ getClassID()

unsigned long glo::ClassInfo::getClassID ( ) const
Returns
The class ID.
See also
ClassInfo::setClassID (...)

◆ getClassModifier()

std::string glo::ClassInfo::getClassModifier ( ) const

Returns the class modifier like '__declspec(dllexport)' which can be copied into the generated header file of the class between "class" and the class name.

Returns
The class modifier.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::setClassModifier (...)

◆ getClassName()

std::string glo::ClassInfo::getClassName ( ) const
Returns
The class name without namespaces, if any.
See also
ClassInfo::getName()
ClassInfo::getNamespaces (...)

◆ getFileDescription()

std::string glo::ClassInfo::getFileDescription ( ) const

Returns the file description which can be copied into the generated header file of the class.

Returns
The file description.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::setFileDescription (...)

◆ getFileName()

std::string glo::ClassInfo::getFileName ( ) const

Returns the file name in which the generated header file of the class can be copied.

Returns
the file name.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::setFileName (...)

◆ getIndex()

ClassInfoIndex * glo::ClassInfo::getIndex ( EnSeekMode eMode)

Returns a class information index from its list of indexes related to eMode.

Parameters
[in]eModeThe seek mode.

Parameter examples:

Returns
A class information index. A return == NULL_PTR indicates the end of the list of indexes
Attention
The returned object must not be removed from memory!
See also
ClassInfo::takeOverIndex (...), ClassInfo::getIndexFromName (...), ClassInfo::removeIndex (...)

◆ getIndexes()

void glo::ClassInfo::getIndexes ( std::vector< AllSetIndexInfo > & rIndexes) const

Inserts all indexes from its list of indexes into passed Vector rIndexes at the end.

Parameters
[in,out]rIndexesThe indexes.
Note
Any existing entries in the transferred vector are not affected.

◆ getIndexFromName()

ClassInfoIndex * glo::ClassInfo::getIndexFromName ( const std::string & rsIndexName) const

Returns the class information index from its list of indexes whose name matches the name passed.

Parameters
[in]rsIndexNameThe name of the class information index that is searched for.
Attention
Delivered object must not be removed from memory!
See also
ClassInfo::getIndex (...), ClassInfo::takeOverIndex (...), ClassInfo::removeIndex (...)

◆ getName()

std::string glo::ClassInfo::getName ( ) const
Returns
The class name.
Note
The class name can be extended by namespaces at the beginning, e.g. "toc::roc::MyName". This means that MyName is in the "roc" namespace, which in turn is in the "toc" namespace.
See also
ClassInfo::setName (...)
ClassInfo::getClassName()
ClassInfo::getNamespaces (...)

◆ getNamespaces()

void glo::ClassInfo::getNamespaces ( std::vector< std::string > & rNamespaces) const

Returns the namespaces in the transferred vector, if available. For example, if the class name is "toc::roc::MyName", "toc" and "roc" are inserted in the same order in the passed vector.

See also
ClassInfo::getName()
ClassInfo::getClassName()

◆ getNumberOfAttributes()

std::size_t glo::ClassInfo::getNumberOfAttributes ( ) const
Returns
The number of class information attributes.

◆ getNumberOfIndexes()

std::size_t glo::ClassInfo::getNumberOfIndexes ( ) const
Returns
The number of class information indexes.

◆ getSchemaName()

std::string glo::ClassInfo::getSchemaName ( ) const
Returns
The schema respectively database name.
See also
ClassInfo::setSchemaName (...)

◆ getSubClassInfos()

std::list< ClassInfo * > & glo::ClassInfo::getSubClassInfos ( )

Returns the reference to the internal list of subclasses.

Attention
This possibility of access should only be limited to accessing the objects with another iterator. Adding or removing objects can cause undefined behavior.
See also
ClassInfo::insertSubClassInfo (...), ClassInfo::removeSubClassInfo (...)

◆ getSuperClasses() [1/2]

std::string glo::ClassInfo::getSuperClasses ( ) const

Returns the superclass(es) as class ID separated by '|' such as "3|4|" => class has two superclasses with the class ID "3" and "4".

Returns
The superclass(es).
See also
ClassInfo::setSuperClasses (...)

◆ getSuperClasses() [2/2]

void glo::ClassInfo::getSuperClasses ( std::vector< unsigned long > & rSuperClassIdVector) const

Inserts all class IDs of the direct superclasses into the transferred vector. The transferred vector will be emptied first.

Parameters
[in,out]rSuperClassIdVectorThe vector in which the class IDs of the direct superclasses are inserted.

◆ getSuperClassesInfo() [1/2]

std::string glo::ClassInfo::getSuperClassesInfo ( ) const

Returns the information about the inheritance of superclass(es). For example, if value is " |virtual|" (first class not virtual, therefore space) and if, for example, in m_sSuperClasses the IDs are "3|4|", then inheritance from the class with ID 4 is virtual.

Returns
The information about inheritance of superclass(es).
See also
ClassInfo::setSuperClassesInfo (...)

◆ getSuperClassesInfo() [2/2]

void glo::ClassInfo::getSuperClassesInfo ( std::vector< std::string > & rSuperClassesInfoVector) const

Inserts all information about the inheritance of superclass(es) into the passed vector. The transferred Vector is emptied before.

Parameters
[in,out]rSuperClassesInfoVectorThe vector in which the information is inserted.
See also
ClassInfo::getSuperClassesInfo()const

◆ getSuperClassesInfoTuples()

void glo::ClassInfo::getSuperClassesInfoTuples ( std::vector< std::shared_ptr< SuperClassIdInfoTuple > > & rSuperClassesInfoTuplesVector) const

Inserts all class IDs of the direct superclasses and the corresponding information for inheritance into the vector at the end of the passed vector.
The transferred vector is not emptied before.

Parameters
[in,out]rSuperClassesInfoTuplesVectorThe vector in which the information is inserted.

◆ getTableNameFirstAttribute()

std::string glo::ClassInfo::getTableNameFirstAttribute ( ) const

Returns the table name of the first attribute (all persistent attributes of a class are stored in one table).

Returns
The table name.

◆ indexExisting() [1/2]

int glo::ClassInfo::indexExisting ( ClassInfoIndex * pIndex) const

Checks whether a class information index is included in the list of indexes.

Parameters
[in]pIndexThe class information index to be checked.
Attention
The comparison is not based on content, but on equality of the pointers.
Returns
Returns true if the passed index is contained in the list of attributes.

◆ indexExisting() [2/2]

int glo::ClassInfo::indexExisting ( const std::string & rsIndexName) const

Checks whether a class information index, with the name passed, is included in the list of indexes.

Parameters
[in]rsIndexNameThe index name of the class information index to be checked.
Returns
Returns true if the passed index is contained in the list of attributes.

◆ insertSubClassInfo()

void glo::ClassInfo::insertSubClassInfo ( ClassInfo * pSubClassInfo)

Inserts the transferred class information into the list of subclasses.

Parameters
[in]pSubClassInfoThe subclass to be inserted.
Attention
The calling instance must not remove the passed object from memory.
See also
ClassInfo::getSubClassInfos (...), ClassInfo::removeSubClassInfo (...)

◆ isDirectSubclassOf()

bool glo::ClassInfo::isDirectSubclassOf ( unsigned long ulSuperClassID) const

Checks whether the passed class ID is the ID of a direct superclass.

Parameters
[in]ulSuperClassIDThe class ID to be checked.
Returns
Returns true if the passed class ID belongs to a direct superclass, otherwise false.

◆ operator=()

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

Assignment operator. All attributes except m_SubClassInfoList are considered.

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

◆ removeAttribute()

int glo::ClassInfo::removeAttribute ( ClassInfoAttribute * pAttribute,
bool bDelete = false )

Removes passed class information attribute from the list of attributes.

Parameters
[in]pAttributeThe class information attribute to be removed.
[in]bDeleteIf true, the class information attribute to be removed is removed from memory if it is found. The delivered attribute is no longer valid.
If false, the passed attribute remains the responsibility of the calling instance; must be removed from memory by the calling instance.
Returns
A return < 0 indicates an error.
See also
ClassInfo::getAttribute (...), ClassInfo::takeOverAttribute (...), ClassInfo::getAttributeByName (...), ClassInfo::getAttributeByFieldName (...)

◆ removeIndex()

int glo::ClassInfo::removeIndex ( ClassInfoIndex * pIndex,
bool bDelete = false )

Removes transferred class information index from the list of indexes.

Parameters
[in]pIndexThe class information index to be removed.
[in]bDeleteIf true, the class information index to be removed will be removed from memory if found. The delivered index is not valid anymore.
If false, the passed index remains the responsibility of the calling instance; therefore it must be removed from memory by the calling instance.
Returns
A return < 0 indicates an error.
See also
ClassInfo::getIndex (...), ClassInfo::getIndexFromName (...), ClassInfo::takeOverIndex (...)

◆ removeSubClassInfo()

void glo::ClassInfo::removeSubClassInfo ( unsigned long ulClassID)

Removes the class information with passed ClassID from its list of subclasses if available.

See also
ClassInfo::getSubClassInfos (...), ClassInfo::insertSubClassInfo (...)

◆ setAllAttributesTableName()

void glo::ClassInfo::setAllAttributesTableName ( const std::string & rsTableName) const

Sets in all class information attributes from its list of attributes the table name with passed value.

Parameters
[in]rsTableNameThe table name to be set.

◆ setClassDescription()

void glo::ClassInfo::setClassDescription ( const std::string & rstrClassDescription)

Sets the class description which can be copied into the generated header file of the class.

Parameters
[in]rstrClassDescriptionThe class description.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::getClassDescription()

◆ setClassID()

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

Sets the class ID.

Parameters
[in]ulClassIDThe class ID.
See also
ClassInfo::getClassID()

◆ setClassModifier()

void glo::ClassInfo::setClassModifier ( const std::string & rstrClassModifier)

Sets the class modifier like '__declspec(dllexport)' which can be copied into the generated header file of the class between "class" and the class name.

Parameters
[in]rstrClassModifierThe class modifier.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::getClassModifier()

◆ setFileDescription()

void glo::ClassInfo::setFileDescription ( const std::string & rstrFileDescription)

Sets the file description which can be copied into the generated header file of the class.

Parameters
[in]rstrFileDescriptionThe file description.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::getFileDescription()

◆ setFileName()

void glo::ClassInfo::setFileName ( const std::string & rsFileName)

Sets the file name in which the generated header file of the class can be copied.

Parameters
[in]rsFileNameThe file name.
Note
Will not streamed into a blob respectively taken from a blob.
See also
ClassInfo::getFileName()

◆ setName()

void glo::ClassInfo::setName ( const std::string & rsName)

Sets the class name.

Parameters
[in]rsNameThe class name.
Note
The class name can be extended by namespaces at the beginning, e.g. "toc::roc::MyName". This means that MyName is in the "roc" namespace, which in turn is in the "toc" namespace.
See also
ClassInfo::getName()
ClassInfo::getClassName()
ClassInfo::getNamespaces (...)

◆ setSchemaName()

void glo::ClassInfo::setSchemaName ( const std::string & rsSchemaName)

Sets the schema respectively database name.

Parameters
[in]rsSchemaNameThe schema respectively database name.
See also
ClassInfo::getSchemaName()

◆ setSuperClasses()

void glo::ClassInfo::setSuperClasses ( const std::string & rsSuperClasses)

Sets the superclass(es) as class ID separated by '|' such as "3|4|" => class has two superclasses with the class ID "3" and "4".

Parameters
[in]rsSuperClassesThe superclass(es).
See also
ClassInfo::getSuperClasses()

◆ setSuperClassesInfo()

void glo::ClassInfo::setSuperClassesInfo ( const std::string & rsSuperClassesInfo)

Sets the information about inheritance of superclass(es). For example, if value is " |virtual|" (first class not virtual, therefore space) and if, for example, in m_sSuperClasses the IDs are "3|4|", then inheritance from the class with ID 4 is virtual.

Parameters
[in]rsSuperClassesInfoThe information about inheritance of superclass(es).
See also
ClassInfo::getSuperClassesInfo()

◆ setSuperClassesInfoTuples()

void glo::ClassInfo::setSuperClassesInfoTuples ( const std::vector< std::shared_ptr< SuperClassIdInfoTuple > > & rSuperClassesInfoTuplesVector)

Adopts all class IDs and the corresponding information for inheritance from the transferred vector as superclasses.

Parameters
[in]rSuperClassesInfoTuplesVectorThe vector with the information.

◆ takeOverAttribute()

int glo::ClassInfo::takeOverAttribute ( ClassInfoAttribute * pAttribute)

Adopts passed class information attribute to its list of attributes.

Parameters
[in]pAttributeThe class information attribute to be transferred.
Returns
A return value < 0 indicates an error.
Attention
If the passed object is accepted (if no error), the responsibility for the passed object is transferred to this object. The passed object must not then be removed from memory by the calling instance.
See also
ClassInfo::getAttribute (...), ClassInfo::removeAttribute (...), ClassInfo::getAttributeByName (...), ClassInfo::getAttributeByFieldName (...) ClassInfo::getAttributeByID (...)

◆ takeOverIndex()

int glo::ClassInfo::takeOverIndex ( ClassInfoIndex * pIndex)

Adopts the transferred class information index into its list of indexes.

Parameters
[in]pIndexThe class information index to be transferred.
Returns
A return value < 0 indicates an error.
Attention
If taken over (no error), then the responsibility for passed object is transferred to this object. It must not be removed from memory by the calling instance!
See also
ClassInfo::getIndex (...), ClassInfo::getIndexFromName (...), ClassInfo::removeIndex (...)

Friends And Related Symbol Documentation

◆ SchemaInterface

friend class SchemaInterface
friend

Member Data Documentation

◆ m_AttributeList

std::list< ClassInfoAttribute *> glo::ClassInfo::m_AttributeList
private

List of attributes.

◆ m_AttributeListIterator

std::list<ClassInfoAttribute*>::iterator glo::ClassInfo::m_AttributeListIterator
private

Internal iterator of the list of attributes.

◆ m_IndexList

std::list<ClassInfoIndex *> glo::ClassInfo::m_IndexList
private

List of indexes.

◆ m_IndexListIterator

std::list<ClassInfoIndex*>::iterator glo::ClassInfo::m_IndexListIterator
private

Internal iterator of the list of indexes.

◆ m_sClassDescription

std::string glo::ClassInfo::m_sClassDescription
private

The class description which can be copied into the generated header file of the class.

Note
Will not streamed into or taken from a blob!

◆ m_sClassModifier

std::string glo::ClassInfo::m_sClassModifier
private

A class modifier like '__declspec(dllexport)' which can be copied into the generated header file of the class between "class" and the class name.

◆ m_sFileDescription

std::string glo::ClassInfo::m_sFileDescription
private

The file description which can be copied into the generated header file of the class.

Note
Will not streamed into or taken from a blob!

◆ m_sFileName

std::string glo::ClassInfo::m_sFileName
private

The file name in which the generated header file of the class is written.

Note
Will not streamed into or taken from a blob!

◆ m_sName

std::string glo::ClassInfo::m_sName
private

The class name.

◆ m_sSchemaName

std::string glo::ClassInfo::m_sSchemaName
private

Is set by the schema and is equivalent with the database name.

◆ m_sSuperClasses

std::string glo::ClassInfo::m_sSuperClasses
private

The superclass/s as class ID separated by '|' such as "3|4|" => class has two superclasses with the class ID "3" and "4".

◆ m_sSuperClassesInfo

std::string glo::ClassInfo::m_sSuperClassesInfo
private

Information about inheritance of superclass(es). For example, if value is " |virtual|" (first class not virtual, therefore space) and if, for example, in m_sSuperClasses the IDs are "3|4|", then inheritance from the class with ID 4 is virtual.

◆ m_SubClassInfoList

std::list<ClassInfo *> glo::ClassInfo::m_SubClassInfoList
private

List of subclasses. Is used by the SchemaInterface (performance). Is copied in the copy constructor and assignment operator not! When the object is fetched from the Base, this list is empty!

◆ m_ulClassID

unsigned long glo::ClassInfo::m_ulClassID
private

The unique ID of the class.


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