GlobalObjects
|
In objects of this class, the information for GlobalObjects is how an index is structured. More...
#include <GloClassInfoIndex.h>
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::IndexAttributeItem * | getIndexAttributeItem (EnSeekMode eMode) |
std::string | getLanguageIsoCodes (const std::string &sDelimiter="|") const |
std::vector< eut::LanguageFunctions::EnLanguageKey > | getLanguageKeys () const |
std::string | getLanguageKeysAsString (const std::string &sDelimiter="|") const |
std::size_t | getNumberOfAttributes () const |
bool | isCaseSensitive () const |
bool | isUnique () const |
ClassInfoIndex & | operator= (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 |
ClassInfo * | getParent () |
ClassInfoItem & | operator= (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::EnLanguageKey > | m_LanguageKeys |
Friends | |
class | ClassInfo |
In objects of this class, the information for GlobalObjects is how an index is structured.
glo::ClassInfoIndex::ClassInfoIndex | ( | ) |
Standard constructor.
glo::ClassInfoIndex::ClassInfoIndex | ( | const std::string & | rsIndexName | ) |
Constructor with parameter passing.
[in] | rsIndexName | An index name is expected. |
glo::ClassInfoIndex::ClassInfoIndex | ( | const std::string & | rsIndexName, |
bool | bUnique, | ||
bool | bCaseSensitive, | ||
const std::string & | rsLanguageKeys, | ||
bool | bIndexDelimiter ) |
Constructor with parameter passing.
[in] | rsIndexName | An index name is expected. |
[in] | bUnique | If true, a compound index entry may only occur once (see also m_bUnique). |
[in] | bCaseSensitive | If true, the characters of the index are case sensitive (see also m_bCaseSensitive). |
[in] | rsLanguageKeys | Language key to consider language dependencies (see also m_LanguageKeys). Multiple language keys can be passed, separated by a '|'. |
[in] | bIndexDelimiter | If true, an index delimiter is used. |
glo::ClassInfoIndex::ClassInfoIndex | ( | const std::string & | rsIndexName, |
bool | bUnique, | ||
bool | bCaseSensitive, | ||
const std::vector< eut::LanguageFunctions::EnLanguageKey > & | rLanguageKeys, | ||
bool | bIndexDelimiter ) |
Constructor with parameter passing.
[in] | rsIndexName | An index name is expected. |
[in] | bUnique | If true, a compound index entry may only occur once (see also m_bUnique). |
[in] | bCaseSensitive | If true, the characters of the index are case sensitive (see also m_bCaseSensitive). |
[in] | rLanguageKeys | Language key to consider language dependencies (see also m_LanguageKeys). |
[in] | bIndexDelimiter | If true, an index delimiter is used. |
glo::ClassInfoIndex::ClassInfoIndex | ( | const ClassInfoIndex & | rT | ) |
Copy constructor.
[in] | rT | The data is copied from this object. |
|
virtual |
Destructor.
std::string glo::ClassInfoIndex::_DEBUG_ToString | ( | ) |
Returns the object content as string.
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.
[in] | rAttributeList | The list to be copied. |
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).
[in] | rsIndexPath | The 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] | iSignificantCharacter | The number of characters used for the index. If 0, all characters are significant. |
[in] | bIsNum | If 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). |
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).
[in] | rIndexPathVector | The path to the index. See also IndexAttributeItem::m_IndexPathVector. |
[in] | iSignificantCharacter | The number of characters used for the index. If 0, all characters are significant. |
[in] | bIsNum | If 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). |
void glo::ClassInfoIndex::appendIndexAttributeItem | ( | IndexAttributeItem * | pIndexAttributeItem | ) |
Inserts the passed IndexAttribute at the end of its IndexAttribute list (m_AttributeList).
[in] | pIndexAttributeItem | The IndexAttribute. |
eut::ErrorNException | An exception is thrown if pIndexAttributeItem does not point to a valid object. |
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.
[in] | rAttributeList1 | |
[in] | rAttributeList2 |
void glo::ClassInfoIndex::clearAttributeList | ( | ) |
Removes all the entries in its own list of index attributes.
std::list< ClassInfoIndex::IndexAttributeItem * > * glo::ClassInfoIndex::getAttributeListPointer | ( | ) |
Returns a pointer to the own m_AttributeList.
ClassInfoIndex::IndexAttributeItem * glo::ClassInfoIndex::getIndexAttributeItem | ( | EnSeekMode | eMode | ) |
Returns an IndexAttribute from its list of IndexAttributes related to eMode.
[in] | eMode | The seek mode. |
Parameter examples:
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.
[in] | sDelimiter | The separator, default "|". |
std::vector< eut::LanguageFunctions::EnLanguageKey > glo::ClassInfoIndex::getLanguageKeys | ( | ) | const |
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.
[in] | sDelimiter | The separator, default "|". |
std::size_t glo::ClassInfoIndex::getNumberOfAttributes | ( | ) | const |
Returns the number of attributes of the index.
bool glo::ClassInfoIndex::isCaseSensitive | ( | ) | const |
Returns whether the characters of the index are case-sensitive.
bool glo::ClassInfoIndex::isUnique | ( | ) | const |
Returns whether the index is a unique index.
bool glo::ClassInfoIndex::operator!= | ( | const ClassInfoIndex & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
ClassInfoIndex & glo::ClassInfoIndex::operator= | ( | const ClassInfoIndex & | rT | ) |
Assignment operator.
[in] | rT | The data is transferred from this object. |
bool glo::ClassInfoIndex::operator== | ( | const ClassInfoIndex & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
void glo::ClassInfoIndex::removeLanguage | ( | eut::LanguageFunctions::EnLanguageKey | eLanguageKey | ) |
Removes the passed language key from m_LanguageKeys.
[in] | eLanguageKey | The language key to remove. |
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".
[in] | bCaseSensitive | If true, the characters of the index are case sensitive. |
void glo::ClassInfoIndex::setIndexDelimiter | ( | bool | bIndexDelimiter | ) |
Sets whether an index separator should be inserted.
[in] | bIndexDelimiter | see above. |
void glo::ClassInfoIndex::setLanguageKey | ( | eut::LanguageFunctions::EnLanguageKey | eLanguageKey | ) |
Adds the language key additionally to m_LanguageKeys.
[in] | eLanguageKey | The language key. |
void glo::ClassInfoIndex::setLanguageKeys | ( | const std::vector< eut::LanguageFunctions::EnLanguageKey > & | rLanguageKeys | ) |
Copies the passed language keys into m_LanguageKeys. Previous language keys are discarded.
[in] | rLanguageKeys | The language key(s). |
void glo::ClassInfoIndex::setUnique | ( | bool | bUnique | ) |
The information is set whether the index is a unique index or not.
[in] | bUnique | If true, a compound index value may only occur once. |
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.
[in] | rComparisionAttributeList | The comparison list. |
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).
[in,out] | rTargetAttributeList | The target list. |
[in] | rSourceAttributeList | The source list. |
bool glo::ClassInfoIndex::usesIndexDelimiter | ( | ) | const |
|
friend |
|
private |
The list of the individual index attributes.
|
private |
Internal iterator of the list of individual index attributes.
|
private |
If true, the characters of the index are case-sensitive; "Name" is then unequal to "name".
|
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
|
private |
If true, an index entry may occur only once.
|
private |
Language key to consider language dependencies like e.g. in German the view on umlauts ("Ä" == "AE").