The Battle for Wesnoth  1.15.12+dev
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
campaignd::command_line Class Reference

#include <options.hpp>

Public Member Functions

 command_line (int argc, char **argv)
 Reads the command line. More...
 
const std::string & help_text () const
 Retrieves the –help text. More...
 

Public Attributes

bool help
 True if –help was passed. More...
 
bool version
 True if –version was passed. More...
 
std::optional< std::string > config_file
 Path to the add-ons server configuration file. More...
 
std::optional< std::string > server_dir
 Path to the add-ons server storage dir. More...
 
std::optional< unsigned short > port
 Port number on which the server will listen for incoming connections. More...
 
bool show_log_domains
 True if –logdomains was passed. More...
 
std::map< std::string, int > log_domain_levels
 Log domain/severity configuration. More...
 
bool log_precise_timestamps
 Whether to use higher precision for log timestamps. More...
 
bool report_timings
 Whether to report timing information for server requests. More...
 

Private Member Functions

 command_line (const std::vector< std::string > &args)
 
void parse_log_domains (const std::string &domains_string, int severity)
 

Private Attributes

std::string argv0_
 
std::vector< std::string > args_
 
std::string help_text_
 

Detailed Description

Definition at line 29 of file options.hpp.

Constructor & Destructor Documentation

◆ command_line() [1/2]

campaignd::command_line::command_line ( int  argc,
char **  argv 
)

Reads the command line.

Definition at line 30 of file options.cpp.

◆ command_line() [2/2]

campaignd::command_line::command_line ( const std::vector< std::string > &  args)
private

Member Function Documentation

◆ help_text()

const std::string& campaignd::command_line::help_text ( ) const
inline

Retrieves the –help text.

Note
This text is only available when –help is used. Otherwise, an empty string is returned instead.

Definition at line 43 of file options.hpp.

References help_text_.

◆ parse_log_domains()

void campaignd::command_line::parse_log_domains ( const std::string &  domains_string,
int  severity 
)
private

Member Data Documentation

◆ args_

std::vector<std::string> campaignd::command_line::args_
private

Definition at line 71 of file options.hpp.

Referenced by command_line().

◆ argv0_

std::string campaignd::command_line::argv0_
private

Definition at line 70 of file options.hpp.

Referenced by command_line().

◆ config_file

std::optional<std::string> campaignd::command_line::config_file

Path to the add-ons server configuration file.

Definition at line 54 of file options.hpp.

Referenced by command_line().

◆ help

bool campaignd::command_line::help

True if –help was passed.

Definition at line 49 of file options.hpp.

◆ help_text_

std::string campaignd::command_line::help_text_
private

Definition at line 72 of file options.hpp.

Referenced by command_line(), and help_text().

◆ log_domain_levels

std::map<std::string, int> campaignd::command_line::log_domain_levels

Log domain/severity configuration.

Definition at line 63 of file options.hpp.

Referenced by command_line().

◆ log_precise_timestamps

bool campaignd::command_line::log_precise_timestamps

Whether to use higher precision for log timestamps.

Definition at line 65 of file options.hpp.

Referenced by command_line().

◆ port

std::optional<unsigned short> campaignd::command_line::port

Port number on which the server will listen for incoming connections.

Definition at line 58 of file options.hpp.

Referenced by command_line().

◆ report_timings

bool campaignd::command_line::report_timings

Whether to report timing information for server requests.

Definition at line 67 of file options.hpp.

Referenced by command_line().

◆ server_dir

std::optional<std::string> campaignd::command_line::server_dir

Path to the add-ons server storage dir.

Definition at line 56 of file options.hpp.

Referenced by command_line().

◆ show_log_domains

bool campaignd::command_line::show_log_domains

True if –logdomains was passed.

Definition at line 61 of file options.hpp.

Referenced by command_line().

◆ version

bool campaignd::command_line::version

True if –version was passed.

Definition at line 51 of file options.hpp.

Referenced by command_line().


The documentation for this class was generated from the following files: