The Battle for Wesnoth  1.15.1+dev
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, const bool jump_to_editor)
 
 ~game_config_manager ()
 
const configgame_config () const
 
const preproc_mapold_defines_map () const
 
const ter_data_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, bool is_test=false)
 

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_unit_data ()
 

Private Attributes

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

Detailed Description

Definition at line 25 of file game_config_manager.hpp.

Member Enumeration Documentation

◆ FORCE_RELOAD_CONFIG

Enumerator
FORCE_RELOAD 

Always reload config.

NO_FORCE_RELOAD 

Don't reload if the previous defines equal the new defines.

NO_INCLUDE_RELOAD 

Don't reload if the previous defines include the new defines.

Definition at line 30 of file game_config_manager.hpp.

Constructor & Destructor Documentation

◆ game_config_manager() [1/2]

game_config_manager::game_config_manager ( const commandline_options cmdline_opts,
const bool  jump_to_editor 
)

◆ ~game_config_manager()

game_config_manager::~game_config_manager ( )

Definition at line 70 of file game_config_manager.cpp.

◆ game_config_manager() [2/2]

game_config_manager::game_config_manager ( const game_config_manager )
private

Member Function Documentation

◆ game_config()

const config& game_config_manager::game_config ( ) const
inline

◆ get()

game_config_manager * game_config_manager::get ( )
static

◆ init_game_config()

bool game_config_manager::init_game_config ( FORCE_RELOAD_CONFIG  force_reload)

◆ load_addons_cfg()

void game_config_manager::load_addons_cfg ( )
private

◆ load_game_config()

void game_config_manager::load_game_config ( FORCE_RELOAD_CONFIG  force_reload,
game_classification const *  classification = nullptr 
)
private

◆ load_game_config_for_create()

void game_config_manager::load_game_config_for_create ( bool  is_mp,
bool  is_test = false 
)

◆ load_game_config_for_editor()

void game_config_manager::load_game_config_for_editor ( )

◆ load_game_config_for_game()

void game_config_manager::load_game_config_for_game ( const game_classification classification)

◆ load_game_config_with_loadscreen()

void game_config_manager::load_game_config_with_loadscreen ( FORCE_RELOAD_CONFIG  force_reload,
game_classification const *  classification = nullptr 
)
private

◆ old_defines_map()

const preproc_map& game_config_manager::old_defines_map ( ) const
inline

Definition at line 41 of file game_config_manager.hpp.

References old_defines_map_.

◆ operator=()

void game_config_manager::operator= ( const game_config_manager )
private

Referenced by terrain_types().

◆ reload_changed_game_config()

void game_config_manager::reload_changed_game_config ( )

◆ set_multiplayer_hashes()

void game_config_manager::set_multiplayer_hashes ( )
private

◆ set_unit_data()

void game_config_manager::set_unit_data ( )
private

◆ terrain_types()

const ter_data_cache& game_config_manager::terrain_types ( ) const
inline

Member Data Documentation

◆ cache_

game_config::config_cache& game_config_manager::cache_
private

◆ cmdline_opts_

const commandline_options& game_config_manager::cmdline_opts_
private

◆ game_config_

config game_config_manager::game_config_
private

◆ jump_to_editor_

const bool game_config_manager::jump_to_editor_
private

Definition at line 69 of file game_config_manager.hpp.

Referenced by init_game_config().

◆ old_defines_map_

preproc_map game_config_manager::old_defines_map_
private

◆ paths_manager_

filesystem::binary_paths_manager game_config_manager::paths_manager_
private

Definition at line 75 of file game_config_manager.hpp.

Referenced by load_game_config().

◆ tdata_

ter_data_cache game_config_manager::tdata_
private

Definition at line 79 of file game_config_manager.hpp.

Referenced by load_game_config(), and terrain_types().


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