kdevplatform/language/duchain
#include <identifier.h>
Protected Member Functions | |
void | makeConstant () const |
void | prepareWrite () |
bool | sameIdentifiers (const QualifiedIdentifier &rhs) const |
Protected Attributes | |
union { | |
const QualifiedIdentifierPrivate< false > * cd | |
QualifiedIdentifierPrivate< true > * dd | |
}; | |
uint | m_index |
Detailed Description
Represents a qualified identifier.
QualifiedIdentifier has it's hash-values stored, so using the hash-values is very efficient.
Definition at line 245 of file identifier.h.
Constructor & Destructor Documentation
◆ QualifiedIdentifier() [1/6]
|
explicit |
Definition at line 666 of file identifier.cpp.
◆ QualifiedIdentifier() [2/6]
|
explicit |
Definition at line 696 of file identifier.cpp.
◆ QualifiedIdentifier() [3/6]
KDevelop::QualifiedIdentifier::QualifiedIdentifier | ( | const QualifiedIdentifier & | id | ) |
Definition at line 721 of file identifier.cpp.
◆ QualifiedIdentifier() [4/6]
|
explicit |
Definition at line 660 of file identifier.cpp.
◆ QualifiedIdentifier() [5/6]
KDevelop::QualifiedIdentifier::QualifiedIdentifier | ( | ) |
Definition at line 715 of file identifier.cpp.
◆ QualifiedIdentifier() [6/6]
KDevelop::QualifiedIdentifier::QualifiedIdentifier | ( | QualifiedIdentifier && | rhs | ) |
Definition at line 732 of file identifier.cpp.
◆ ~QualifiedIdentifier()
KDevelop::QualifiedIdentifier::~QualifiedIdentifier | ( | ) |
Definition at line 772 of file identifier.cpp.
Member Function Documentation
◆ at()
Identifier KDevelop::QualifiedIdentifier::at | ( | int | i | ) | const |
Definition at line 1109 of file identifier.cpp.
◆ beginsWith()
bool KDevelop::QualifiedIdentifier::beginsWith | ( | const QualifiedIdentifier & | other | ) | const |
Definition at line 925 of file identifier.cpp.
◆ clear()
void KDevelop::QualifiedIdentifier::clear | ( | ) |
Definition at line 1033 of file identifier.cpp.
◆ count()
int KDevelop::QualifiedIdentifier::count | ( | ) | const |
Definition at line 1049 of file identifier.cpp.
◆ explicitlyGlobal()
bool KDevelop::QualifiedIdentifier::explicitlyGlobal | ( | ) | const |
- Todo:
- Remove this flag
Definition at line 884 of file identifier.cpp.
◆ first()
Identifier KDevelop::QualifiedIdentifier::first | ( | ) | const |
Definition at line 1057 of file identifier.cpp.
◆ hash()
uint KDevelop::QualifiedIdentifier::hash | ( | ) | const |
The hash does not respect explicitlyGlobal, only the real scope.
Definition at line 959 of file identifier.cpp.
◆ index()
uint KDevelop::QualifiedIdentifier::index | ( | ) | const |
Definition at line 621 of file identifier.cpp.
◆ indexedAt()
IndexedIdentifier KDevelop::QualifiedIdentifier::indexedAt | ( | int | i | ) | const |
Definition at line 1114 of file identifier.cpp.
◆ indexedFirst()
IndexedIdentifier KDevelop::QualifiedIdentifier::indexedFirst | ( | ) | const |
Definition at line 1062 of file identifier.cpp.
◆ indexedLast()
IndexedIdentifier KDevelop::QualifiedIdentifier::indexedLast | ( | ) | const |
Definition at line 1075 of file identifier.cpp.
◆ inRepository()
bool KDevelop::QualifiedIdentifier::inRepository | ( | ) | const |
- Returns
- true if this qualified identifier is already in the persistent identifier repository
Definition at line 652 of file identifier.cpp.
◆ isEmpty()
bool KDevelop::QualifiedIdentifier::isEmpty | ( | ) | const |
Definition at line 1041 of file identifier.cpp.
◆ isExpression()
bool KDevelop::QualifiedIdentifier::isExpression | ( | ) | const |
A flag that can be set by setIsExpression.
Definition at line 868 of file identifier.cpp.
◆ isQualified()
bool KDevelop::QualifiedIdentifier::isQualified | ( | ) | const |
Definition at line 982 of file identifier.cpp.
◆ last()
Identifier KDevelop::QualifiedIdentifier::last | ( | ) | const |
Definition at line 1070 of file identifier.cpp.
◆ left()
|
inline |
Copy the leftmost len number of identifiers.
- Parameters
-
len The number of identifiers to copy, or if negative, the number of identifiers to omit from the right
Definition at line 298 of file identifier.h.
◆ makeConstant()
|
protected |
Definition at line 1125 of file identifier.cpp.
◆ merge()
QualifiedIdentifier KDevelop::QualifiedIdentifier::merge | ( | const QualifiedIdentifier & | base | ) | const |
- Returns
- a QualifiedIdentifier with this one appended to the other.
It is explicitly global if either this or base is.
Definition at line 824 of file identifier.cpp.
◆ mid()
QualifiedIdentifier KDevelop::QualifiedIdentifier::mid | ( | int | pos, |
int | len = -1 |
||
) | const |
- Parameters
-
pos Position where to start the copy. len If this is -1, the whole following part will be returned.
Definition at line 1089 of file identifier.cpp.
◆ operator!=()
bool KDevelop::QualifiedIdentifier::operator!= | ( | const QualifiedIdentifier & | rhs | ) | const |
Definition at line 920 of file identifier.cpp.
◆ operator+() [1/3]
QualifiedIdentifier KDevelop::QualifiedIdentifier::operator+ | ( | const Identifier & | rhs | ) | const |
Nicer interfaces to merge.
Definition at line 842 of file identifier.cpp.
◆ operator+() [2/3]
QualifiedIdentifier KDevelop::QualifiedIdentifier::operator+ | ( | const IndexedIdentifier & | rhs | ) | const |
Definition at line 855 of file identifier.cpp.
◆ operator+() [3/3]
QualifiedIdentifier KDevelop::QualifiedIdentifier::operator+ | ( | const QualifiedIdentifier & | rhs | ) | const |
Definition at line 831 of file identifier.cpp.
◆ operator+=() [1/3]
QualifiedIdentifier & KDevelop::QualifiedIdentifier::operator+= | ( | const Identifier & | rhs | ) |
Definition at line 849 of file identifier.cpp.
◆ operator+=() [2/3]
QualifiedIdentifier & KDevelop::QualifiedIdentifier::operator+= | ( | const IndexedIdentifier & | rhs | ) |
Definition at line 862 of file identifier.cpp.
◆ operator+=() [3/3]
QualifiedIdentifier & KDevelop::QualifiedIdentifier::operator+= | ( | const QualifiedIdentifier & | rhs | ) |
Definition at line 836 of file identifier.cpp.
◆ operator=() [1/2]
QualifiedIdentifier & KDevelop::QualifiedIdentifier::operator= | ( | const QualifiedIdentifier & | rhs | ) |
Definition at line 744 of file identifier.cpp.
◆ operator=() [2/2]
QualifiedIdentifier & KDevelop::QualifiedIdentifier::operator= | ( | QualifiedIdentifier && | rhs | ) |
Definition at line 757 of file identifier.cpp.
◆ operator==()
bool KDevelop::QualifiedIdentifier::operator== | ( | const QualifiedIdentifier & | rhs | ) | const |
The comparison-operators do not respect explicitlyGlobal and isExpression, they only respect the real scope.
This is for convenient use in hash-tables etc.
Definition at line 913 of file identifier.cpp.
◆ pop()
void KDevelop::QualifiedIdentifier::pop | ( | ) |
Pops one identifier from back:
Definition at line 1025 of file identifier.cpp.
◆ prepareWrite()
|
protected |
Definition at line 1134 of file identifier.cpp.
◆ push() [1/3]
void KDevelop::QualifiedIdentifier::push | ( | const Identifier & | id | ) |
Append id
to this qualified identifier.
NOTE: If you have an indexed identifier available, use the above method instead.
Definition at line 987 of file identifier.cpp.
◆ push() [2/3]
void KDevelop::QualifiedIdentifier::push | ( | const IndexedIdentifier & | id | ) |
Append id
to this qualified identifier.
Definition at line 995 of file identifier.cpp.
◆ push() [3/3]
void KDevelop::QualifiedIdentifier::push | ( | const QualifiedIdentifier & | id | ) |
Append all identifiers of id
to this qualified identifier.
Definition at line 1006 of file identifier.cpp.
◆ sameIdentifiers()
|
protected |
Definition at line 901 of file identifier.cpp.
◆ setExplicitlyGlobal()
void KDevelop::QualifiedIdentifier::setExplicitlyGlobal | ( | bool | eg | ) |
Definition at line 893 of file identifier.cpp.
◆ setIsExpression()
void KDevelop::QualifiedIdentifier::setIsExpression | ( | bool | is | ) |
Set the expression-flag, that can be retrieved by isExpression().
This flag is not respected while creating the hash-value and while operator==() comparison. It is respected while isSame(..) comparison.
Definition at line 876 of file identifier.cpp.
◆ top()
Identifier KDevelop::QualifiedIdentifier::top | ( | ) | const |
Definition at line 1084 of file identifier.cpp.
◆ toString()
QString KDevelop::QualifiedIdentifier::toString | ( | IdentifierStringFormattingOptions | options = NoOptions | ) | const |
Definition at line 798 of file identifier.cpp.
◆ toStringList()
QStringList KDevelop::QualifiedIdentifier::toStringList | ( | IdentifierStringFormattingOptions | options = NoOptions | ) | const |
Definition at line 778 of file identifier.cpp.
Member Data Documentation
◆ @26
union { ... } |
◆ cd
|
mutable |
Definition at line 371 of file identifier.h.
◆ dd
|
mutable |
Definition at line 370 of file identifier.h.
◆ m_index
|
mutableprotected |
Definition at line 368 of file identifier.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:29 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.