Used to share macros between cache objects You have to create transaction object to load all macros to memory and share them subsequent cache loads. More...
#include <config_cache.hpp>

Public Types | |
| enum | state { FREE, NEW, ACTIVE, LOCKED } |
| typedef std::vector< std::string > | filenames |
Public Member Functions | |
| config_cache_transaction () | |
| ~config_cache_transaction () | |
| void | lock () |
| Lock the transaction so no more macros are added. | |
| void | insert_to_active (const preproc_map::value_type &def) |
| Used to let std::for_each insert new defines to active_map map to active. | |
Private Member Functions | |
| const filenames & | get_define_files () const |
| void | add_define_file (const std::string &) |
| preproc_map & | get_active_map (const preproc_map &) |
| void | add_defines_map_diff (preproc_map &defines_map) |
Static Private Member Functions | |
| static state | get_state () |
| static bool | is_active () |
| static config_cache_transaction & | instance () |
Private Attributes | |
| filenames | define_filenames_ |
| preproc_map | active_map_ |
Static Private Attributes | |
| static state | state_ = FREE |
| static config_cache_transaction * | active_ = 0 |
Friends | |
| class | config_cache |
| class | fake_transaction |
Used to share macros between cache objects You have to create transaction object to load all macros to memory and share them subsequent cache loads.
If transaction is locked all stored macros are still available but new macros aren't added.
Definition at line 158 of file config_cache.hpp.
| typedef std::vector<std::string> game_config::config_cache_transaction::filenames |
Definition at line 172 of file config_cache.hpp.
Definition at line 167 of file config_cache.hpp.
| game_config::config_cache_transaction::config_cache_transaction | ( | ) |
Definition at line 340 of file config_cache.cpp.
| game_config::config_cache_transaction::~config_cache_transaction | ( | ) |
Definition at line 349 of file config_cache.cpp.
| void game_config::config_cache_transaction::add_define_file | ( | const std::string & | file | ) | [private] |
Definition at line 365 of file config_cache.cpp.
References define_filenames_.
| void game_config::config_cache_transaction::add_defines_map_diff | ( | preproc_map & | defines_map | ) | [private] |
Definition at line 384 of file config_cache.cpp.
References ACTIVE, active_map_, game_config::compare_define(), get_state(), insert_to_active(), and LOCKED.

| preproc_map & game_config::config_cache_transaction::get_active_map | ( | const preproc_map & | defines_map | ) | [private] |
Definition at line 370 of file config_cache.cpp.
References active_map_, get_state(), NEW, and state_.

| const config_cache_transaction::filenames & game_config::config_cache_transaction::get_define_files | ( | ) | const [private] |
Definition at line 360 of file config_cache.cpp.
References define_filenames_.
| static state game_config::config_cache_transaction::get_state | ( | ) | [inline, static, private] |
Definition at line 186 of file config_cache.hpp.
References state_.
Referenced by add_defines_map_diff(), and get_active_map().

| void game_config::config_cache_transaction::insert_to_active | ( | const preproc_map::value_type & | def | ) |
Used to let std::for_each insert new defines to active_map map to active.
Definition at line 407 of file config_cache.cpp.
References active_map_.
Referenced by add_defines_map_diff().

| static config_cache_transaction& game_config::config_cache_transaction::instance | ( | ) | [inline, static, private] |
Definition at line 190 of file config_cache.hpp.
References active_.
| static bool game_config::config_cache_transaction::is_active | ( | ) | [inline, static, private] |
Definition at line 188 of file config_cache.hpp.
References active_.
Referenced by game_config::config_cache::add_define(), game_config::fake_transaction::fake_transaction(), and game_config::config_cache::remove_define().

| void game_config::config_cache_transaction::lock | ( | ) |
Lock the transaction so no more macros are added.
Definition at line 355 of file config_cache.cpp.
References state_.
Referenced by BOOST_AUTO_TEST_CASE(), and game_controller::load_game_cfg().

friend class config_cache [friend] |
Definition at line 192 of file config_cache.hpp.
friend class fake_transaction [friend] |
Definition at line 193 of file config_cache.hpp.
config_cache_transaction * game_config::config_cache_transaction::active_ = 0 [static, private] |
Definition at line 182 of file config_cache.hpp.
Referenced by config_cache_transaction(), instance(), is_active(), and ~config_cache_transaction().
Definition at line 184 of file config_cache.hpp.
Referenced by add_defines_map_diff(), get_active_map(), and insert_to_active().
Definition at line 183 of file config_cache.hpp.
Referenced by add_define_file(), and get_define_files().
config_cache_transaction::state game_config::config_cache_transaction::state_ = FREE [static, private] |
Definition at line 181 of file config_cache.hpp.
Referenced by config_cache_transaction(), get_active_map(), get_state(), lock(), and ~config_cache_transaction().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:43 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |