24 #include <boost/regex.hpp> 41 explicit wml_type(
const std::string& name) : name_(name) {}
42 using ptr = std::shared_ptr<wml_type>;
43 using map = std::map<std::string, ptr>;
55 bool allow_translatable_ =
false;
67 mutable std::shared_ptr<wml_type>
cached_;
85 subtypes_.push_back(type);
115 int min_ = 0, max_ = -1;
117 wml_type_list(
const std::string& name,
const std::string& pattern,
int min,
int max)
wml_type_union(const std::string &name)
wml_type_alias(const std::string &name, const std::string &link)
Stores information about a schema type.
Variant for storing WML attributes.
Stores information about a schema type.
std::map< std::string, ptr > map
wml_type_list(const std::string &name, const std::string &pattern, int min, int max)
Stores information about a schema type.
void allow_translatable()
Stores information about a schema type.
Stores information about a schema type.
virtual bool matches(const config_attribute_value &value, const map &type_map) const =0
wml_type_composite(const std::string &name)
static std::shared_ptr< wml_type > from_config(const config &cfg)
Stores information about a schema type.
wml_type_simple(const std::string &name, const std::string &pattern)
std::shared_ptr< wml_type > cached_
std::shared_ptr< wml_type > ptr
wml_type_intersection(const std::string &name)
std::vector< std::shared_ptr< wml_type > > subtypes_
wml_type(const std::string &name)
A config object defines a single node in a WML file, with access to child nodes.
Stores information about a schema type.
void add_type(std::shared_ptr< wml_type > type)