Information on a WML variable. More...
#include <variable_info.hpp>
Public Member Functions | |
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... | |
Protected Member Functions | |
void | throw_on_invalid () const |
void | calculate_value () |
Protected Attributes | |
std::string | name_ |
variable_info_implementation::variable_info_state< V > | state_ |
bool | valid_ |
Information on a WML variable.
Definition at line 41 of file variable_info.hpp.
|
noexcept |
Definition at line 66 of file variable_info.cpp.
maybe_const_t< config::child_itors, V > variable_info< V >::as_array |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object.
Range may be empty
invalid_variablename_exception |
Definition at line 145 of file variable_info.cpp.
Referenced by terrain_filter::match_internal(), vconfig::all_children_iterator::operator++(), and game_events::WML_HANDLER_FUNCTION().
maybe_const_t< config, V > & variable_info< V >::as_container |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object.
invalid_variablename_exception |
Definition at line 138 of file variable_info.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), game_data::get_variable_cfg(), luaW_checkvariable(), luaW_pushvariable(), game_events::filter_dynamic::operator()(), and game_events::WML_HANDLER_FUNCTION().
maybe_const_t< config::attribute_value, V > & variable_info< V >::as_scalar |
If instantiated with vi_policy_const, the lifetime of the returned const attribute_value reference might end with the lifetime of this object.
invalid_variablename_exception |
Definition at line 131 of file variable_info.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), game_data::get_variable(), config_variable_set::get_variable_const(), game_data::get_variable_const(), luaW_checkvariable(), luaW_pushvariable(), and game_events::WML_HANDLER_FUNCTION().
|
protected |
Definition at line 79 of file variable_info.cpp.
References variable_info_implementation::parse_index().
bool variable_info< V >::exists_as_attribute |
invalid_variablename_exception |
Definition at line 166 of file variable_info.cpp.
References variable_info_implementation::state_named, and variable_info_implementation::state_temporary.
Referenced by BOOST_AUTO_TEST_CASE(), and luaW_pushvariable().
bool variable_info< V >::exists_as_container |
invalid_variablename_exception |
Definition at line 174 of file variable_info.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), luaW_pushvariable(), and game_events::filter_dynamic::operator()().
bool variable_info< V >::explicit_index |
Definition at line 124 of file variable_info.cpp.
References variable_info_implementation::state_indexed, and variable_info_implementation::state_start.
Referenced by game_events::WML_HANDLER_FUNCTION().
std::string variable_info< V >::get_error_message |
Definition at line 160 of file variable_info.cpp.
Referenced by luaW_checkvariable(), and luaW_pushvariable().
|
protected |
Definition at line 152 of file variable_info.cpp.
|
protected |
Definition at line 82 of file variable_info.hpp.
|
protected |
Definition at line 83 of file variable_info.hpp.
|
protected |
Definition at line 84 of file variable_info.hpp.