Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
** EPITECH PROJECT, 2024 |
3 |
|
|
** zappy/ai/utils |
4 |
|
|
** File description: |
5 |
|
|
** initializer.hpp |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
#ifndef INITIALIZER_HPP_ |
9 |
|
|
#define INITIALIZER_HPP_ |
10 |
|
|
|
11 |
|
|
#include <iostream> |
12 |
|
|
#include "DisplayHelp.hpp" |
13 |
|
|
#include "../constant/Constants.hpp" |
14 |
|
|
|
15 |
|
|
class Initializer |
16 |
|
|
{ |
17 |
|
|
public: |
18 |
|
|
Initializer(); |
19 |
|
|
~Initializer(); |
20 |
|
|
|
21 |
|
|
unsigned int port; |
22 |
|
|
std::string teamName; |
23 |
|
|
std::string host; |
24 |
|
|
bool debug; // TODO: use --debug |
25 |
|
|
|
26 |
|
|
void parseArguments(int ac, char **av); |
27 |
|
|
|
28 |
|
|
// Exceptions |
29 |
|
|
class InitializerException : public std::exception |
30 |
|
|
{ |
31 |
|
|
public: |
32 |
|
✗ |
InitializerException(const std::string &msg) : _msg(msg) {} |
33 |
|
✗ |
const char *what() const noexcept override { return _msg.c_str(); } |
34 |
|
|
|
35 |
|
|
private: |
36 |
|
|
std::string _msg; |
37 |
|
|
}; |
38 |
|
|
}; |
39 |
|
|
#endif // INITIALIZER_HPP_ |
40 |
|
|
|