The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
commandline_options Class Reference

#include <commandline_options.hpp>

Public Member Functions

 commandline_options (const std::vector< std::string > &args)
 
config to_config () const
 

Public Attributes

boost::optional< std::string > bunzip2
 Non-empty if –bunzip2 was given on the command line. Uncompresses a .bz2 file and exits. More...
 
boost::optional< std::string > bzip2
 Non-empty if –bzip2 was given on the command line. Compresses a file to .bz2 and exits. More...
 
boost::optional< std::string > campaign
 Non-empty if –campaign was given on the command line. ID of the campaign we want to start. More...
 
boost::optional< int > campaign_difficulty
 Non-empty if –campaign-difficulty was given on the command line. Numerical difficulty of the campaign to be played. Dependent on –campaign. More...
 
boost::optional< std::string > campaign_scenario
 Non-empty if –campaign-scenario was given on the command line. Chooses starting scenario in the campaign to be played. Dependent on –campaign. More...
 
bool clock
 True if –clock was given on the command line. Enables. More...
 
boost::optional< std::string > core_id
 Non-empty if –core was given on the command line. Chooses the core to be loaded. More...
 
bool data_path
 True if –data-path was given on the command line. Prints path to data directory and exits. More...
 
boost::optional< std::string > data_dir
 Non-empty if –data-dir was given on the command line. Sets the config dir to the specified one. More...
 
bool debug
 True if –debug was given on the command line. Enables debug mode. More...
 
bool debug_lua
 True if –debug-lua was given in the commandline. Enables some Lua debugging mechanisms. More...
 
boost::optional< std::string > editor
 Non-empty if –editor was given on the command line. Goes directly into editor. If string is longer than 0, it contains path to the file to edit. More...
 
bool fps
 True if –fps was given on the command line. Shows number of fps. More...
 
bool fullscreen
 True if –fullscreen was given on the command line. Starts Wesnoth in fullscreen mode. More...
 
boost::optional< std::string > gunzip
 Non-empty if –gunzip was given on the command line. Uncompresses a .gz file and exits. More...
 
boost::optional< std::string > gzip
 Non-empty if –gzip was given on the command line. Compresses a file to .gz and exits. More...
 
bool help
 True if –help was given on the command line. Prints help and exits. More...
 
boost::optional< std::string > language
 Non-empty if –language was given on the command line. Sets the language for this session. More...
 
boost::optional< std::vector
< std::pair< int, std::string > > > 
log
 Contains parsed arguments of –log-* (e.g. More...
 
boost::optional< int > log_strict_level
 Non-empty if –log-strict was given. More...
 
boost::optional< std::string > load
 Non-empty if –load was given on the command line. Savegame specified to load after start. More...
 
boost::optional< std::string > logdomains
 Non-empty if –logdomains was given on the command line. Prints possible logdomains filtered by given string and exits. More...
 
bool log_precise_timestamps
 True if –log-precise was given on the command line. Shows timestamps in log with more precision. More...
 
bool multiplayer
 True if –multiplayer was given on the command line. Goes directly into multiplayer mode. More...
 
boost::optional< std::vector
< std::pair< unsigned int,
std::string > > > 
multiplayer_ai_config
 Non-empty if –ai-config was given on the command line. Vector of pairs (side number, value). Dependent on –multiplayer. More...
 
boost::optional< std::vector
< std::pair< unsigned int,
std::string > > > 
multiplayer_algorithm
 Non-empty if –algorithm was given on the command line. Vector of pairs (side number, value). Dependent on –multiplayer. More...
 
boost::optional< std::vector
< std::pair< unsigned int,
std::string > > > 
multiplayer_controller
 Non-empty if –controller was given on the command line. Vector of pairs (side number, controller). Dependent on –multiplayer. More...
 
boost::optional< std::string > multiplayer_era
 Non-empty if –era was given on the command line. Dependent on –multiplayer. More...
 
bool multiplayer_exit_at_end
 True if –exit-at-and was given on the command line. Dependent on –multiplayer. More...
 
bool multiplayer_ignore_map_settings
 True if –ignore-map-settings was given at the command line. Do not use map settings. More...
 
boost::optional< std::string > multiplayer_label
 Non-empty if –label was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< std::vector
< std::tuple< unsigned int,
std::string, std::string > > > 
multiplayer_parm
 Non-empty if –parm was given on the command line. Vector of pairs (side number, parm name, parm value). Dependent on –multiplayer. More...
 
boost::optional< unsigned int > multiplayer_repeat
 Repeats specified by –multiplayer-repeat option. Repeats a multiplayer game after it is finished. Dependent on –multiplayer. More...
 
boost::optional< std::string > multiplayer_scenario
 Non-empty if –scenario was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< std::vector
< std::pair< unsigned int,
std::string > > > 
multiplayer_side
 Non-empty if –side was given on the command line. Vector of pairs (side number, faction id). Dependent on –multiplayer. More...
 
boost::optional< std::string > multiplayer_turns
 Non-empty if –turns was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< int > max_fps
 Max FPS specified by –max-fps option. More...
 
bool noaddons
 True if –noaddons was given on the command line. Disables the loading of all add-ons. More...
 
bool nocache
 True if –nocache was given on the command line. Disables cache usage. More...
 
bool nodelay
 True if –nodelay was given on the command line. More...
 
bool nogui
 True if –nogui was given on the command line. Disables GUI. More...
 
bool nomusic
 True if –nomusic was given on the command line. Disables music. More...
 
bool nosound
 True if –nosound was given on the command line. Disables sound. More...
 
bool new_widgets
 True if –new-widgets was given on the command line. Hidden option to enable the new widget toolkit. More...
 
bool path
 True if –path was given on the command line. Prints the path to data directory and exits. More...
 
bool preprocess
 True if –preprocess was given on the command line. Starts Wesnoth in preprocessor-only mode. More...
 
boost::optional< std::vector
< std::string > > 
preprocess_defines
 Defines that were given to the –preprocess option. More...
 
boost::optional< std::string > preprocess_input_macros
 Non-empty if –preprocess-input-macros was given on the command line. Specifies a file that contains [preproc_define]s to be included before preprocessing. Dependant on –preprocess. More...
 
boost::optional< std::string > preprocess_output_macros
 Non-empty if –preprocess-output-macros was given on the command line. Outputs all preprocessed macros to the specified file. Dependant on –preprocess. More...
 
boost::optional< std::string > preprocess_path
 Path to parse that was given to the –preprocess option. More...
 
boost::optional< std::string > preprocess_target
 Target (output) path that was given to the –preprocess option. More...
 
boost::optional< std::pair
< int, int > > 
resolution
 Pair of AxB values specified after –resolution. Changes Wesnoth resolution. More...
 
boost::optional< unsigned int > rng_seed
 RNG seed specified by –rng-seed option. Initializes RNG with given seed. More...
 
boost::optional< std::string > server
 Non-empty if –server was given on the command line. Connects Wesnoth to specified server. If no server was specified afterwards, contains an empty string. More...
 
boost::optional< std::string > username
 Non-empty if –username was given on the command line. Forces Wesnoth to use this network username. More...
 
boost::optional< std::string > password
 Non-empty if –password was given on the command line. Forces Wesnoth to use this network password. More...
 
boost::optional< std::string > render_image
 Image path to render. First parameter after –render-image. More...
 
boost::optional< std::string > render_image_dst
 Output file to put rendered image path in. Optional second parameter after –render-image. More...
 
bool screenshot
 True if –screenshot was given on the command line. Starts Wesnoth in screenshot mode. More...
 
boost::optional< std::string > screenshot_map_file
 Map file to make a screenshot of. First parameter given after –screenshot. More...
 
boost::optional< std::string > screenshot_output_file
 Output file to put screenshot in. Second parameter given after –screenshot. More...
 
boost::optional< std::string > script_file
 File to load lua script from. More...
 
boost::optional< std::string > plugin_file
 File to load a lua plugin (similar to a script) from. Experimental / may replace script. More...
 
bool script_unsafe_mode
 Whether to load the "package" package for the scripting environment. (This allows to load arbitrary lua packages, and gives untrusted lua the same permissions as wesnoth executable) More...
 
bool strict_validation
 True if –strict-validation was given on the command line. Makes Wesnoth trust validation errors as fatal WML errors and create WML exception, if so. More...
 
boost::optional< std::string > test
 Non-empty if –test was given on the command line. Goes directly into test mode, into a scenario, if specified. More...
 
boost::optional< std::string > unit_test
 Non-empty if –unit was given on the command line. Goes directly into unit test mode, into a scenario, if specified. More...
 
bool headless_unit_test
 True if –unit is used and –showgui is not present. More...
 
boost::optional< unsigned int > timeout
 Non-empty if –timeout was given on the command line. Dependent on –unit. More...
 
bool noreplaycheck
 True if –noreplaycheck was given on the comand line. Dependent on –unit. More...
 
bool mptest
 True if –mp-test was given on the command line. More...
 
bool userconfig_path
 True if –userconfig-path was given on the command line. Prints path to user config directory and exits. More...
 
boost::optional< std::string > userconfig_dir
 Non-empty if –userconfig-dir was given on the command line. Sets the user config dir to the specified one. More...
 
bool userdata_path
 True if –userdata-path was given on the command line. Prints path to user data directory and exits. More...
 
boost::optional< std::string > userdata_dir
 Non-empty if –userdata-dir was given on the command line. Sets the user data dir to the specified one. More...
 
bool validcache
 True if –validcache was given on the command line. Makes Wesnoth assume the cache is valid. More...
 
bool version
 True if –version was given on the command line. Prints version and exits. More...
 
bool report
 True if –report was given on the command line. Prints a bug report-style info dump and exits. More...
 
bool windowed
 True if –windowed was given on the command line. Starts Wesnoth in windowed mode. More...
 
bool with_replay
 True if –with-replay was given on the command line. Shows replay of the loaded file. More...
 

Private Member Functions

void parse_log_domains_ (const std::string &domains_string, const int severity)
 
void parse_log_strictness (const std::string &severity)
 
void parse_resolution_ (const std::string &resolution_string)
 
std::vector< std::pair
< unsigned int, std::string > > 
parse_to_uint_string_tuples_ (const std::vector< std::string > &strings, char separator= ':')
 A helper function splitting vector of strings of format unsigned int:string to vector of tuples (unsigned int,string) More...
 
std::vector< std::tuple
< unsigned int, std::string,
std::string > > 
parse_to_uint_string_string_tuples_ (const std::vector< std::string > &strings, char separator= ':')
 A helper function splitting vector of strings of format unsigned int:string:string to vector of tuples (unsigned int,string,string) More...
 

Private Attributes

std::vector< std::string > args_
 
std::string args0_
 
boost::program_options::options_description all_
 
boost::program_options::options_description visible_
 
boost::program_options::options_description hidden_
 

Friends

std::ostream & operator<< (std::ostream &os, const commandline_options &cmdline_opts)
 To be used for printing help to the commandline. More...
 

Detailed Description

Definition at line 39 of file commandline_options.hpp.

Constructor & Destructor Documentation

commandline_options::commandline_options ( const std::vector< std::string > &  args)

Member Function Documentation

void commandline_options::parse_log_domains_ ( const std::string &  domains_string,
const int  severity 
)
private

Definition at line 479 of file commandline_options.cpp.

References lg::domains, log, and utils::split().

Referenced by commandline_options().

void commandline_options::parse_log_strictness ( const std::string &  severity)
private
void commandline_options::parse_resolution_ ( const std::string &  resolution_string)
private

Definition at line 502 of file commandline_options.cpp.

References resolution, and utils::split().

Referenced by commandline_options().

std::vector< std::tuple< unsigned int, std::string, std::string > > commandline_options::parse_to_uint_string_string_tuples_ ( const std::vector< std::string > &  strings,
char  separator = ':' 
)
private

A helper function splitting vector of strings of format unsigned int:string:string to vector of tuples (unsigned int,string,string)

Definition at line 546 of file commandline_options.cpp.

References lexical_cast(), s, and utils::split().

Referenced by commandline_options().

std::vector< std::pair< unsigned int, std::string > > commandline_options::parse_to_uint_string_tuples_ ( const std::vector< std::string > &  strings,
char  separator = ':' 
)
private

A helper function splitting vector of strings of format unsigned int:string to vector of tuples (unsigned int,string)

Definition at line 521 of file commandline_options.cpp.

References lexical_cast(), s, and utils::split().

Referenced by commandline_options().

config commandline_options::to_config ( ) const

Definition at line 578 of file commandline_options.cpp.

References password, server, and username.

Referenced by do_gameloop().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const commandline_options cmdline_opts 
)
friend

