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

#include <game_config_manager.hpp>

Public Types

enum  FORCE_RELOAD_CONFIG { FORCE_RELOAD, NO_FORCE_RELOAD, NO_INCLUDE_RELOAD }
 

Public Member Functions

 game_config_manager (const commandline_options &cmdline_opts, CVideo &video, const bool jump_to_editor)
 
 ~game_config_manager ()
 
const configgame_config () const
 
const preproc_mapold_defines_map () const
 
const tdata_cacheterrain_types () const
 
bool init_game_config (FORCE_RELOAD_CONFIG force_reload)
 
void reload_changed_game_config ()
 
void load_game_config_for_editor ()
 
void load_game_config_for_game (const game_classification &classification)
 
void load_game_config_for_create (bool is_mp)
 

Static Public Member Functions

static game_config_managerget ()
 

Private Member Functions

 game_config_manager (const game_config_manager &)
 
void operator= (const game_config_manager &)
 
void load_game_config (FORCE_RELOAD_CONFIG force_reload, game_classification const *classification=nullptr)
 
void load_game_config_with_loadscreen (FORCE_RELOAD_CONFIG force_reload, game_classification const *classification=nullptr)
 
void load_addons_cfg ()
 
void set_multiplayer_hashes ()
 
void set_color_info ()
 
void set_unit_data ()
 

Private Attributes

const commandline_optionscmdline_opts_
 
CVideovideo_
 
const bool jump_to_editor_
 
config game_config_
 
preproc_map old_defines_map_
 
filesystem::binary_paths_manager paths_manager_
 
game_config::config_cachecache_
 
tdata_cache tdata_
 

Detailed Description

Definition at line 26 of file game_config_manager.hpp.

Member Enumeration Documentation

Enumerator
FORCE_RELOAD 

Always reload config.

NO_FORCE_RELOAD 

Dont reload if the previous defines equal the new defines.

NO_INCLUDE_RELOAD 

Dont reload if the previous defines include the new defines.

Definition at line 32 of file game_config_manager.hpp.

Constructor & Destructor Documentation

game_config_manager::game_config_manager ( const commandline_options cmdline_opts,
CVideo video,
const bool  jump_to_editor 
)
game_config_manager::~game_config_manager ( )

Definition at line 70 of file game_config_manager.cpp.

game_config_manager::game_config_manager ( const game_config_manager )
private

Member Function Documentation

const config& game_config_manager::game_config ( ) const
inline
game_config_manager * game_config_manager::get ( )
static
bool game_config_manager::init_game_config ( FORCE_RELOAD_CONFIG  force_reload)
void game_config_manager::load_addons_cfg ( )
private
void game_config_manager::load_game_config ( FORCE_RELOAD_CONFIG  force_reload,
game_classification const *  classification = nullptr 
)
private
void game_config_manager::load_game_config_for_create ( bool  is_mp)

During an mp game the default difficuly define is also defined so better already load it now if we alreeady must reload config cache.

Definition at line 550 of file game_config_manager.cpp.

References cache_, game_config::config_cache::clear_defines(), cmdline_opts_, DEFAULT_DIFFICULTY, game_config::config_cache::get_preproc_map(), load_game_config_with_loadscreen(), commandline_options::mptest, NO_FORCE_RELOAD, NO_INCLUDE_RELOAD, and old_defines_map_.

Referenced by ng::create_engine::create_engine(), and game_launcher::play_multiplayer().

void game_config_manager::load_game_config_for_editor ( )
void game_config_manager::load_game_config_for_game ( const game_classification classification)
void game_config_manager::load_game_config_with_loadscreen ( FORCE_RELOAD_CONFIG  force_reload,
game_classification const *  classification = nullptr 
)
private
const preproc_map& game_config_manager::old_defines_map ( ) const
inline

Definition at line 43 of file game_config_manager.hpp.

References old_defines_map_.

void game_config_manager::operator= ( const game_config_manager )
private
void game_config_manager::reload_changed_game_config ( )
void game_config_manager::set_color_info ( )
private
void game_config_manager::set_multiplayer_hashes ( )
private
void game_config_manager::set_unit_data ( )
private
const tdata_cache& game_config_manager::terrain_types ( ) const
inline

Member Data Documentation

game_config::config_cache& game_config_manager::cache_
private
const commandline_options& game_config_manager::cmdline_opts_
private
config game_config_manager::game_config_
private
const bool game_config_manager::jump_to_editor_
private

Definition at line 73 of file game_config_manager.hpp.

Referenced by init_game_config().

preproc_map game_config_manager::old_defines_map_
private
filesystem::binary_paths_manager game_config_manager::paths_manager_
private

Definition at line 79 of file game_config_manager.hpp.

Referenced by load_game_config().

tdata_cache game_config_manager::tdata_
private

Definition at line 83 of file game_config_manager.hpp.

Referenced by load_game_config(), and terrain_types().

CVideo& game_config_manager::video_
private

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