The SymbolResolver
Class Reference
Declaration
Included Headers
Public Constructors Index
SymbolResolver (const FileDef *fileScope=nullptr) | |
Public Destructor Index
~SymbolResolver () | |
Public Member Functions Index
const ClassDef * | resolveClass (const Definition *scope, const QCString &name, bool maybeUnlinkable=false, bool mayBeHidden=false) |
Find the class definition matching name within the scope set. More... | |
ClassDefMutable * | resolveClassMutable (const Definition *scope, const QCString &name, bool mayBeUnlinkable=false, bool mayBeHidden=false) |
Wrapper around resolveClass that returns a mutable interface to the class object or a nullptr if the symbol is immutable. More... | |
const Definition * | resolveSymbol (const Definition *scope, const QCString &name, const QCString &args=QCString(), bool checkCV=false, bool insideCode=false, bool onlyLinkable=false) |
Find the symbool definition matching name within the scope set. More... | |
int | isAccessibleFrom (const Definition *scope, const Definition *item) |
Checks if symbol item is accessible from within scope. More... | |
int | isAccessibleFromWithExpScope (const Definition *scope, const Definition *item, const QCString &explicitScopePart) |
Check if symbol item is accessible from within scope, where it has to match the explicitScopePart. More... | |
void | setFileScope (const FileDef *fd) |
Sets or updates the file scope using when resolving symbols. More... | |
const MemberDef * | getTypedef () const |
In case a call to resolveClass() resolves to a type member (e.g. More... | |
QCString | getTemplateSpec () const |
In case a call to resolveClass() points to a template specialization, the template part is return via this method. More... | |
QCString | getResolvedType () const |
In case a call to resolveClass() points to a typedef or using declaration. More... | |
Private Member Attributes Index
std::unique_ptr< Private > | p |
Description
Helper class to find a class definition or check if A symbol is accessible in a given scope.
Definition at line 31 of file symbolresolver.h.
Public Constructors
SymbolResolver()
| explicit |
Declaration at line 34 of file symbolresolver.h, definition at line 1606 of file symbolresolver.cpp.
Reference p.
Public Destructor
~SymbolResolver()
|
Declaration at line 35 of file symbolresolver.h, definition at line 1611 of file symbolresolver.cpp.
Public Member Functions
getResolvedType()
|
In case a call to resolveClass() points to a typedef or using declaration.
The type name it resolved to is returned via this method.
Declaration at line 116 of file symbolresolver.h, definition at line 1726 of file symbolresolver.cpp.
Reference p.
Referenced by getCanonicalTypeForIdentifier and SymbolResolver::Private::getResolvedTypeRec.
getTemplateSpec()
|
In case a call to resolveClass() points to a template specialization, the template part is return via this method.
Declaration at line 111 of file symbolresolver.h, definition at line 1721 of file symbolresolver.cpp.
Reference p.
Referenced by findClassRelation and getCanonicalTypeForIdentifier.
getTypedef()
|
In case a call to resolveClass() resolves to a type member (e.g.
an enum) this method will return it.
Declaration at line 106 of file symbolresolver.h, definition at line 1716 of file symbolresolver.cpp.
Reference p.
Referenced by findClassRelation, getCanonicalTypeForIdentifier, getDefsOld and linkifyText.
isAccessibleFrom()
|
Checks if symbol item is accessible from within scope.
- Returns
-1 if item is not accessible or a number indicating how many scope levels up the nearest match was found.
Declaration at line 85 of file symbolresolver.h, definition at line 1685 of file symbolresolver.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Definition::name and p.
Referenced by SymbolResolver::Private::isAccessibleFrom, SymbolResolver::Private::isAccessibleFromWithExpScope and resolveTypeDef.
isAccessibleFromWithExpScope()
|
Check if symbol item is accessible from within scope, where it has to match the explicitScopePart.
- Returns
-1 if item is not accessible or a number indicating how many scope levels up the nearest match was found.
Declaration at line 93 of file symbolresolver.h, definition at line 1697 of file symbolresolver.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Definition::name and p.
Referenced by getMemberFromSymbol, SymbolResolver::Private::getResolvedSymbol, SymbolResolver::Private::getResolvedType, SymbolResolver::Private::isAccessibleFromWithExpScope and SymbolResolver::Private::substTypedef.
resolveClass()
|
Find the class definition matching name within the scope set.
- Parameters
-
scope The scope to search from.
name The name of the symbol.
maybeUnlinkable include unlinkable symbols in the search.
mayBeHidden include hidden symbols in the search.
As a result of this call the getters getTypedef(), getTemplateSpec(), and getResolvedType() are set as well.
Declaration at line 49 of file symbolresolver.h, definition at line 1616 of file symbolresolver.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, Config_getBool, Definition::definitionType, getClass, Definition::getLanguage, Doxygen::globalScope, Definition::isHidden, Definition::isLinkable, mangleCSharpGenericName, Definition::name, p, QCString::startsWith, QCString::stripWhiteSpace, Definition::TypeClass and Definition::TypeNamespace.
Referenced by findClassDefinition, findClassWithinClassContext, findUsingDeclImports, getCanonicalTypeForIdentifier, getDefsOld, isVarWithConstructor, linkifyText, normalizeNonTemplateArgumentsInString and resolveClassMutable.
resolveClassMutable()
| inline |
Wrapper around resolveClass that returns a mutable interface to the class object or a nullptr if the symbol is immutable.
Definition at line 57 of file symbolresolver.h.
References resolveClass and toClassDefMutable.
Referenced by ClassDefImpl::addTypeConstraint, findClassRelation, findUsedClassesForClass and resolveTemplateInstanceInType.
resolveSymbol()
|
Find the symbool definition matching name within the scope set.
- Parameters
-
scope The scope to search from.
name The name of the symbol.
args Argument list associated with the symbol (for functions)
checkCV Check const/volatile qualifiers (for methods)
insideCode Is the symbol found in a code fragment
onlyLinkable Only search linkable definitions
Declaration at line 73 of file symbolresolver.h, definition at line 1667 of file symbolresolver.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Definition::definitionType, Doxygen::globalScope, Definition::name, p, qPrint, Definition::qualifiedName, toMemberDef and Definition::TypeMember.
Referenced by findUsingDeclarations, findUsingDeclImports and getDefsNew.
setFileScope()
|
Sets or updates the file scope using when resolving symbols.
Declaration at line 99 of file symbolresolver.h, definition at line 1711 of file symbolresolver.cpp.
Reference p.
Referenced by getDefsNew.
Private Member Attributes
p
|
Definition at line 120 of file symbolresolver.h.
Referenced by getResolvedType, getTemplateSpec, getTypedef, isAccessibleFrom, isAccessibleFromWithExpScope, resolveClass, resolveSymbol, setFileScope and SymbolResolver.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus by Doxygen 1.14.0.