17 #ifndef VARIABLE_INFO_HPP
18 #define VARIABLE_INFO_HPP
29 const char*
what()
const throw()
31 return "invalid_variablename_exception";
35 template<const variable_info_detail::variable_info_type vit>
72 template<const variable_info_detail::variable_info_type vit>
82 void clear(
bool only_tables =
false)
const;
non_const_variable_info(const std::string &name, config &game_vars)
bool explicit_index() const
Doesn't throw.
variable_info_detail::maybe_const< vit, config::attribute_value >::type & as_scalar() const
might throw invalid_variablename_exception NOTE: If vit == vit_const, then the lifime of the returned...
variable_info_detail::maybe_const< vit, config::child_itors >::type as_array() const
might throw invalid_variablename_exception
void merge_array(std::vector< config > childs) const
merges might throw invalid_variablename_exception
bool exists_as_container() const
might throw invalid_variablename_exception
void clear(bool only_tables=false) const
clears the vale this object points to if only_tables = true it will not clear attribute values...
variable_info< variable_info_detail::vit_const > variable_access_const
this variable accessor is takes a const reference and is guaranteed to not change the config...
Extends variable_info with methods that can only be applied if vit != vit_const.
non_const_variable_info< variable_info_detail::vit_throw_if_not_existent > variable_access_throw
this variable accessor will throw an exception when trying to access a non existent table...
config::child_itors replace_array(std::vector< config > childs) const
Definitions for the interface to Wesnoth Markup Language (WML).
variable_info(const std::string &varname, t_config &vars)
Doesn't throw.
non_const_variable_info< variable_info_detail::vit_create_if_not_existent > variable_access_create
this variable accessor will create a childtable when resolving name if it doesn't exist yet...
invalid_variablename_exception()
variable_info_detail::maybe_const< vit, config >::type & as_container() const
might throw invalid_variablename_exception
std::pair< child_iterator, child_iterator > child_itors
Information on a WML variable.
variable_info_detail::maybe_const< vit, config >::type t_config
GLuint const GLchar * name
~non_const_variable_info()
variable_info_detail::variable_info_state< vit > state_
config::child_itors insert_array(std::vector< config > childs) const
std::string get_error_message() const
config::child_itors append_array(std::vector< config > childs) const
void throw_on_invalid() const
bool exists_as_attribute() const
might throw invalid_variablename_exception
A config object defines a single node in a WML file, with access to child nodes.
const char * what() const
GLsizei const GLcharARB ** string