#include <variable.hpp>
Public Types | |
typedef std::vector< vconfig > | child_list |
Public Member Functions | |
vconfig () | |
vconfig (const vconfig &v) | |
vconfig (const config *cfg, const config *cache_key=NULL) | |
~vconfig () | |
vconfig & | operator= (const vconfig cfg) |
vconfig & | operator= (const config *cfg) |
bool | null () const |
const config & | get_config () const |
const config | get_parsed_config () const |
child_list | get_children (const std::string &key) const |
vconfig | child (const std::string &key) const |
bool | has_child (const std::string &key) const |
const t_string | expand (const std::string &) const |
const t_string | operator[] (const std::string &key) const |
< Synonym for operator[] | |
const t_string & | get_attribute (const std::string &key) const |
bool | has_attribute (const std::string &key) const |
bool | empty () const |
all_children_iterator | ordered_begin () const |
In-order iteration over all children. | |
all_children_iterator | ordered_end () const |
Private Attributes | |
const config * | cfg_ |
const config * | cache_key_ |
std::set< std::string > | recursion_ |
Classes | |
struct | all_children_iterator |
This class roughly behaves as a constant config object, but automatically expands variables.
Definition at line 34 of file variable.hpp.
typedef std::vector<vconfig> vconfig::child_list |
Definition at line 49 of file variable.hpp.
vconfig::vconfig | ( | ) |
Definition at line 151 of file variable.cpp.
Referenced by child(), vconfig::all_children_iterator::get_child(), get_children(), vconfig::all_children_iterator::get_key(), get_parsed_config(), and vconfig::all_children_iterator::operator++().
vconfig::vconfig | ( | const vconfig & | v | ) |
Definition at line 156 of file variable.cpp.
References cache_key_, cfg_, and increment_config_usage().
vconfig::~vconfig | ( | ) |
Definition at line 177 of file variable.cpp.
References cache_key_, cfg_, decrement_config_usage(), and increment_config_usage().
Definition at line 187 of file variable.cpp.
References cache_key_, cfg_, and decrement_config_usage().
bool vconfig::null | ( | ) | const [inline] |
const config& vconfig::get_config | ( | ) | const [inline] |
const config vconfig::get_parsed_config | ( | ) | const |
Definition at line 197 of file variable.cpp.
References config::add_child(), variable_info::as_array(), variable_info::as_container(), cfg_, child(), ERR_NG, expand(), variable_info::explicit_index, get_config(), variable_info::is_valid, name, config::ordered_begin(), config::ordered_end(), recursion_, variable_info::TYPE_CONTAINER, config::values, and vconfig().
vconfig::child_list vconfig::get_children | ( | const std::string & | key | ) | const |
Definition at line 243 of file variable.cpp.
References variable_info::as_array(), variable_info::as_container(), cache_key_, cfg_, child(), variable_info::explicit_index, variable_info::is_valid, config::ordered_begin(), config::ordered_end(), variable_info::TYPE_CONTAINER, and vconfig().
Referenced by game_events::conditional_passed(), terrain_filter::get_locations(), game_events::internal_conditional_passed(), unit::internal_matches_filter(), and terrain_filter::match_internal().
vconfig vconfig::child | ( | const std::string & | key | ) | const |
Definition at line 280 of file variable.cpp.
References variable_info::as_container(), cache_key_, cfg_, config::child(), config::child_range(), variable_info::is_valid, variable_info::TYPE_CONTAINER, and vconfig().
Referenced by get_children(), get_parsed_config(), unit::internal_matches_filter(), and terrain_filter::match_internal().
bool vconfig::has_child | ( | const std::string & | key | ) | const |
Definition at line 303 of file variable.cpp.
References cfg_, config::child(), and config::child_range().
Referenced by terrain_filter::get_locations(), unit::internal_matches_filter(), and terrain_filter::match_internal().
const t_string vconfig::expand | ( | const std::string & | key | ) | const |
Definition at line 319 of file variable.cpp.
References utils::interpolate_variables_into_string(), and t_string::str().
Referenced by get_parsed_config(), and operator[]().
const t_string vconfig::operator[] | ( | const std::string & | key | ) | const [inline] |
const t_string& vconfig::get_attribute | ( | const std::string & | key | ) | const [inline] |
Definition at line 56 of file variable.hpp.
References cfg_.
Referenced by game_events::internal_conditional_passed().
bool vconfig::has_attribute | ( | const std::string & | key | ) | const [inline] |
Definition at line 57 of file variable.hpp.
References cfg_, and config::has_attribute().
Referenced by terrain_filter::get_locations(), unit::internal_matches_filter(), and terrain_filter::match_internal().
bool vconfig::empty | ( | ) | const [inline] |
vconfig::all_children_iterator vconfig::ordered_begin | ( | ) | const |
In-order iteration over all children.
Definition at line 411 of file variable.cpp.
References cfg_, and config::ordered_begin().
Referenced by game_events::conditional_passed(), terrain_filter::get_locations(), unit::matches_filter(), and game_events::matches_special_filter().
vconfig::all_children_iterator vconfig::ordered_end | ( | ) | const |
Definition at line 416 of file variable.cpp.
References cfg_, and config::ordered_end().
Referenced by game_events::conditional_passed(), terrain_filter::get_locations(), unit::matches_filter(), and game_events::matches_special_filter().
const config* vconfig::cfg_ [private] |
Definition at line 93 of file variable.hpp.
Referenced by child(), empty(), get_attribute(), get_children(), get_config(), get_parsed_config(), has_attribute(), has_child(), null(), operator=(), ordered_begin(), ordered_end(), and vconfig().
const config* vconfig::cache_key_ [private] |
Definition at line 94 of file variable.hpp.
Referenced by child(), get_children(), operator=(), vconfig(), and ~vconfig().
std::set<std::string> vconfig::recursion_ [mutable, private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |