clang-tools  7.0.0
Public Member Functions | List of all members
clang::clangd::SymbolIndex Class Referenceabstract

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>

Inheritance diagram for clang::clangd::SymbolIndex:
[legend]

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...
 

Detailed Description

Interface for symbol indexes that can be used for searching or matching symbols among a set of symbols based on names or unique IDs.

Definition at line 317 of file Index.h.

Constructor & Destructor Documentation

◆ ~SymbolIndex()

virtual clang::clangd::SymbolIndex::~SymbolIndex ( )
virtualdefault

Member Function Documentation

◆ fuzzyFind()

virtual bool clang::clangd::SymbolIndex::fuzzyFind ( const FuzzyFindRequest Req,
llvm::function_ref< void(const Symbol &)>  Callback 
) const
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 MaxCandidateCount).

Implemented in clang::clangd::FileIndex, and clang::clangd::MemIndex.

◆ lookup()

virtual void clang::clangd::SymbolIndex::lookup ( const LookupRequest Req,
llvm::function_ref< void(const Symbol &)>  Callback 
) const
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::FileIndex, and clang::clangd::MemIndex.


The documentation for this class was generated from the following file: