-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathcommandlineparser.h
More file actions
101 lines (91 loc) · 3.64 KB
/
commandlineparser.h
File metadata and controls
101 lines (91 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#pragma once
#include <QCommandLineParser>
#include <QObject>
#include <QCoreApplication>
class CommandLineParser final : public QObject
{
Q_OBJECT
public:
static const char* const ARG_MODS;
static const char* const ARG_SLAVE;
static const char* const ARG_SLAVENAME;
static const char* const ARG_NOUI;
static const char* const ARG_NOAUDIO;
static const char* const ARG_INITSCRIPT;
static const char* const ARG_CREATESLAVELOGS;
static const char* const ARG_SLAVEADDRESS;
static const char* const ARG_SLAVESECONDARYADDRESS;
static const char* const ARG_SLAVEPORT;
static const char* const ARG_MASTERADDRESS;
static const char* const ARG_MASTERPORT;
static const char* const ARG_UPDATE;
static const char* const ARG_SPAWNAIPROCESS;
static const char* const ARG_AISLAVE;
static const char* const ARG_USERPATH;
static const char* const ARG_DEBUGLEVEL;
static const char* const ARG_SLAVETRAINING;
static const char* const ARG_REJOINPASSWORD;
static const char* const ARG_SERVER;
static const char* const ARG_SERVERSLAVEHOSTOPTIONS;
static const char* const ARG_SERVERLISTENADDRESS;
static const char* const ARG_SERVERSECONDARYLISTENADDRESS;
static const char* const ARG_SERVERLISTENPORT;
static const char* const ARG_SERVERSLAVELISTENADDRESS;
static const char* const ARG_SERVERSLAVELISTENPORT;
static const char* const ARG_SERVERSLAVEDESPAWNTIME;
static const char* const ARG_SERVERSLAVESUSPENDEDTIME;
static const char* const ARG_SERVERSAVEFILE;
static const char* const ARG_MAILSERVERADDRESS;
static const char* const ARG_MAILSERVERPORT;
static const char* const ARG_MAILSERVERCONNECTIONTYPE;
static const char* const ARG_MAILSERVERUSERNAME;
static const char* const ARG_MAILSERVERPASSWORD;
static const char* const ARG_MAILSERVERSENDADDRESS;
static const char* const ARG_MAILSERVERAUTHMETHOD;
CommandLineParser();
void parseArgsPhaseOne(QCoreApplication & app);
void parseArgsPhaseTwo();
void startSlaveGame() const;
bool getUserPath(QString & path);
QString getServerSaveFile();
private:
void disableUi();
private:
QCommandLineOption m_debugLevel;
QCommandLineOption m_userPath;
QCommandLineOption m_aiSlave;
QCommandLineOption m_spawnAiProcess;
QCommandLineOption m_mods;
QCommandLineOption m_update;
QCommandLineOption m_slave;
QCommandLineOption m_noUi;
QCommandLineOption m_noAudio;
QCommandLineOption m_iniScript;
QCommandLineOption m_createSlaveLogs;
QCommandLineOption m_slaveAddress;
QCommandLineOption m_secondarySlaveAddress;
QCommandLineOption m_slavePort;
QCommandLineOption m_masterAddress;
QCommandLineOption m_masterPort;
QCommandLineOption m_slaveName;
QCommandLineOption m_server;
QCommandLineOption m_serverSlaveHostOptions;
QCommandLineOption m_serverListenAddress;
QCommandLineOption m_serverSecondaryListenAddress;
QCommandLineOption m_serverListenPort;
QCommandLineOption m_serverSlaveListenAddress;
QCommandLineOption m_serverSlaveListenPort;
QCommandLineOption m_serverSlaveDespawnTime;
QCommandLineOption m_serverSuspendedDespawnTime;
QCommandLineOption m_mailServerAddress;
QCommandLineOption m_mailServerPort;
QCommandLineOption m_mailServerConnectionType;
QCommandLineOption m_mailServerUsername;
QCommandLineOption m_mailServerPassword;
QCommandLineOption m_mailServerSendAddress;
QCommandLineOption m_mailServerAuthMethod;
QCommandLineOption m_serverSaveFile;
QCommandLineOption m_slaveTraining;
QCommandLineOption m_rejoinPassword;
QCommandLineParser m_parser;
};