-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathStartupParameters.h
More file actions
53 lines (46 loc) · 1.75 KB
/
Copy pathStartupParameters.h
File metadata and controls
53 lines (46 loc) · 1.75 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
//==============================================================================
//
// StartupParameters.h
//
// Diplomacy AI Client - Part of the DAIDE project (www.daide.org.uk).
//
// (C) David Norman 2002 david@ellought.demon.co.uk
// (C) Greg Utas 2019-2025 greg@pentennea.com
//
// This software may be reused for non-commercial purposes without charge,
// and without notifying the authors. Use of any part of this software for
// commercial purposes without permission from the authors is prohibited.
//
#ifndef STARTUPPARAMETERS_H_INCLUDED
#define STARTUPPARAMETERS_H_INCLUDED
#include <iosfwd>
#include <string>
#include "NwTypes.h"
using namespace NetworkBase;
//------------------------------------------------------------------------------
namespace Diplomacy
{
// Command line parameters supported by BaseBot.
//
struct StartupParameters
{
bool ip_specified; // set if the server's IP address was provided
bool name_specified; // set if the server's name was provided
std::string server_name; // the server's name or IP address
ipport_t server_port; // the server's port number (in host order)
int log_level; // the level at which to generate logs
bool reconnect; // set if reconnection parameters were provided
std::string power; // the power for reconnection attempts
int passcode; // the passcode for reconnection attempts
// Initializes fields to default values.
//
StartupParameters();
// Sets the parameters from the command line that launched the program.
//
void SetFromCommandLine();
// Displays the parameters in STREAM, with each one preceded by PREFIX.
//
void Display(std::ostream& stream, const std::string& prefix) const;
};
}
#endif