r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ArgsHandler.hpp
Go to the documentation of this file.
1///
2/// @file ArgsHandler.hpp
3/// @brief This file contains the ArgsHandler class declaration
4/// @namespace cli
5///
6
7#pragma once
8
9#include <nlohmann/json.hpp>
10
11#include "Client/Common.hpp"
12
13namespace cli
14{
15
16 using json = nlohmann::json;
17
33 struct EnvConfig
34 {
35 };
36
37 ///
38 /// @class ArgsHandler
39 /// @brief Class to handle command line arguments
40 /// @namespace cli
41 ///
43 {
44
45 public:
46 ArgsHandler() = default;
47 ~ArgsHandler() = default;
48
49 ArgsHandler(const ArgsHandler &) = delete;
50 ArgsHandler &operator=(const ArgsHandler &) = delete;
53
54 static ArgsConfig ParseArgs(int argc, const char *const argv[]);
55 static EnvConfig ParseEnv(const char *const env[]);
56
57 private:
58 }; // class ArgsHandler
59
60} // namespace cli
Class to handle command line arguments.
static ArgsConfig ParseArgs(int argc, const char *const argv[])
ArgsHandler(ArgsHandler &&)=delete
ArgsHandler(const ArgsHandler &)=delete
ArgsHandler & operator=(const ArgsHandler &)=delete
ArgsHandler()=default
static EnvConfig ParseEnv(const char *const env[])
ArgsHandler & operator=(ArgsHandler &&)=delete
~ArgsHandler()=default
This file contains common definitions and constants.
constexpr auto DEFAULT_NETWORK_PORT
Definition Common.hpp:30
constexpr auto DEFAULT_NETWORK_HOST
Definition Common.hpp:29
constexpr auto DEFAULT_WINDOW_HEIGHT
Definition Common.hpp:35
constexpr auto DEFAULT_WINDOW_FRAME_LIMIT
Definition Common.hpp:36
constexpr auto DEFAULT_WINDOW_WIDTH
Definition Common.hpp:34
constexpr auto DEFAULT_WINDOW_FULLSCREEN
Definition Common.hpp:37
auto PLUGIN_AUDIO_SFML
Definition Common.hpp:54
auto PLUGIN_RENDERER_SFML
Definition Common.hpp:58
auto PLUGIN_NETWORK_ASIO_CLIENT
Definition Common.hpp:56
nlohmann::json json
unsigned int frameLimit
std::string host
static ArgsConfig fromFile(const std::string &path)
std::string audio_lib_path
unsigned int height
unsigned int port
unsigned int width
std::string network_lib_path
std::string renderer_lib_path