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