The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
non_const_variable_info< vit > Class Template Reference

Extends variable_info with methods that can only be applied if vit != vit_const. More...

#include <variable_info.hpp>

Inheritance diagram for non_const_variable_info< vit >:
Inheritance graph

Public Member Functions

 non_const_variable_info (const std::string &name, config &game_vars)
 
 ~non_const_variable_info ()
 
void clear (bool only_tables=false) const
 clears the vale this object points to if only_tables = true it will not clear attribute values. More...
 
config::child_itors append_array (std::vector< config > childs) const
 
config::child_itors insert_array (std::vector< config > childs) const
 
config::child_itors replace_array (std::vector< config > childs) const
 
void merge_array (std::vector< config > childs) const
 merges might throw invalid_variablename_exception More...
 
- Public Member Functions inherited from variable_info< vit >
 variable_info (const std::string &varname, t_config &vars)
 Doesn't throw. More...
 
 ~variable_info ()
 
std::string get_error_message () const
 
bool explicit_index () const
 Doesn't throw. More...
 
bool exists_as_attribute () const
 might throw invalid_variablename_exception More...
 
bool exists_as_container () const
 might throw invalid_variablename_exception More...
 
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 const attribute_value& might end with the lifetime of this object. More...
 
variable_info_detail::maybe_const
< vit, config >::type
as_container () const
 might throw invalid_variablename_exception More...
 
variable_info_detail::maybe_const
< vit, config::child_itors >
::type 
as_array () const
 might throw invalid_variablename_exception More...
 
template<>
std::string get_error_message () const
 
template<>
std::string get_error_message () const
 
template<>
std::string get_error_message () const
 

Additional Inherited Members

- Public Types inherited from variable_info< vit >
typedef
variable_info_detail::maybe_const
< vit, config >::type 
t_config
 
- Protected Member Functions inherited from variable_info< vit >
void throw_on_invalid () const
 
void calculate_value ()
 
- Protected Attributes inherited from variable_info< vit >
std::string name_
 
variable_info_detail::variable_info_state
< vit > 
state_
 
bool valid_
 
- Private Types inherited from variable_info_detail::enable_if_non_const< vit >
typedef enable_if_non_const< vit > type
 

Detailed Description

template<const variable_info_detail::variable_info_type vit>
class non_const_variable_info< vit >

Extends variable_info with methods that can only be applied if vit != vit_const.

Definition at line 73 of file variable_info.hpp.

Constructor & Destructor Documentation

template<const variable_info_detail::variable_info_type vit>
non_const_variable_info< vit >::non_const_variable_info ( const std::string name,
config game_vars 
)
inline

Definition at line 76 of file variable_info.hpp.

template<const variable_info_detail::variable_info_type vit>
non_const_variable_info< vit >::~non_const_variable_info ( )
inline

Definition at line 77 of file variable_info.hpp.

Member Function Documentation

template<const variable_info_type vit>
config::child_itors non_const_variable_info< vit >::append_array ( std::vector< config childs) const
Returns
: the new appended range might throw invalid_variablename_exception

Definition at line 634 of file variable_info.cpp.

Referenced by game_data::add_variable_cfg(), and game_events::WML_HANDLER_FUNCTION().

template<const variable_info_type vit>
void non_const_variable_info< vit >::clear ( bool  only_tables = false) const

clears the vale this object points to if only_tables = true it will not clear attribute values.

might throw invalid_variablename_exception

Definition at line 627 of file variable_info.cpp.

Referenced by game_data::clear_variable(), and game_data::clear_variable_cfg().

template<const variable_info_type vit>
config::child_itors non_const_variable_info< vit >::insert_array ( std::vector< config childs) const
Returns
: the new inserted range might throw invalid_variablename_exception

Definition at line 641 of file variable_info.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

template<const variable_info_type vit>
void non_const_variable_info< vit >::merge_array ( std::vector< config childs) const

merges might throw invalid_variablename_exception

Definition at line 655 of file variable_info.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

template<const variable_info_type vit>
config::child_itors non_const_variable_info< vit >::replace_array ( std::vector< config childs) const
Returns
: the new range might throw invalid_variablename_exception

Definition at line 648 of file variable_info.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().


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