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

In objects of this class, the information for GlobalObjects is how an index is structured. More...

#include <GloClassInfoIndex.h>

Inheritance diagram for glo::ClassInfoIndex:

Classes

class  IndexAttributeItem
 Information for the index about which attribute from which class, with how many characters, belongs to the index. More...
 

Public Member Functions

 ClassInfoIndex ()
 
 ClassInfoIndex (const ClassInfoIndex &rT)
 
 ClassInfoIndex (const std::string &rsIndexName)
 
 ClassInfoIndex (const std::string &rsIndexName, bool bUnique, bool bCaseSensitive, const std::string &rsLanguageKeys, bool bIndexDelimiter)
 
 ClassInfoIndex (const std::string &rsIndexName, bool bUnique, bool bCaseSensitive, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bIndexDelimiter)
 
virtual ~ClassInfoIndex ()
 
std::string _DEBUG_ToString ()
 
void acceptAttributeList (const std::list< IndexAttributeItem * > &rAttributeList)
 
void appendIndexAttributeItem (const std::string &rsIndexPath, int iSignificantCharacter, bool bIsNum)
 
void appendIndexAttributeItem (const std::vector< AttributeID > &rIndexPathVector, int iSignificantCharacter, bool bIsNum)
 
void appendIndexAttributeItem (IndexAttributeItem *pIndexAttributeItem)
 
bool attributeListsAreEqual (const std::list< IndexAttributeItem * > &rAttributeList1, const std::list< IndexAttributeItem * > &rAttributeList2) const
 
void clearAttributeList ()
 
std::list< ClassInfoIndex::IndexAttributeItem * > * getAttributeListPointer ()
 
ClassInfoIndex::IndexAttributeItemgetIndexAttributeItem (EnSeekMode eMode)
 
std::string getLanguageIsoCodes (const std::string &sDelimiter="|") const
 
std::vector< eut::LanguageFunctions::EnLanguageKeygetLanguageKeys () const
 
std::string getLanguageKeysAsString (const std::string &sDelimiter="|") const
 
std::size_t getNumberOfAttributes () const
 
bool isCaseSensitive () const
 
bool isUnique () const
 
ClassInfoIndexoperator= (const ClassInfoIndex &rT)
 
void removeLanguage (eut::LanguageFunctions::EnLanguageKey eLanguageKey)
 
void setCaseSensitive (bool bCaseSensitive)
 
void setIndexDelimiter (bool bIndexDelimiter)
 
void setLanguageKey (eut::LanguageFunctions::EnLanguageKey eLanguageKey)
 
void setLanguageKeys (const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys)
 
void setUnique (bool bUnique)
 
bool thisAttributeListsAreEqualWith (const std::list< IndexAttributeItem * > &rComparisionAttributeList) const
 
void transferAttributeList (std::list< IndexAttributeItem * > &rTargetAttributeList, const std::list< IndexAttributeItem * > &rSourceAttributeList)
 
bool usesIndexDelimiter () const
 
bool operator== (const ClassInfoIndex &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const ClassInfoIndex &rT) const
 Comparison operator, all attributes are compared.
 
- Public Member Functions inherited from glo::ClassInfoItem
 ClassInfoItem ()
 
 ClassInfoItem (const ClassInfoItem &rT)
 
 ClassInfoItem (const std::string &rsName)
 
virtual ~ClassInfoItem ()
 
unsigned long getClassID () const
 
std::string getClassName () const
 
std::string getDeveloperDescription () const
 
std::string getName () const
 
ClassInfogetParent ()
 
ClassInfoItemoperator= (const ClassInfoItem &rT)
 
void setDeveloperDescription (const std::string &rsDeveloperDescription)
 
void setMyClassInfo (ClassInfo *pMyClassInfo)
 
void setName (const std::string &rsName)
 
bool operator== (const ClassInfoItem &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const ClassInfoItem &rT) const
 Comparison operator, all attributes are compared.
 

Private Attributes

std::list< IndexAttributeItem * > m_AttributeList
 
std::list< IndexAttributeItem * >::iterator m_AttributeListIterator
 
bool m_bCaseSensitive
 
bool m_bIndexDelimiter
 
bool m_bUnique
 
std::vector< eut::LanguageFunctions::EnLanguageKeym_LanguageKeys
 

