The Battle for Wesnoth  1.15.3+dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | 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 game_config_viewgame_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, const std::string &scenario_id)
 
void load_game_config_for_create (bool is_mp, bool is_test=false)
 

Static Public Member Functions

static game_config_managerget ()
 

Private Member Functions

void set_enabled_addon (std::set< std::string > addon_ids)
 
void set_enabled_addon_all ()
 
 game_config_manager (const game_config_manager &)
 
void operator= (const game_config_manager &)
 
void load_game_config (bool reload_everything)
 
void load_game_config_with_loadscreen (FORCE_RELOAD_CONFIG force_reload, game_classification const *classification=nullptr, boost::optional< std::set< std::string >> active_addons=boost::optional< std::set< std::string >>())
 
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_
 
game_config_view game_config_view_
 
std::map< std::string, configaddon_cfgs_
 
boost::optional< std::set< std::string > > active_addons_
 
preproc_map old_defines_map_
 
filesystem::binary_paths_manager paths_manager_
 
game_config::config_cachecache_
 
ter_data_cache tdata_
 

Friends

class game_config_view
 

Detailed Description

Definition at line 27 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 33 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 73 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 game_config_view& 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 ( bool  reload_everything)
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,
const std::string &  scenario_id 
)

◆ load_game_config_with_loadscreen()

void game_config_manager::load_game_config_with_loadscreen ( FORCE_RELOAD_CONFIG  force_reload,
game_classification const *  classification = nullptr,
boost::optional< std::set< std::string >>  active_addons = boost::optional<std::set<std::string>>() 
)
private

◆ old_defines_map()

const preproc_map& game_config_manager::old_defines_map ( ) const
inline

Definition at line 44 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_enabled_addon()

void game_config_manager::set_enabled_addon ( std::set< std::string >  addon_ids)
private

◆ set_enabled_addon_all()

void game_config_manager::set_enabled_addon_all ( )
private

◆ 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

Friends And Related Function Documentation

◆ game_config_view

friend class game_config_view
friend

Definition at line 29 of file game_config_manager.hpp.

Member Data Documentation

◆ active_addons_

boost::optional<std::set<std::string> > game_config_manager::active_addons_
private

Definition at line 80 of file game_config_manager.hpp.

Referenced by load_game_config(), and load_game_config_with_loadscreen().

◆ addon_cfgs_

std::map<std::string, config> game_config_manager::addon_cfgs_
private

◆ 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

◆ game_config_view_

game_config_view game_config_manager::game_config_view_
private

Definition at line 77 of file game_config_manager.hpp.

Referenced by game_config(), set_enabled_addon(), and set_enabled_addon_all().

◆ jump_to_editor_

const bool game_config_manager::jump_to_editor_
private

Definition at line 74 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 84 of file game_config_manager.hpp.

Referenced by load_game_config().

◆ tdata_

ter_data_cache game_config_manager::tdata_
private

Definition at line 88 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: