The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
scoped_wml_variable Class Referenceabstract

#include <variable.hpp>

Inheritance diagram for scoped_wml_variable:

Public Member Functions

 scoped_wml_variable (const std::string &var_name)
 
virtual ~scoped_wml_variable ()
 
const std::string & name () const
 
virtual void activate ()=0
 
configstore (const config &var_value=config())
 
bool activated () const
 

Private Attributes

config previous_val_
 
const std::string var_name_
 
bool activated_
 

Detailed Description

Definition at line 224 of file variable.hpp.

Constructor & Destructor Documentation

◆ scoped_wml_variable()

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.

◆ ~scoped_wml_variable()

scoped_wml_variable::~scoped_wml_variable ( )
virtual

Member Function Documentation

◆ activate()

virtual void scoped_wml_variable::activate ( )
pure virtual

◆ activated()

bool scoped_wml_variable::activated ( ) const
inline

Definition at line 232 of file variable.hpp.

References activated_.

◆ name()

const std::string& scoped_wml_variable::name ( ) const
inline

Definition at line 229 of file variable.hpp.

References var_name_.

Referenced by scoped_xy_unit::activate(), and scoped_recall_unit::activate().

◆ store()

config & scoped_wml_variable::store ( const config var_value = config())

Member Data Documentation

◆ activated_

bool scoped_wml_variable::activated_
private

Definition at line 236 of file variable.hpp.

Referenced by activated(), store(), and ~scoped_wml_variable().

◆ previous_val_

config scoped_wml_variable::previous_val_
private

Definition at line 234 of file variable.hpp.

Referenced by store(), and ~scoped_wml_variable().

◆ var_name_

const std::string scoped_wml_variable::var_name_
private

Definition at line 235 of file variable.hpp.

Referenced by name(), store(), and ~scoped_wml_variable().


The documentation for this class was generated from the following files: