2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20#include "net/config/ConfigSection.h"
22#ifndef DOXYGEN_SHOULD_SKIP_THIS
25#pragma GCC diagnostic push
26#pragma GCC diagnostic ignored "-Wfloat-equal"
28#if __has_warning
("-Wweak-vtables")
29#pragma GCC diagnostic ignored "-Wweak-vtables"
31#if __has_warning
("-Wcovered-switch-default")
32#pragma GCC diagnostic ignored "-Wcovered-switch-default"
36#include "utils/CLI11.hpp"
38#pragma GCC diagnostic pop
45 template <
typename ValueType>
47 ConfigSection::
addOption(
const std::string& name,
const std::string& description,
const std::string& typeName, ValueType defaultValue) {
48 return addOption(name, description, typeName)
49 ->default_val(defaultValue);
52 template <
typename ValueType>
54 const std::string& description,
55 const std::string& typeName,
56 ValueType defaultValue,
57 const CLI::Validator& additionalValidator) {
58 return addOption(name, description, typeName, defaultValue)
59 ->check(additionalValidator);
62 template <
typename ValueType>
64 ConfigSection::
addFlag(
const std::string& name,
const std::string& description,
const std::string& typeName, ValueType defaultValue) {
65 return addFlag(name, description, typeName)
66 ->default_val(defaultValue);
69 template <
typename ValueType>
70 CLI::Option* ConfigSection::
addFlag(
const std::string& name,
71 const std::string& description,
72 const std::string& typeName,
73 ValueType defaultValue,
74 const CLI::Validator& additionalValidator) {
75 return addFlag(name, description, typeName, defaultValue)
76 ->check(additionalValidator);
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)
int main(int argc, char *argv[])
static express::Router getRouter()
static WebApp getWebApp(const std::string &name)
static WebApp getWebApp(const std::string &name)