#include "game_data.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "persist_context.hpp"
#include "persist_manager.hpp"
#include "persist_var.hpp"
#include "play_controller.hpp"
#include "synced_user_choice.hpp"
#include "resources.hpp"
#include "variable.hpp"
Go to the source code of this file.
Classes | |
struct | persist_choice |
Macros | |
#define | DBG_PERSIST LOG_STREAM(debug, log_persist) |
#define | ERR_PERSIST LOG_STREAM(err, log_persist) |
Functions | |
static void | get_global_variable (persist_context &ctx, const vconfig &pcfg) |
static void | clear_global_variable (persist_context &ctx, const vconfig &pcfg) |
static void | set_global_variable (persist_context &ctx, const vconfig &pcfg) |
void | verify_and_get_global_variable (const vconfig &pcfg) |
void | verify_and_set_global_variable (const vconfig &pcfg) |
void | verify_and_clear_global_variable (const vconfig &pcfg) |
#define DBG_PERSIST LOG_STREAM(debug, log_persist) |
Definition at line 29 of file persist_var.cpp.
#define ERR_PERSIST LOG_STREAM(err, log_persist) |
Definition at line 30 of file persist_var.cpp.
|
static |
Definition at line 88 of file persist_var.cpp.
References persist_context::clear_var().
Referenced by set_global_variable(), and verify_and_clear_global_variable().
|
static |
Definition at line 63 of file persist_var.cpp.
References config::child_count(), game_data::clear_variable(), resources::controller, ERR_PERSIST, resources::gamedata, mp_sync::get_user_choice(), i, config::mandatory_child(), game_data::set_variable(), and config_attribute_value::to_int().
Referenced by verify_and_get_global_variable().
|
static |
Definition at line 94 of file persist_var.cpp.
References config::add_child(), config::child_count(), config::clear(), clear_global_variable(), resources::gamedata, game_data::get_variables(), i, config::mandatory_child(), pack_scalar(), and persist_context::set_var().
Referenced by verify_and_set_global_variable().
void verify_and_clear_global_variable | ( | const vconfig & | pcfg | ) |
Definition at line 199 of file persist_var.cpp.
References clear_global_variable(), resources::controller, config_attribute_value::empty(), ERR_PERSIST, resources::gameboard, persist_manager::get_context(), game_board::get_team(), vconfig::has_attribute(), team::is_local(), LOG_PERSIST, resources::persist, config_attribute_value::str(), config_attribute_value::to_int(), and persist_context::valid().
Referenced by game_events::WML_HANDLER_FUNCTION().
void verify_and_get_global_variable | ( | const vconfig & | pcfg | ) |
Definition at line 120 of file persist_var.cpp.
References resources::controller, DBG_PERSIST, config_attribute_value::empty(), ERR_PERSIST, resources::gameboard, persist_manager::get_context(), get_global_variable(), vconfig::has_attribute(), LOG_PERSIST, resources::persist, config_attribute_value::str(), config_attribute_value::to_int(), and persist_context::valid().
Referenced by game_events::WML_HANDLER_FUNCTION().
void verify_and_set_global_variable | ( | const vconfig & | pcfg | ) |
Definition at line 156 of file persist_var.cpp.
References resources::controller, config_attribute_value::empty(), ERR_PERSIST, resources::gameboard, persist_manager::get_context(), game_board::get_team(), vconfig::has_attribute(), team::is_local(), LOG_PERSIST, resources::persist, set_global_variable(), config_attribute_value::str(), config_attribute_value::to_int(), and persist_context::valid().
Referenced by game_events::WML_HANDLER_FUNCTION().