userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
component_config.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file
4
/// @brief @copybrief components::ComponentConfig
5
6
#
include
<
cstdint
>
7
#
include
<
string
>
8
#
include
<
unordered_map
>
9
10
#
include
<
userver
/
yaml_config
/
yaml_config
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
components
{
15
16
/// @brief Represents the config of a component that is being constructed;
17
/// see @ref scripts/docs/en/userver/component_system.md for introduction into components.
18
class
ComponentConfig
final
:
public
yaml_config
::
YamlConfig
{
19
public
:
20
/// Creates an empty config
21
explicit
ComponentConfig
(std::string name);
22
23
ComponentConfig(
yaml_config
::
YamlConfig
value);
24
25
/// Name of the current component
26
const
std::string&
Name
()
const
;
27
28
void
SetName(std::string name);
29
30
private
:
31
std::string name_;
32
};
33
34
ComponentConfig Parse(
const
yaml_config
::
YamlConfig
& value,
formats
::
parse
::
To
<ComponentConfig>);
35
36
using
ComponentConfigMap = std::unordered_map<std::string,
const
ComponentConfig&>;
37
38
}
// namespace components
39
40
USERVER_NAMESPACE_END
userver
components
component_config.hpp
Generated on Sat Jul 19 2025 12:44:01 for userver by
Doxygen
1.9.8