Friends

class ClassInfo
 

Detailed Description

In objects of this class, the information for GlobalObjects is how an index is structured.

See also
GlobalObjects Indices
Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ClassInfoIndex() [1/5]

glo::ClassInfoIndex::ClassInfoIndex ( )

Standard constructor.

◆ ClassInfoIndex() [2/5]

glo::ClassInfoIndex::ClassInfoIndex ( const std::string & rsIndexName)

Constructor with parameter passing.

Parameters
[in]rsIndexNameAn index name is expected.

◆ ClassInfoIndex() [3/5]

glo::ClassInfoIndex::ClassInfoIndex ( const std::string & rsIndexName,
bool bUnique,
bool bCaseSensitive,
const std::string & rsLanguageKeys,
bool bIndexDelimiter )

Constructor with parameter passing.

Parameters
[in]rsIndexNameAn index name is expected.
[in]bUniqueIf true, a compound index entry may only occur once (see also m_bUnique).
[in]bCaseSensitiveIf true, the characters of the index are case sensitive (see also m_bCaseSensitive).
[in]rsLanguageKeysLanguage key to consider language dependencies (see also m_LanguageKeys). Multiple language keys can be passed, separated by a '|'.
[in]bIndexDelimiterIf true, an index delimiter is used.
Note
In the parameter 'rsLanguages' the language keys are expected as numeric values, which correspond to eut::LanguageFunctions::EnLanguageKey.

◆ ClassInfoIndex() [4/5]

glo::ClassInfoIndex::ClassInfoIndex ( const std::string & rsIndexName,
bool bUnique,
bool bCaseSensitive,
const std::vector< eut::LanguageFunctions::EnLanguageKey > & rLanguageKeys,
bool bIndexDelimiter )

Constructor with parameter passing.

Parameters
[in]rsIndexNameAn index name is expected.
[in]bUniqueIf true, a compound index entry may only occur once (see also m_bUnique).
[in]bCaseSensitiveIf true, the characters of the index are case sensitive (see also m_bCaseSensitive).
[in]rLanguageKeysLanguage key to consider language dependencies (see also m_LanguageKeys).
[in]bIndexDelimiterIf true, an index delimiter is used.
Note
In the parameter 'rsLanguages' the language keys are expected as numeric values, which correspond to eut::LanguageFunctions::EnLanguageKey.

◆ ClassInfoIndex() [5/5]

glo::ClassInfoIndex::ClassInfoIndex ( const ClassInfoIndex & rT)

Copy constructor.

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

◆ ~ClassInfoIndex()

virtual glo::ClassInfoIndex::~ClassInfoIndex ( )
virtual

Destructor.

Member Function Documentation

◆ _DEBUG_ToString()

std::string glo::ClassInfoIndex::_DEBUG_ToString ( )

Returns the object content as string.

◆ acceptAttributeList()

void glo::ClassInfoIndex::acceptAttributeList ( const std::list< IndexAttributeItem * > & rAttributeList)

Deletes all entries in its own list of index attributes and adopts all entries (copies them) from the passed list.

Parameters
[in]rAttributeListThe list to be copied.

◆ appendIndexAttributeItem() [1/3]

void glo::ClassInfoIndex::appendIndexAttributeItem ( const std::string & rsIndexPath,
int iSignificantCharacter,
bool bIsNum )

Inserts an IndexAttribute from passed parameters at the end of its IndexAttribute list (m_AttributeList).

Parameters
[in]rsIndexPathThe path to the index as string, where the individual AttributeID's are separated by a dot.
E.g.: if the delivered string looks like this: "4.34.6.2.5.5" this means that the index path consists of three AttributeID's -> '4.34', '6.2' and '5.5'. the first digit is the class ID and the second digit the unique position.
[in]iSignificantCharacterThe number of characters used for the index. If 0, all characters are significant.
[in]bIsNumIf true, the index is considered a number (spaces are inserted at the beginning if necessary). If false, the index is treated as a string (blanks are added to the end if necessary).

◆ appendIndexAttributeItem() [2/3]

void glo::ClassInfoIndex::appendIndexAttributeItem ( const std::vector< AttributeID > & rIndexPathVector,
int iSignificantCharacter,
bool bIsNum )

Inserts an IndexAttribute from passed parameters at the end of its IndexAttribute list (m_AttributeList).