To be used for printing help to the commandline.

Definition at line 571 of file commandline_options.cpp.

Member Data Documentation

boost::program_options::options_description commandline_options::all_
private

Definition at line 226 of file commandline_options.hpp.

Referenced by commandline_options().

std::string commandline_options::args0_
private

Definition at line 225 of file commandline_options.hpp.

Referenced by operator<<().

std::vector<std::string> commandline_options::args_
private

Definition at line 224 of file commandline_options.hpp.

Referenced by commandline_options().

boost::optional<std::string> commandline_options::bunzip2

Non-empty if –bunzip2 was given on the command line. Uncompresses a .bz2 file and exits.

Definition at line 50 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::bzip2

Non-empty if –bzip2 was given on the command line. Compresses a file to .bz2 and exits.

Definition at line 52 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::campaign

Non-empty if –campaign was given on the command line. ID of the campaign we want to start.

Definition at line 54 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<int> commandline_options::campaign_difficulty

Non-empty if –campaign-difficulty was given on the command line. Numerical difficulty of the campaign to be played. Dependent on –campaign.

Definition at line 56 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::campaign_scenario

Non-empty if –campaign-scenario was given on the command line. Chooses starting scenario in the campaign to be played. Dependent on –campaign.

Definition at line 58 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::clock

True if –clock was given on the command line. Enables.

Definition at line 60 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::core_id

Non-empty if –core was given on the command line. Chooses the core to be loaded.

Definition at line 62 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::data_dir

Non-empty if –data-dir was given on the command line. Sets the config dir to the specified one.

Definition at line 66 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::data_path

True if –data-path was given on the command line. Prints path to data directory and exits.

Definition at line 64 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::debug

True if –debug was given on the command line. Enables debug mode.

Definition at line 68 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::debug_lua

True if –debug-lua was given in the commandline. Enables some Lua debugging mechanisms.

Definition at line 70 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::editor

Non-empty if –editor was given on the command line. Goes directly into editor. If string is longer than 0, it contains path to the file to edit.

Definition at line 78 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and game_launcher::game_launcher().

bool commandline_options::fps

True if –fps was given on the command line. Shows number of fps.

Definition at line 80 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::fullscreen

True if –fullscreen was given on the command line. Starts Wesnoth in fullscreen mode.

Definition at line 82 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::gunzip

Non-empty if –gunzip was given on the command line. Uncompresses a .gz file and exits.

Definition at line 84 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::gzip

Non-empty if –gzip was given on the command line. Compresses a file to .gz and exits.

Definition at line 86 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::headless_unit_test

True if –unit is used and –showgui is not present.

Definition at line 191 of file commandline_options.hpp.

Referenced by game_launcher::change_language(), commandline_options(), game_launcher::game_launcher(), and game_launcher::init_video().

bool commandline_options::help

True if –help was given on the command line. Prints help and exits.

Definition at line 88 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and process_command_args().

boost::program_options::options_description commandline_options::hidden_
private

Definition at line 228 of file commandline_options.hpp.

Referenced by commandline_options().

boost::optional<std::string> commandline_options::language

Non-empty if –language was given on the command line. Sets the language for this session.

Definition at line 90 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::init_language().

boost::optional<std::string> commandline_options::load

Non-empty if –load was given on the command line. Savegame specified to load after start.

Definition at line 97 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::vector<std::pair<int, std::string> > > commandline_options::log

Contains parsed arguments of –log-* (e.g.

–log-debug). Vector of pairs (severity, log domain).

Definition at line 93 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), parse_log_domains_(), and process_command_args().

bool commandline_options::log_precise_timestamps

True if –log-precise was given on the command line. Shows timestamps in log with more precision.

Definition at line 101 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<int> commandline_options::log_strict_level

Non-empty if –log-strict was given.

Definition at line 95 of file commandline_options.hpp.

boost::optional<std::string> commandline_options::logdomains

Non-empty if –logdomains was given on the command line. Prints possible logdomains filtered by given string and exits.

Definition at line 99 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<int> commandline_options::max_fps

Max FPS specified by –max-fps option.

Definition at line 129 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::mptest
bool commandline_options::multiplayer

True if –multiplayer was given on the command line. Goes directly into multiplayer mode.

Definition at line 103 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), game_config_manager::init_game_config(), game_launcher::init_video(), and game_launcher::play_multiplayer_commandline().

boost::optional<std::vector<std::pair<unsigned int, std::string> > > commandline_options::multiplayer_ai_config

Non-empty if –ai-config was given on the command line. Vector of pairs (side number, value). Dependent on –multiplayer.

Definition at line 105 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

boost::optional<std::vector<std::pair<unsigned int, std::string> > > commandline_options::multiplayer_algorithm

Non-empty if –algorithm was given on the command line. Vector of pairs (side number, value). Dependent on –multiplayer.

Definition at line 107 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

boost::optional<std::vector<std::pair<unsigned int, std::string> > > commandline_options::multiplayer_controller

Non-empty if –controller was given on the command line. Vector of pairs (side number, controller). Dependent on –multiplayer.

Definition at line 109 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

boost::optional<std::string> commandline_options::multiplayer_era

Non-empty if –era was given on the command line. Dependent on –multiplayer.

Definition at line 111 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and mp::start_local_game_commandline().

bool commandline_options::multiplayer_exit_at_end

True if –exit-at-and was given on the command line. Dependent on –multiplayer.

Definition at line 113 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and commandline_options().

bool commandline_options::multiplayer_ignore_map_settings

True if –ignore-map-settings was given at the command line. Do not use map settings.

Definition at line 115 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), ng::connect_engine::start_game_commandline(), and mp::start_local_game_commandline().

boost::optional<std::string> commandline_options::multiplayer_label

Non-empty if –label was given on the command line. Dependent on –multiplayer.

Definition at line 117 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and mp::start_local_game_commandline().

boost::optional<std::vector<std::tuple<unsigned int, std::string, std::string> > > commandline_options::multiplayer_parm

Non-empty if –parm was given on the command line. Vector of pairs (side number, parm name, parm value). Dependent on –multiplayer.

Definition at line 119 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

boost::optional<unsigned int> commandline_options::multiplayer_repeat

Repeats specified by –multiplayer-repeat option. Repeats a multiplayer game after it is finished. Dependent on –multiplayer.

Definition at line 121 of file commandline_options.hpp.

Referenced by commandline_options(), and mp::start_local_game_commandline().

boost::optional<std::string> commandline_options::multiplayer_scenario

Non-empty if –scenario was given on the command line. Dependent on –multiplayer.

Definition at line 123 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and mp::start_local_game_commandline().

