clang-tools 19.0.0git
Classes | Public Types | Public Member Functions | List of all members
clang::clangd::FeatureModuleSet Class Reference

A FeatureModuleSet is a collection of feature modules installed in clangd. More...

#include <FeatureModule.h>

Public Types

using iterator = llvm::pointee_iterator< decltype(Modules)::iterator >
 
using const_iterator = llvm::pointee_iterator< decltype(Modules)::const_iterator >
 

Public Member Functions

 FeatureModuleSet ()=default
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
template<typename Mod >
bool add (std::unique_ptr< Mod > M)
 
template<typename Mod >
Mod * get ()
 
template<typename Mod >
const Mod * get () const
 

Detailed Description

A FeatureModuleSet is a collection of feature modules installed in clangd.

Modules can be looked up by type, or used via the FeatureModule interface. This allows individual modules to expose a public API. For this reason, there can be only one feature module of each type.

The set owns the modules. It is itself owned by main, not ClangdServer.

Definition at line 151 of file FeatureModule.h.

Member Typedef Documentation

◆ const_iterator

using clang::clangd::FeatureModuleSet::const_iterator = llvm::pointee_iterator<decltype(Modules)::const_iterator>

Definition at line 168 of file FeatureModule.h.

◆ iterator

using clang::clangd::FeatureModuleSet::iterator = llvm::pointee_iterator<decltype(Modules)::iterator>

Definition at line 167 of file FeatureModule.h.

Constructor & Destructor Documentation

◆ FeatureModuleSet()

clang::clangd::FeatureModuleSet::FeatureModuleSet ( )
default

Member Function Documentation

◆ add()

template<typename Mod >
bool clang::clangd::FeatureModuleSet::add ( std::unique_ptr< Mod >  M)
inline

Definition at line 175 of file FeatureModule.h.

References M.

◆ begin() [1/2]

iterator clang::clangd::FeatureModuleSet::begin ( )
inline

Definition at line 170 of file FeatureModule.h.

◆ begin() [2/2]

const_iterator clang::clangd::FeatureModuleSet::begin ( ) const
inline

Definition at line 172 of file FeatureModule.h.

◆ end() [1/2]

iterator clang::clangd::FeatureModuleSet::end ( )
inline

Definition at line 171 of file FeatureModule.h.

◆ end() [2/2]

const_iterator clang::clangd::FeatureModuleSet::end ( ) const
inline

Definition at line 173 of file FeatureModule.h.

◆ get() [1/2]

template<typename Mod >
Mod * clang::clangd::FeatureModuleSet::get ( )
inline

Definition at line 178 of file FeatureModule.h.

Referenced by clang::clangd::ClangdServer::featureModule().

◆ get() [2/2]

template<typename Mod >
const Mod * clang::clangd::FeatureModuleSet::get ( ) const
inline

Definition at line 181 of file FeatureModule.h.


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