Parameters
[in]rIndexPathVectorThe path to the index. See also IndexAttributeItem::m_IndexPathVector.
[in]iSignificantCharacterThe number of characters used for the index. If 0, all characters are significant.
[in]bIsNumIf true, the index is considered a number (spaces are inserted at the beginning if necessary). If false, the index is treated as a string (blanks are added to the end if necessary).

◆ appendIndexAttributeItem() [3/3]

void glo::ClassInfoIndex::appendIndexAttributeItem ( IndexAttributeItem * pIndexAttributeItem)

Inserts the passed IndexAttribute at the end of its IndexAttribute list (m_AttributeList).

Parameters
[in]pIndexAttributeItemThe IndexAttribute.
Exceptions
eut::ErrorNExceptionAn exception is thrown if pIndexAttributeItem does not point to a valid object.
Attention
The passed IndexAttribute becomes the responsibility of this object; therefore it must not be removed from memory by the calling instance.

◆ attributeListsAreEqual()

bool glo::ClassInfoIndex::attributeListsAreEqual ( const std::list< IndexAttributeItem * > & rAttributeList1,
const std::list< IndexAttributeItem * > & rAttributeList2 ) const

Compares the entries from rAttributeList1 with the entries in rAttributeList2.

Parameters
[in]rAttributeList1
[in]rAttributeList2
Returns
If the same values are in both lists, true is returned, otherwise false. Also false is returned, if the entries are all the same, but the order is different.

◆ clearAttributeList()

void glo::ClassInfoIndex::clearAttributeList ( )

Removes all the entries in its own list of index attributes.

◆ getAttributeListPointer()

std::list< ClassInfoIndex::IndexAttributeItem * > * glo::ClassInfoIndex::getAttributeListPointer ( )

Returns a pointer to the own m_AttributeList.

Returns
The pointer to the m_AttributeList.
Attention
The returned object only lives as long as the returning object.

◆ getIndexAttributeItem()

ClassInfoIndex::IndexAttributeItem * glo::ClassInfoIndex::getIndexAttributeItem ( EnSeekMode eMode)

Returns an IndexAttribute from its list of IndexAttributes related to eMode.

Parameters
[in]eModeThe seek mode.

Parameter examples:

Returns
If successful, the index attribute.
Attention
The returned object lives only as long as the returning object.

◆ getLanguageIsoCodes()

std::string glo::ClassInfoIndex::getLanguageIsoCodes ( const std::string & sDelimiter = "|") const

Returns the ISO language codes from m_LanguageKeys in a string. If there are several entries, they are separated by an optional separator.

Parameters
[in]sDelimiterThe separator, default "|".
Returns
The language keys, e.g. "DEU-1|AUT|FRA".
See also
m_LanguageKeys

◆ getLanguageKeys()

std::vector< eut::LanguageFunctions::EnLanguageKey > glo::ClassInfoIndex::getLanguageKeys ( ) const

Returns the language keys from m_LanguageKeys.

Returns
The language keys.
See also
m_LanguageKeys

◆ getLanguageKeysAsString()

std::string glo::ClassInfoIndex::getLanguageKeysAsString ( const std::string & sDelimiter = "|") const

Returns the language keys from m_LanguageKeys in a string. If there are several entries, they are separated by an optional separator.

Parameters
[in]sDelimiterThe separator, default "|".
Returns
The language keys, e.g. "1|3|4".
See also
m_LanguageKeys

◆ getNumberOfAttributes()

std::size_t glo::ClassInfoIndex::getNumberOfAttributes ( ) const

Returns the number of attributes of the index.

◆ isCaseSensitive()

bool glo::ClassInfoIndex::isCaseSensitive ( ) const

Returns whether the characters of the index are case-sensitive.

Returns
If true, the characters of the index are case-sensitive.
See also
m_bCaseSensitive

◆ isUnique()

bool glo::ClassInfoIndex::isUnique ( ) const

Returns whether the index is a unique index.

Returns
If true, a compound index value may only occur once.
See also
m_bUnique

◆ operator!=()

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

Comparison operator, all attributes are compared.

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

◆ operator=()

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

Assignment operator.

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

◆ operator==()

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

Comparison operator, all attributes are compared.

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

◆ removeLanguage()

void glo::ClassInfoIndex::removeLanguage ( eut::LanguageFunctions::EnLanguageKey eLanguageKey)

Removes the passed language key from m_LanguageKeys.

Parameters
[in]eLanguageKeyThe language key to remove.
See also
m_LanguageKeys

◆ setCaseSensitive()

void glo::ClassInfoIndex::setCaseSensitive ( bool bCaseSensitive)

The information is set, whether the characters of the index are case-sensitive. Then "Name" is not equal to "name".

Parameters
[in]bCaseSensitiveIf true, the characters of the index are case sensitive.
See also
m_bCaseSensitive

◆ setIndexDelimiter()

void glo::ClassInfoIndex::setIndexDelimiter ( bool bIndexDelimiter)

Sets whether an index separator should be inserted.

Parameters
[in]bIndexDelimitersee above.
See also
m_bIndexDelimiter

◆ setLanguageKey()

void glo::ClassInfoIndex::setLanguageKey ( eut::LanguageFunctions::EnLanguageKey eLanguageKey)

Adds the language key additionally to m_LanguageKeys.

Parameters
[in]eLanguageKeyThe language key.
See also
m_LanguageKeys

◆ setLanguageKeys()

void glo::ClassInfoIndex::setLanguageKeys ( const std::vector< eut::LanguageFunctions::EnLanguageKey > & rLanguageKeys)

Copies the passed language keys into m_LanguageKeys. Previous language keys are discarded.

Parameters
[in]rLanguageKeysThe language key(s).
See also
m_LanguageKeys

◆ setUnique()

void glo::ClassInfoIndex::setUnique ( bool bUnique)

The information is set whether the index is a unique index or not.

Parameters
[in]bUniqueIf true, a compound index value may only occur once.
See also
m_bUnique

◆ thisAttributeListsAreEqualWith()

bool glo::ClassInfoIndex::thisAttributeListsAreEqualWith ( const std::list< IndexAttributeItem * > & rComparisionAttributeList) const

Compares the entries from the passed list with the entries in its own list of index attributes.

Parameters
[in]rComparisionAttributeListThe comparison list.
Returns
If the same values are in both lists, true is returned, otherwise false. Also false is returned, if the entries are all the same, but the order is different.

◆ transferAttributeList()

void glo::ClassInfoIndex::transferAttributeList ( std::list< IndexAttributeItem * > & rTargetAttributeList,
const std::list< IndexAttributeItem * > & rSourceAttributeList )

Transfers all entries (copies them) from rSourceAttributeList to the end of rTargetAttributeList (rTargetAttributeList can already contain objects).

Parameters
[in,out]rTargetAttributeListThe target list.
[in]rSourceAttributeListThe source list.

◆ usesIndexDelimiter()

bool glo::ClassInfoIndex::usesIndexDelimiter ( ) const

Returns whether an index separator is used.

Returns
See above.
See also
m_bIndexDelimiter

Friends And Related Symbol Documentation

◆ ClassInfo

friend class ClassInfo
friend

Member Data Documentation

◆ m_AttributeList

std::list<IndexAttributeItem *> glo::ClassInfoIndex::m_AttributeList
private

The list of the individual index attributes.

◆ m_AttributeListIterator

std::list<IndexAttributeItem*>::iterator glo::ClassInfoIndex::m_AttributeListIterator
private

Internal iterator of the list of individual index attributes.

◆ m_bCaseSensitive

bool glo::ClassInfoIndex::m_bCaseSensitive
private

If true, the characters of the index are case-sensitive; "Name" is then unequal to "name".

◆ m_bIndexDelimiter

bool glo::ClassInfoIndex::m_bIndexDelimiter
private

If an index consists of several attributes, they can be separated by a separator.
For example, if true and the separator is a '|', the attribute values "Smith" and "Jon" become the index entry "Smith|Jon" or, if no separator is to be used, "SmithJon".

/sa g_cIndexDelimiter

◆ m_bUnique

bool glo::ClassInfoIndex::m_bUnique
private

If true, an index entry may occur only once.

◆ m_LanguageKeys

std::vector< eut::LanguageFunctions::EnLanguageKey > glo::ClassInfoIndex::m_LanguageKeys
private

Language key to consider language dependencies like e.g. in German the view on umlauts ("Ä" == "AE").


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