2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#include "net/config/ConfigSection.h"
44#ifndef DOXYGEN_SHOULD_SKIP_THIS
47#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wfloat-equal"
50#if __has_warning
("-Wweak-vtables")
51#pragma GCC diagnostic ignored "-Wweak-vtables"
53#if __has_warning
("-Wcovered-switch-default")
54#pragma GCC diagnostic ignored "-Wcovered-switch-default"
58#include "utils/CLI11.hpp"
60#pragma GCC diagnostic pop
67 template <
typename ValueType>
69 ConfigSection::
addOption(
const std::string& name,
const std::string& description,
const std::string& typeName, ValueType defaultValue) {
70 return addOption(name, description, typeName)
71 ->default_val(defaultValue);
74 template <
typename ValueType>
75 CLI::Option* ConfigSection::
addOption(
const std::string& name,
76 const std::string& description,
77 const std::string& typeName,
78 ValueType defaultValue,
79 const CLI::Validator& additionalValidator) {
80 return addOption(name, description, typeName, defaultValue)
81 ->check(additionalValidator);
84 template <
typename ValueType>
86 ConfigSection::
addFlag(
const std::string& name,
const std::string& description,
const std::string& typeName, ValueType defaultValue) {
87 return addFlag(name, description, typeName)
88 ->default_val(defaultValue);
91 template <
typename ValueType>
92 CLI::Option* ConfigSection::
addFlag(
const std::string& name,
93 const std::string& description,
94 const std::string& typeName,
95 ValueType defaultValue,
96 const CLI::Validator& additionalValidator) {
97 return addFlag(name, description, typeName, defaultValue)
98 ->check(additionalValidator);
#define DECLARE_ROOTROUTE_REQUESTMETHOD(METHOD)
#define DECLARE_ROUTE_REQUESTMETHOD(METHOD)
#define DEFINE_ROUTE_TEMPLATE_REQUESTMETHOD(METHOD, HTTP_METHOD)
#define DECLARE_ROUTER_REQUESTMETHOD(METHOD)
#define DEFINE_ROUTER_TEMPLATE_REQUESTMETHOD(METHOD, HTTP_METHOD)
StaticMiddleware & setIndex(const std::string &index)
StaticMiddleware & appendStdHeaders(const std::string &field, const std::string &value)
web::http::ConnectionState defaultConnectionState
StaticMiddleware & clearStdHeaders()
StaticMiddleware(const StaticMiddleware &)=delete
StaticMiddleware & setStdHeaders(const std::map< std::string, std::string > &stdHeaders)
StaticMiddleware & operator=(const StaticMiddleware &)=delete
static class StaticMiddleware & instance(const std::string &root)
StaticMiddleware & appendStdCookie(const std::string &name, const std::string &value, const std::map< std::string, std::string > &options={})
StaticMiddleware & appendStdHeaders(const std::map< std::string, std::string > &stdHeaders)
StaticMiddleware(const std::string &root)
StaticMiddleware & afterResponse(web::http::ConnectionState connectionState)
CLI::Option * addFlag(const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue)
CLI::Option * addFlag(const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue, const CLI::Validator &additionalValidator)
CLI::Option * addOption(const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue)
CLI::Option * addOption(const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue, const CLI::Validator &additionalValidator)
static express::Router getRouter()
static WebApp getWebApp(const std::string &name)
static WebApp getWebApp(const std::string &name)
int main(int argc, char *argv[])