Additional functionality for a non-const variable_info. More...
#include <variable_info.hpp>
Public Member Functions | |
variable_info_mutable (const std::string &name, config &game_vars) | |
config::child_itors | append_array (std::vector< config > children) const |
config::child_itors | insert_array (std::vector< config > children) const |
config::child_itors | replace_array (std::vector< config > children) const |
void | merge_array (std::vector< config > children) const |
void | clear (bool only_tables=false) const |
Clears the value this object points to. More... | |
Public Member Functions inherited from variable_info< V > | |
variable_info (const std::string &varname, maybe_const_t< config, V > &vars) noexcept | |
std::string | get_error_message () const |
bool | explicit_index () const |
bool | exists_as_attribute () const |
bool | exists_as_container () const |
maybe_const_t< config::attribute_value, V > & | as_scalar () const |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object. More... | |
maybe_const_t< config, V > & | as_container () const |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object. More... | |
maybe_const_t< config::child_itors, V > | as_array () const |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from variable_info< V > | |
void | throw_on_invalid () const |
void | calculate_value () |
Protected Attributes inherited from variable_info< V > | |
std::string | name_ |
variable_info_implementation::variable_info_state< V > | state_ |
bool | valid_ |
Additional functionality for a non-const variable_info.
Definition at line 95 of file variable_info.hpp.
|
inline |
Definition at line 98 of file variable_info.hpp.
config::child_itors variable_info_mutable< V >::append_array | ( | std::vector< config > | children | ) | const |
invalid_variablename_exception |
Definition at line 198 of file variable_info.cpp.
Referenced by game_data::add_variable_cfg(), and game_events::WML_HANDLER_FUNCTION().
void variable_info_mutable< V >::clear | ( | bool | only_tables = false | ) | const |
Clears the value this object points to.
only_tables | If true, will not clear attribute values. |
invalid_variablename_exception |
Definition at line 181 of file variable_info.cpp.
Referenced by game_data::clear_variable(), and game_data::clear_variable_cfg().
config::child_itors variable_info_mutable< V >::insert_array | ( | std::vector< config > | children | ) | const |
invalid_variablename_exception |
Definition at line 205 of file variable_info.cpp.
Referenced by game_events::WML_HANDLER_FUNCTION().
void variable_info_mutable< V >::merge_array | ( | std::vector< config > | children | ) | const |
invalid_variablename_exception |
Definition at line 219 of file variable_info.cpp.
Referenced by game_events::WML_HANDLER_FUNCTION().
config::child_itors variable_info_mutable< V >::replace_array | ( | std::vector< config > | children | ) | const |
invalid_variablename_exception |
Definition at line 212 of file variable_info.cpp.
Referenced by game_events::WML_HANDLER_FUNCTION().