boost::optional<std::vector<std::pair<unsigned int, std::string> > > commandline_options::multiplayer_side

Non-empty if –side was given on the command line. Vector of pairs (side number, faction id). Dependent on –multiplayer.

Definition at line 125 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

boost::optional<std::string> commandline_options::multiplayer_turns

Non-empty if –turns was given on the command line. Dependent on –multiplayer.

Definition at line 127 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and ng::connect_engine::start_game_commandline().

bool commandline_options::new_widgets

True if –new-widgets was given on the command line. Hidden option to enable the new widget toolkit.

Definition at line 143 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::noaddons

True if –noaddons was given on the command line. Disables the loading of all add-ons.

Definition at line 131 of file commandline_options.hpp.

Referenced by commandline_options(), and game_config_manager::load_game_config().

bool commandline_options::nocache

True if –nocache was given on the command line. Disables cache usage.

Definition at line 133 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_config_manager::game_config_manager().

bool commandline_options::nodelay

True if –nodelay was given on the command line.

Definition at line 135 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::nogui

True if –nogui was given on the command line. Disables GUI.

Definition at line 137 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), game_launcher::change_language(), commandline_options(), game_launcher::game_launcher(), and game_launcher::init_video().

bool commandline_options::nomusic

True if –nomusic was given on the command line. Disables music.

Definition at line 139 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

bool commandline_options::noreplaycheck

True if –noreplaycheck was given on the comand line. Dependent on –unit.

Definition at line 195 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::unit_test().

bool commandline_options::nosound

True if –nosound was given on the command line. Disables sound.

Definition at line 141 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::password

Non-empty if –password was given on the command line. Forces Wesnoth to use this network password.

Definition at line 167 of file commandline_options.hpp.

Referenced by commandline_options(), game_launcher::game_launcher(), and to_config().

bool commandline_options::path

True if –path was given on the command line. Prints the path to data directory and exits.

Definition at line 145 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::plugin_file

File to load a lua plugin (similar to a script) from. Experimental / may replace script.

Definition at line 181 of file commandline_options.hpp.

Referenced by commandline_options(), game_launcher::init_lua_script(), and game_launcher::init_video().

bool commandline_options::preprocess

True if –preprocess was given on the command line. Starts Wesnoth in preprocessor-only mode.

Definition at line 147 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<std::vector<std::string> > commandline_options::preprocess_defines

Defines that were given to the –preprocess option.

Definition at line 149 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and handle_preprocess_command().

boost::optional<std::string> commandline_options::preprocess_input_macros

Non-empty if –preprocess-input-macros was given on the command line. Specifies a file that contains [preproc_define]s to be included before preprocessing. Dependant on –preprocess.

Definition at line 151 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and handle_preprocess_command().

boost::optional<std::string> commandline_options::preprocess_output_macros

Non-empty if –preprocess-output-macros was given on the command line. Outputs all preprocessed macros to the specified file. Dependant on –preprocess.

Definition at line 153 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and handle_preprocess_command().

boost::optional<std::string> commandline_options::preprocess_path

Path to parse that was given to the –preprocess option.

Definition at line 155 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and handle_preprocess_command().

boost::optional<std::string> commandline_options::preprocess_target

Target (output) path that was given to the –preprocess option.

Definition at line 157 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and handle_preprocess_command().

boost::optional<std::string> commandline_options::render_image

Image path to render. First parameter after –render-image.

Definition at line 169 of file commandline_options.hpp.

Referenced by commandline_options(), game_launcher::play_render_image_mode(), and process_command_args().

boost::optional<std::string> commandline_options::render_image_dst

Output file to put rendered image path in. Optional second parameter after –render-image.

Definition at line 171 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::play_render_image_mode().

bool commandline_options::report

True if –report was given on the command line. Prints a bug report-style info dump and exits.

Definition at line 211 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<std::pair<int,int> > commandline_options::resolution

Pair of AxB values specified after –resolution. Changes Wesnoth resolution.

