clang-tools
10.0.0git
|
Interface for symbol indexes that can be used for searching or matching symbols among a set of symbols based on names or unique IDs. More...
#include <Index.h>
Public Member Functions | |
virtual | ~SymbolIndex ()=default |
virtual bool | fuzzyFind (const FuzzyFindRequest &Req, llvm::function_ref< void(const Symbol &)> Callback) const =0 |
Matches symbols in the index fuzzily and applies Callback on each matched symbol before returning. More... | |
virtual void | lookup (const LookupRequest &Req, llvm::function_ref< void(const Symbol &)> Callback) const =0 |
Looks up symbols with any of the given symbol IDs and applies Callback on each matched symbol. More... | |
virtual bool | refs (const RefsRequest &Req, llvm::function_ref< void(const Ref &)> Callback) const =0 |
Finds all occurrences (e.g. More... | |
virtual void | relations (const RelationsRequest &Req, llvm::function_ref< void(const SymbolID &Subject, const Symbol &Object)> Callback) const =0 |
Finds all relations (S, P, O) stored in the index such that S is among Req.Subjects and P is Req.Predicate, and invokes Callback for (S, O) in each. More... | |
virtual size_t | estimateMemoryUsage () const =0 |
Returns estimated size of index (in bytes). More... | |
Interface for symbol indexes that can be used for searching or matching symbols among a set of symbols based on names or unique IDs.
|
virtualdefault |
|
pure virtual |
Returns estimated size of index (in bytes).
Implemented in clang::clangd::SwapIndex, clang::clangd::dex::Dex, clang::clangd::MemIndex, and clang::clangd::MergedIndex.
Referenced by clang::clangd::MergedIndex::estimateMemoryUsage().
|
pure virtual |
Matches symbols in the index fuzzily and applies Callback
on each matched symbol before returning.
If returned Symbols are used outside Callback, they must be deep-copied!
Returns true if there may be more results (limited by Req.Limit).
Implemented in clang::clangd::SwapIndex, clang::clangd::dex::Dex, clang::clangd::MemIndex, and clang::clangd::MergedIndex.
Referenced by clang::clangd::runFuzzyFind().
|
pure virtual |
Looks up symbols with any of the given symbol IDs and applies Callback
on each matched symbol.
The returned symbol must be deep-copied if it's used outside Callback.
Implemented in clang::clangd::SwapIndex, clang::clangd::dex::Dex, clang::clangd::MemIndex, and clang::clangd::MergedIndex.
Referenced by clang::clangd::lookup().
|
pure virtual |
Finds all occurrences (e.g.
references, declarations, definitions) of a symbol and applies Callback
on each result.
Results should be returned in arbitrary order. The returned result must be deep-copied if it's used outside Callback.
Returns true if there will be more results (limited by Req.Limit);
Implemented in clang::clangd::SwapIndex, clang::clangd::dex::Dex, clang::clangd::MemIndex, and clang::clangd::MergedIndex.
|
pure virtual |
Finds all relations (S, P, O) stored in the index such that S is among Req.Subjects and P is Req.Predicate, and invokes Callback
for (S, O) in each.
Referenced by clang::clangd::MergedIndex::relations().