clang-tools  15.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 150 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 166 of file FeatureModule.h.

Constructor & Destructor Documentation

◆ FeatureModuleSet()

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

Member Function Documentation

◆ add()

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

Definition at line 174 of file FeatureModule.h.

References M.

◆ begin() [1/2]

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

Definition at line 169 of file FeatureModule.h.

◆ begin() [2/2]

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

Definition at line 171 of file FeatureModule.h.

◆ end() [1/2]

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

Definition at line 170 of file FeatureModule.h.

◆ end() [2/2]

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

Definition at line 172 of file FeatureModule.h.

◆ get() [1/2]

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

Definition at line 177 of file FeatureModule.h.

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

◆ get() [2/2]

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

Definition at line 180 of file FeatureModule.h.

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