OdbDesignLib
OdbDesign ODB++ Parsing Library
OdbDesignArgs.h
1 #pragma once
2 
3 #include "CommandLineArgs.h"
4 #include "../odbdesign_export.h"
5 
6 namespace Odb::Lib::App
7 {
8  class ODBDESIGN_EXPORT OdbDesignArgs : public Utils::CommandLineArgs
9  {
10  public:
11  OdbDesignArgs(int argc, char* argv[]);
12 
13  int port() const;
14  bool useHttps() const;
15  std::string sslDir() const;
16  std::string designsDir() const;
17  std::string templatesDir() const;
18  bool help() const;
19  std::string loadDesign() const;
20  bool loadAll() const;
21  bool disableAuthentication() const;
22 
23  protected:
24  // Inherited via CommandLineArgs
25  std::string getUsageString() const override;
26 
27  private:
28  constexpr static const int DEFAULT_PORT = 8888;
29  constexpr static const bool DEFAULT_USE_HTTPS = false;
30  constexpr static const char* DEFAULT_SSL_DIR = "./ssl";
31  constexpr static const char* DEFAULT_DESIGNS_DIR = "designs";
32  constexpr static const char* DEFAULT_TEMPLATES_DIR = "templates";
33  constexpr static const bool DEFAULT_HELP = false;
34  constexpr static const char* DEFAULT_LOAD_DESIGN = "";
35  constexpr static const bool DEFAULT_LOAD_ALL = false;
36  constexpr static const bool DEFAULT_DISABLE_AUTH = false;
37 
38  };
39 }