#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 |
void | store (const config &var_value) |
bool | activated () const |
Private Attributes | |
config | previous_val_ |
const std::string | var_name_ |
bool | activated_ |
Definition at line 116 of file variable.hpp.
scoped_wml_variable::scoped_wml_variable | ( | const std::string & | var_name | ) |
scoped_wml_variable::~scoped_wml_variable | ( | ) | [virtual] |
Definition at line 452 of file variable.cpp.
References activated_, game_state::add_variable_cfg(), game_state::clear_variable_cfg(), config::get_children(), previous_val_, game_state::scoped_variables, and var_name_.
const std::string& scoped_wml_variable::name | ( | ) | const [inline] |
Definition at line 121 of file variable.hpp.
References var_name_.
Referenced by scoped_recall_unit::activate(), and scoped_xy_unit::activate().
virtual void scoped_wml_variable::activate | ( | ) | [pure virtual] |
Implemented in scoped_xy_unit, and scoped_recall_unit.
void scoped_wml_variable::store | ( | const config & | var_value | ) |
Definition at line 441 of file variable.cpp.
References activated_, game_state::add_variable_cfg(), config::append(), game_state::clear_variable_cfg(), config::get_children(), game_state::get_variables(), previous_val_, and var_name_.
Referenced by scoped_recall_unit::activate(), and scoped_xy_unit::activate().
bool scoped_wml_variable::activated | ( | ) | const [inline] |
config scoped_wml_variable::previous_val_ [private] |
const std::string scoped_wml_variable::var_name_ [private] |
Definition at line 127 of file variable.hpp.
Referenced by name(), store(), and ~scoped_wml_variable().
bool scoped_wml_variable::activated_ [private] |
Definition at line 128 of file variable.hpp.
Referenced by activated(), store(), and ~scoped_wml_variable().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |