The Battle for Wesnoth  1.13.4+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::stringbunzip2
 Non-empty if –bunzip2 was given on the command line. Uncompresses a .bz2 file and exits. More...
 
boost::optional< std::stringbzip2
 Non-empty if –bzip2 was given on the command line. Compresses a file to .bz2 and exits. More...
 
boost::optional< std::stringcampaign
 Non-empty if –campaign was given on the command line. ID of the campaign we want to start. More...
 
boost::optional< intcampaign_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::stringcampaign_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::stringcore_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::stringdata_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::stringeditor
 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::stringgunzip
 Non-empty if –gunzip was given on the command line. Uncompresses a .gz file and exits. More...
 
boost::optional< std::stringgzip
 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::stringlanguage
 Non-empty if –language was given on the command line. Sets the language for this session. More...
 
boost::optional< std::vector
< boost::tuple< int,
std::string > > > 
log
 Contains parsed arguments of –log-* (e.g. More...
 
boost::optional< intlog_strict_level
 Non-empty if –log-strict was given. More...
 
boost::optional< std::stringload
 Non-empty if –load was given on the command line. Savegame specified to load after start. More...
 
boost::optional< std::stringlogdomains
 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
< boost::tuple< 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
< boost::tuple< 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
< boost::tuple< 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::stringmultiplayer_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::stringmultiplayer_label
 Non-empty if –label was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< std::vector
< boost::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 intmultiplayer_repeat
 Repeats specified by –multiplayer-repeat option. Repeats a multiplayer game after it is finished. Dependent on –multiplayer. More...
 
boost::optional< std::stringmultiplayer_scenario
 Non-empty if –scenario was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< std::vector
< boost::tuple< 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::stringmultiplayer_turns
 Non-empty if –turns was given on the command line. Dependent on –multiplayer. More...
 
boost::optional< intmax_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::stringpreprocess_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::stringpreprocess_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::stringpreprocess_path
 Path to parse that was given to the –preprocess option. More...
 
boost::optional< std::stringpreprocess_target
 Target (output) path that was given to the –preprocess option. More...
 
boost::optional< boost::tuple
< int, int > > 
resolution
 Pair of AxB values specified after –resolution. Changes Wesnoth resolution. More...
 
boost::optional< unsigned intrng_seed
 RNG seed specified by –rng-seed option. Initializes RNG with given seed. More...
 
boost::optional< std::stringserver
 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::stringusername
 Non-empty if –username was given on the command line. Forces Wesnoth to use this network username. More...
 
boost::optional< std::stringpassword
 Non-empty if –password was given on the command line. Forces Wesnoth to use this network password. More...
 
boost::optional< std::stringrender_image
 Image path to render. First parameter after –render-image. More...
 
boost::optional< std::stringrender_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::stringscreenshot_map_file
 Map file to make a screenshot of. First parameter given after –screenshot. More...
 
boost::optional< std::stringscreenshot_output_file
 Output file to put screenshot in. Second parameter given after –screenshot. More...
 
boost::optional< std::stringscript_file
 File to load lua script from. More...
 
boost::optional< std::stringplugin_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::stringtest
 Non-empty if –test was given on the command line. Goes directly into test mode, into a scenario, if specified. More...
 
boost::optional< std::stringunit_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 inttimeout
 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::stringuserconfig_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::stringuserdata_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 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< boost::tuple
< 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< boost::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::stringargs_
 
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 40 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 481 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 504 of file commandline_options.cpp.

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

Referenced by commandline_options().

std::vector< boost::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 551 of file commandline_options.cpp.

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

Referenced by commandline_options().

std::vector< boost::tuple< 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 523 of file commandline_options.cpp.

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

Referenced by commandline_options().

config commandline_options::to_config ( ) const

Definition at line 586 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 579 of file commandline_options.cpp.

Member Data Documentation

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

Definition at line 225 of file commandline_options.hpp.

Referenced by commandline_options().

std::string commandline_options::args0_
private

Definition at line 224 of file commandline_options.hpp.

Referenced by operator<<().

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

Definition at line 223 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 51 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 53 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 55 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 57 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 59 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 61 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 63 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 67 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 65 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 69 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 71 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 79 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 81 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 83 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 85 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 87 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 192 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 89 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 227 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 91 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 98 of file commandline_options.hpp.

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

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

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

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

Definition at line 94 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 102 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 96 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 100 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 130 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 104 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<boost::tuple<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 106 of file commandline_options.hpp.

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

boost::optional<std::vector<boost::tuple<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 108 of file commandline_options.hpp.

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

boost::optional<std::vector<boost::tuple<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 110 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 112 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 114 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 116 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 118 of file commandline_options.hpp.

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

boost::optional<std::vector<boost::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 120 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 122 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 124 of file commandline_options.hpp.

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

boost::optional<std::vector<boost::tuple<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 126 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 128 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 144 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 132 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 134 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 136 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 138 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 140 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 196 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 142 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 168 of file commandline_options.hpp.

Referenced by commandline_options(), 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 146 of file commandline_options.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), 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 182 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 148 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 150 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 152 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 154 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 156 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 158 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 170 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 172 of file commandline_options.hpp.

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

boost::optional<boost::tuple<int,int> > commandline_options::resolution

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

Definition at line 160 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 162 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 174 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 176 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 178 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 180 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 184 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 164 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 186 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 188 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 194 of file commandline_options.hpp.

Referenced by 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 190 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 202 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 200 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 206 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 204 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 166 of file commandline_options.hpp.

Referenced by commandline_options(), 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 208 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 210 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 226 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 212 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 214 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: