userver: components::ComponentList Class Reference
Loading...
Searching...
No Matches
components::ComponentList Class Referencefinal

#include <userver/components/component_list.hpp>

Detailed Description

A list to keep a unique list of components to start with components::Run(), utils::DaemonMain() or components::RunOnce().

Examples
samples/production_service/production_service.cpp.

Definition at line 133 of file component_list.hpp.

Public Member Functions

template<typename Component >
ComponentListAppend () &
 Appends a component with default component name Component::kName.
 
template<typename Component >
ComponentListAppend (std::string name) &
 Appends a component with a provided component name.
 
ComponentListAppendComponentList (ComponentList &&other) &
 Merges components from other into *this.
 
ComponentList && AppendComponentList (ComponentList &&other) &&
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Component , typename... Args>
ComponentList && Append (Args &&...) &&
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool Contains (std::string_view name) const
 
template<typename Component , typename... Args>
ComponentList && Append (Args &&... args) &&
 

Member Function Documentation

◆ Append() [1/3]

◆ Append() [2/3]

template<typename Component , typename... Args>
ComponentList && components::ComponentList::Append ( Args &&... args) &&

Definition at line 186 of file component_list.hpp.

◆ Append() [3/3]

template<typename Component >
ComponentList & components::ComponentList::Append ( std::string name) &

Appends a component with a provided component name.

Definition at line 179 of file component_list.hpp.

◆ Contains()

bool components::ComponentList::Contains ( std::string_view name) const
inline
Returns
true iff the component with provided name was added to *this.

Definition at line 154 of file component_list.hpp.


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