OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
OdbDesignArgs.h
Go to the documentation of this file.
1#pragma once
2
3#include "CommandLineArgs.h"
4#include "../odbdesign_export.h"
5#include <string>
6
7namespace Odb::Lib::App
8{
10 {
11 public:
12 OdbDesignArgs(int argc, char* argv[]);
13
14 int port() const;
15 std::string bindAddress() const;
16 int grpcPort() const;
17 bool useHttps() const;
18 std::string designsDir() const;
19 std::string templatesDir() const;
20 bool help() const;
21 bool httpTrace() const;
22 std::string loadDesign() const;
23 bool loadAll() const;
24 bool disableAuthentication() const;
25 int cacheMaxMb() const;
26 int maxBackgroundLoads() const;
27
28 protected:
29 // Inherited via CommandLineArgs
30 std::string getUsageString() const override;
31
32 private:
33 constexpr static const int DEFAULT_PORT = 8888;
34 constexpr static const char *DEFAULT_BIND_ADDRESS = "0.0.0.0";
35 constexpr static const int DEFAULT_GRPC_PORT = 50051;
36 constexpr static const char* DEFAULT_DESIGNS_DIR = "designs";
37 constexpr static const char* DEFAULT_TEMPLATES_DIR = "templates";
38 constexpr static const bool DEFAULT_HELP = false;
39 constexpr static const bool DEFAULT_HTTP_TRACE = false;
40 constexpr static const char* DEFAULT_LOAD_DESIGN = "";
41 constexpr static const bool DEFAULT_LOAD_ALL = false;
42 constexpr static const bool DEFAULT_DISABLE_AUTH = false;
43 constexpr static const int DEFAULT_CACHE_MAX_MB = 4096;
44 constexpr static const int DEFAULT_MAX_BACKGROUND_LOADS = 2;
45
46 };
47}
#define ODBDESIGN_EXPORT