The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Attributes | List of all members
schema_validation::wml_type_list Class Reference

Stores information about a schema type. More...

#include <type.hpp>

Inheritance diagram for schema_validation::wml_type_list:
Inheritance graph

Public Member Functions

 wml_type_list (const std::string &name, const std::string &pattern, int min, int max)
 
bool matches (const std::string &value, const map &type_map) const override
 
- Public Member Functions inherited from schema_validation::wml_type_union
 wml_type_union (const std::string &name)
 
- Public Member Functions inherited from schema_validation::wml_type_composite
 wml_type_composite (const std::string &name)
 
void add_type (std::shared_ptr< wml_type > type)
 
- Public Member Functions inherited from schema_validation::wml_type
 wml_type ()=delete
 
 wml_type (const std::string &name)
 
virtual ~wml_type ()
 

Private Attributes

boost::regex split_
 
int min_ = 0
 
int max_ = -1
 

Additional Inherited Members

- Public Types inherited from schema_validation::wml_type
using ptr = std::shared_ptr< wml_type >
 
using map = std::map< std::string, ptr >
 
- Static Public Member Functions inherited from schema_validation::wml_type
static std::shared_ptr< wml_typefrom_config (const config &cfg)
 
- Protected Attributes inherited from schema_validation::wml_type_composite
std::vector< std::shared_ptr< wml_type > > subtypes_
 
- Protected Attributes inherited from schema_validation::wml_type
std::string name_
 

Detailed Description

Stores information about a schema type.

Represents a list type, where each list element is itself a union.

Definition at line 109 of file type.hpp.

Constructor & Destructor Documentation

◆ wml_type_list()

schema_validation::wml_type_list::wml_type_list ( const std::string &  name,
const std::string &  pattern,
int  min,
int  max 
)
inline

Definition at line 113 of file type.hpp.

References schema_validation::wml_type::matches().

Member Function Documentation

◆ matches()

bool schema_validation::wml_type_list::matches ( const std::string &  value,
const map type_map 
) const
overridevirtual

Reimplemented from schema_validation::wml_type_union.

Definition at line 110 of file type.cpp.

References match(), and n.

Member Data Documentation

◆ max_

int schema_validation::wml_type_list::max_ = -1
private

Definition at line 111 of file type.hpp.

◆ min_

int schema_validation::wml_type_list::min_ = 0
private

Definition at line 111 of file type.hpp.

◆ split_

boost::regex schema_validation::wml_type_list::split_
private

Definition at line 110 of file type.hpp.


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