OdbDesignLib
OdbDesign ODB++ Parsing Library
 
Loading...
Searching...
No Matches
OdbDesignArgs.h
1#pragma once
2
3#include "CommandLineArgs.h"
4#include "../odbdesign_export.h"
5#include <string>
6
7namespace Odb::Lib::App
8{
9 class ODBDESIGN_EXPORT OdbDesignArgs : public Utils::CommandLineArgs
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
26 protected:
27 // Inherited via CommandLineArgs
28 std::string getUsageString() const override;
29
30 private:
31 constexpr static const int DEFAULT_PORT = 8888;
32 constexpr static const char *DEFAULT_BIND_ADDRESS = "0.0.0.0";
33 constexpr static const int DEFAULT_GRPC_PORT = 50051;
34 constexpr static const char* DEFAULT_DESIGNS_DIR = "designs";
35 constexpr static const char* DEFAULT_TEMPLATES_DIR = "templates";
36 constexpr static const bool DEFAULT_HELP = false;
37 constexpr static const bool DEFAULT_HTTP_TRACE = false;
38 constexpr static const char* DEFAULT_LOAD_DESIGN = "";
39 constexpr static const bool DEFAULT_LOAD_ALL = false;
40 constexpr static const bool DEFAULT_DISABLE_AUTH = false;
41
42 };
43}