Definition at line 159 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), game_launcher::game_launcher(), and parse_resolution_().

boost::optional<unsigned int> commandline_options::rng_seed

RNG seed specified by –rng-seed option. Initializes RNG with given seed.

Definition at line 161 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::screenshot

True if –screenshot was given on the command line. Starts Wesnoth in screenshot mode.

Definition at line 173 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), game_launcher::game_launcher(), game_launcher::init_video(), game_launcher::play_screenshot_mode(), and process_command_args().

boost::optional<std::string> commandline_options::screenshot_map_file

Map file to make a screenshot of. First parameter given after –screenshot.

Definition at line 175 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::screenshot_output_file

Output file to put screenshot in. Second parameter given after –screenshot.

Definition at line 177 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_launcher::game_launcher().

boost::optional<std::string> commandline_options::script_file

File to load lua script from.

Definition at line 179 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::init_lua_script().

bool commandline_options::script_unsafe_mode

Whether to load the "package" package for the scripting environment. (This allows to load arbitrary lua packages, and gives untrusted lua the same permissions as wesnoth executable)

Definition at line 183 of file commandline_options.hpp.

Referenced by commandline_options(), and game_launcher::init_lua_script().

boost::optional<std::string> commandline_options::server

Non-empty if –server was given on the command line. Connects Wesnoth to specified server. If no server was specified afterwards, contains an empty string.

Definition at line 163 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), game_launcher::game_launcher(), and to_config().

bool commandline_options::strict_validation

True if –strict-validation was given on the command line. Makes Wesnoth trust validation errors as fatal WML errors and create WML exception, if so.

Definition at line 185 of file commandline_options.hpp.

Referenced by commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::test

Non-empty if –test was given on the command line. Goes directly into test mode, into a scenario, if specified.

Definition at line 187 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), game_config_manager::init_game_config(), and game_launcher::play_test().

boost::optional<unsigned int> commandline_options::timeout

Non-empty if –timeout was given on the command line. Dependent on –unit.

Definition at line 193 of file commandline_options.hpp.

Referenced by commandline_options(), and do_gameloop().

boost::optional<std::string> commandline_options::unit_test

Non-empty if –unit was given on the command line. Goes directly into unit test mode, into a scenario, if specified.

Definition at line 189 of file commandline_options.hpp.

Referenced by commandline_options(), do_gameloop(), and game_launcher::unit_test().

boost::optional<std::string> commandline_options::userconfig_dir

Non-empty if –userconfig-dir was given on the command line. Sets the user config dir to the specified one.

Definition at line 201 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::userconfig_path

True if –userconfig-path was given on the command line. Prints path to user config directory and exits.

Definition at line 199 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::userdata_dir

Non-empty if –userdata-dir was given on the command line. Sets the user data dir to the specified one.

Definition at line 205 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

bool commandline_options::userdata_path

True if –userdata-path was given on the command line. Prints path to user data directory and exits.

Definition at line 203 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::optional<std::string> commandline_options::username

Non-empty if –username was given on the command line. Forces Wesnoth to use this network username.

Definition at line 165 of file commandline_options.hpp.

Referenced by commandline_options(), game_launcher::game_launcher(), and to_config().

bool commandline_options::validcache

True if –validcache was given on the command line. Makes Wesnoth assume the cache is valid.

Definition at line 207 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and game_config_manager::game_config_manager().

bool commandline_options::version

True if –version was given on the command line. Prints version and exits.

Definition at line 209 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), commandline_options(), and process_command_args().

boost::program_options::options_description commandline_options::visible_
private

Definition at line 227 of file commandline_options.hpp.

Referenced by commandline_options(), and operator<<().

bool commandline_options::windowed

True if –windowed was given on the command line. Starts Wesnoth in windowed mode.

Definition at line 213 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and commandline_options().

bool commandline_options::with_replay

True if –with-replay was given on the command line. Shows replay of the loaded file.

Definition at line 215 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and commandline_options().


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