⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
helpers.hpp
1
#
pragma
once
2
3
#
include
<
string
>
4
5
#
include
<
userver
/
compiler
/
demangle
.
hpp
>
6
#
include
<
userver
/
formats
/
json
/
value
.
hpp
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
namespace
storages
::
secdist
{
11
12
[[
noreturn
]]
void
ThrowInvalidSecdistType(
const
formats::
json
::Value& val,
13
const
std::string& type);
14
15
std::string GetString(
const
formats::
json
::Value& parent_val,
16
const
std::string& name);
17
18
int
GetInt(
const
formats::
json
::Value& parent_val,
const
std::string& name,
19
int
dflt);
20
21
template
<
typename
T>
22
T GetValue(
const
formats::
json
::Value& parent_val,
const
std::string& key,
23
const
T& dflt) {
24
const
auto
& val = parent_val[key];
25
try
{
26
return
val.
template
As<T>(dflt);
27
}
catch
(
const
formats::
json
::
TypeMismatchException
&) {
28
ThrowInvalidSecdistType(val, compiler::GetTypeName<T>());
29
}
30
}
31
32
void
CheckIsObject(
const
formats::
json
::Value& val,
const
std::string& name);
33
34
void
CheckIsArray(
const
formats::
json
::Value& val,
const
std::string& name);
35
36
}
// namespace storages::secdist
37
38
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
storages
secdist
helpers.hpp
Generated on Wed May 15 2024 22:22:31 for userver by
Doxygen
1.10.0