#include <variable.hpp>
Public Member Functions | |
scoped_wml_variable (const std::string &var_name) | |
virtual | ~scoped_wml_variable () |
const std::string & | name () const |
virtual void | activate ()=0 |
config & | store (const config &var_value=config()) |
bool | activated () const |
Private Attributes | |
config | previous_val_ |
const std::string | var_name_ |
bool | activated_ |
Definition at line 224 of file variable.hpp.
scoped_wml_variable::scoped_wml_variable | ( | const std::string & | var_name | ) |
Definition at line 490 of file variable.cpp.
References resources::gamedata, and game_data::scoped_variables.
|
virtual |
Definition at line 520 of file variable.cpp.
References activated_, game_data::add_variable_cfg(), config::child_range(), game_data::clear_variable_cfg(), resources::gamedata, i, LOG_NG, previous_val_, game_data::scoped_variables, and var_name_.
|
pure virtual |
Implemented in scoped_recall_unit, scoped_xy_unit, and scoped_weapon_info.
|
inline |
Definition at line 232 of file variable.hpp.
References activated_.
|
inline |
Definition at line 229 of file variable.hpp.
References var_name_.
Referenced by scoped_xy_unit::activate(), and scoped_recall_unit::activate().
Definition at line 499 of file variable.cpp.
References activated_, config::add_child(), game_data::add_variable_cfg(), game_data::clear_variable_cfg(), resources::gamedata, i, LOG_NG, previous_val_, and var_name_.
Referenced by scoped_weapon_info::activate(), scoped_xy_unit::activate(), and scoped_recall_unit::activate().
|
private |
Definition at line 236 of file variable.hpp.
Referenced by activated(), store(), and ~scoped_wml_variable().
|
private |
Definition at line 234 of file variable.hpp.
Referenced by store(), and ~scoped_wml_variable().
|
private |
Definition at line 235 of file variable.hpp.
Referenced by name(), store(), and ~scoped_wml_variable().