kdevplatform/language/duchain
#include <identifier.h>
Public Member Functions | |
IndexedTypeIdentifier (const IndexedQualifiedIdentifier &identifier=IndexedQualifiedIdentifier()) | |
IndexedTypeIdentifier (const QString &identifer, bool isExpression=false) | |
uint | hash () const |
IndexedQualifiedIdentifier | identifier () const |
bool | isConstant () const |
bool | isConstPointer (int depthNumber) const |
bool | isReference () const |
bool | isRValue () const |
bool | isVolatile () const |
bool | operator!= (const IndexedTypeIdentifier &rhs) const |
bool | operator== (const IndexedTypeIdentifier &rhs) const |
int | pointerDepth () const |
void | setIdentifier (const IndexedQualifiedIdentifier &id) |
void | setIsConstant (bool) |
void | setIsConstPointer (int depthNumber, bool constant) |
void | setIsReference (bool) |
void | setIsRValue (bool) |
void | setIsVolatile (bool) |
void | setPointerDepth (int) |
QString | toString (IdentifierStringFormattingOptions options=NoOptions) const |
Detailed Description
Extends IndexedQualifiedIdentifier by:
- Arbitrary count of pointer-poperators with cv-qualifiers
- Reference operator All the properties set here are respected in the hash value.
Definition at line 381 of file identifier.h.
Constructor & Destructor Documentation
◆ IndexedTypeIdentifier() [1/2]
|
explicit |
Variables like pointerDepth, isReference, etc.
are not parsed from the string, so this parsing is quite limited.
Definition at line 1267 of file identifier.cpp.
◆ IndexedTypeIdentifier() [2/2]
|
explicit |
Definition at line 1277 of file identifier.cpp.
Member Function Documentation
◆ hash()
uint KDevelop::IndexedTypeIdentifier::hash | ( | ) | const |
Definition at line 1150 of file identifier.cpp.
◆ identifier()
IndexedQualifiedIdentifier KDevelop::IndexedTypeIdentifier::identifier | ( | ) | const |
Definition at line 1424 of file identifier.cpp.
◆ isConstant()
bool KDevelop::IndexedTypeIdentifier::isConstant | ( | ) | const |
Definition at line 1197 of file identifier.cpp.
◆ isConstPointer()
bool KDevelop::IndexedTypeIdentifier::isConstPointer | ( | int | depthNumber | ) | const |
Whether the target of pointer 'depthNumber' is constant.
Definition at line 1232 of file identifier.cpp.
◆ isReference()
bool KDevelop::IndexedTypeIdentifier::isReference | ( | ) | const |
Definition at line 1177 of file identifier.cpp.
◆ isRValue()
bool KDevelop::IndexedTypeIdentifier::isRValue | ( | ) | const |
Definition at line 1187 of file identifier.cpp.
◆ isVolatile()
bool KDevelop::IndexedTypeIdentifier::isVolatile | ( | ) | const |
Definition at line 1207 of file identifier.cpp.
◆ operator!=()
bool KDevelop::IndexedTypeIdentifier::operator!= | ( | const IndexedTypeIdentifier & | rhs | ) | const |
Definition at line 1172 of file identifier.cpp.
◆ operator==()
bool KDevelop::IndexedTypeIdentifier::operator== | ( | const IndexedTypeIdentifier & | 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 1161 of file identifier.cpp.
◆ pointerDepth()
int KDevelop::IndexedTypeIdentifier::pointerDepth | ( | ) | const |
- Returns
- the pointer depth. Example for C++: "char*" has pointer-depth 1, "char***" has pointer-depth 3
Definition at line 1217 of file identifier.cpp.
◆ setIdentifier()
void KDevelop::IndexedTypeIdentifier::setIdentifier | ( | const IndexedQualifiedIdentifier & | id | ) |
Definition at line 1429 of file identifier.cpp.
◆ setIsConstant()
void KDevelop::IndexedTypeIdentifier::setIsConstant | ( | bool | isConst | ) |
Definition at line 1202 of file identifier.cpp.
◆ setIsConstPointer()
void KDevelop::IndexedTypeIdentifier::setIsConstPointer | ( | int | depthNumber, |
bool | constant | ||
) |
Definition at line 1237 of file identifier.cpp.
◆ setIsReference()
void KDevelop::IndexedTypeIdentifier::setIsReference | ( | bool | isRef | ) |
Definition at line 1182 of file identifier.cpp.
◆ setIsRValue()
void KDevelop::IndexedTypeIdentifier::setIsRValue | ( | bool | isRVal | ) |
Definition at line 1192 of file identifier.cpp.
◆ setIsVolatile()
void KDevelop::IndexedTypeIdentifier::setIsVolatile | ( | bool | isVolatile | ) |
Definition at line 1212 of file identifier.cpp.
◆ setPointerDepth()
void KDevelop::IndexedTypeIdentifier::setPointerDepth | ( | int | depth | ) |
Sets the pointer-depth to the specified count.
When the pointer-depth is increased, the "isConstPointer" values for new depths will be initialized with false.
For efficiency-reasons the maximum currently is 23.
Clear the mask in removed fields
Definition at line 1222 of file identifier.cpp.
◆ toString()
QString KDevelop::IndexedTypeIdentifier::toString | ( | IdentifierStringFormattingOptions | options = NoOptions | ) | const |
Definition at line 1245 of file identifier.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.