Stores information about a conditional portion of a tag. More...
#include <tag.hpp>
Public Member Functions | |
| wml_condition (const config &info, const config &filter) | |
| bool | matches (const config &cfg) const |
Public Member Functions inherited from schema_validation::wml_tag | |
| wml_tag ()=default | |
| wml_tag (const std::string &name, int min, int max, const std::string &super="", bool any=false) | |
| wml_tag (const config &) | |
| void | print (std::ostream &os) |
| Prints information about tag to outputstream, recursively is used to print tag info the format is next [tag] subtags keys name="name" min="min" max="max" [/tag]. More... | |
| const std::string & | get_name () const |
| int | get_min () const |
| int | get_max () const |
| int | get_min_children () const |
| int | get_max_children () const |
| const std::string & | get_super () const |
| bool | is_extension () const |
| bool | is_fuzzy () const |
| bool | accepts_any_tag () const |
| void | set_name (const std::string &name) |
| void | set_min (int o) |
| void | set_max (int o) |
| void | set_min_children (int o) |
| void | set_max_children (int o) |
| void | set_min (const std::string &s) |
| void | set_max (const std::string &s) |
| void | set_min_children (const std::string &s) |
| void | set_max_children (const std::string &s) |
| void | set_super (const std::string &s) |
| void | set_fuzzy (bool f) |
| void | set_any_tag (bool any) |
| void | add_key (const wml_key &new_key) |
| void | add_tag (const wml_tag &new_tag) |
| void | add_link (const std::string &link) |
| void | add_switch (const config &switch_cfg) |
| void | add_filter (const config &cond_cfg) |
| void | add_tag (const std::string &path, const wml_tag &tag, wml_tag &root) |
| Tags are usually organized in tree. More... | |
| bool | operator< (const wml_tag &t) const |
| bool | operator== (const wml_tag &other) const |
| const wml_key * | find_key (const std::string &name, const config &match, bool ignore_super=false) const |
| Returns pointer to child key. More... | |
| const std::string * | find_link (const std::string &name) const |
| Returns pointer to child link. More... | |
| const wml_tag * | find_tag (const std::string &fullpath, const wml_tag &root, const config &match, bool ignore_super=false) const |
| Returns pointer to tag using full path to it. More... | |
| void | expand_all (wml_tag &root) |
| Calls the expansion on each child. More... | |
| boost::iterator_range< tag_iterator > | tags (const config &cfg_match) const |
| boost::iterator_range< key_iterator > | keys (const config &cfg_match) const |
| boost::iterator_range< super_iterator > | super (const config &cfg_match) const |
| const link_map & | links () const |
| const condition_list & | conditions () const |
| void | remove_key_by_name (const std::string &name) |
| void | remove_keys_by_type (const std::string &type) |
| Removes all keys with this type. More... | |
Private Attributes | |
| config | filter_ |
Additional Inherited Members | |
Public Types inherited from schema_validation::wml_tag | |
| using | tag_map = std::map< std::string, wml_tag > |
| using | key_map = std::map< std::string, wml_key > |
| using | link_map = std::map< std::string, std::string > |
| using | condition_list = std::vector< wml_condition > |
| using | super_list = std::map< std::string, const wml_tag * > |
Stores information about a conditional portion of a tag.
Format is the same as wml_tag.
| bool schema_validation::wml_condition::matches | ( | const config & | cfg | ) | const |
Definition at line 482 of file tag.cpp.
References cfg, config::empty(), and config::matches().