The Battle for Wesnoth  1.19.5+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...
 
utils::optional< std::string > config_file
 Path to the add-ons server configuration file. More...
 
utils::optional< std::string > server_dir
 Path to the add-ons server storage dir. More...
 
utils::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, lg::severitylog_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 31 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 31 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 45 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 73 of file options.hpp.

Referenced by command_line().

◆ argv0_

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

Definition at line 72 of file options.hpp.

Referenced by command_line().

◆ config_file

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

Path to the add-ons server configuration file.

Definition at line 56 of file options.hpp.

Referenced by command_line().

◆ help

bool campaignd::command_line::help

True if –help was passed.

Definition at line 51 of file options.hpp.

◆ help_text_

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

Definition at line 74 of file options.hpp.

Referenced by command_line(), and help_text().

◆ log_domain_levels

std::map<std::string, lg::severity> campaignd::command_line::log_domain_levels

Log domain/severity configuration.

Definition at line 65 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 67 of file options.hpp.

Referenced by command_line().

◆ port

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

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

Definition at line 60 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 69 of file options.hpp.

Referenced by command_line().

◆ server_dir

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

Path to the add-ons server storage dir.

Definition at line 58 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 63 of file options.hpp.

Referenced by command_line().

◆ version

bool campaignd::command_line::version

True if –version was passed.

Definition at line 53 of file options.hpp.

Referenced by command_line().


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