The Battle for Wesnoth  1.19.5+dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
schema_validation::wml_type Class Referenceabstract

Stores information about a schema type. More...

#include <type.hpp>

Inheritance diagram for schema_validation::wml_type:

Public Types

using ptr = std::shared_ptr< wml_type >
 
using map = std::map< std::string, ptr >
 

Public Member Functions

 wml_type ()=delete
 
 wml_type (const std::string &name)
 
virtual bool matches (const config_attribute_value &value, const map &type_map) const =0
 
virtual ~wml_type ()
 

Static Public Member Functions

static std::shared_ptr< wml_typefrom_config (const config &cfg)
 

Protected Attributes

std::string name_
 

Detailed Description

Stores information about a schema type.

This is an abstract base class for several variants of schema type.

Definition at line 36 of file type.hpp.

Member Typedef Documentation

◆ map

using schema_validation::wml_type::map = std::map<std::string, ptr>

Definition at line 43 of file type.hpp.

◆ ptr

using schema_validation::wml_type::ptr = std::shared_ptr<wml_type>

Definition at line 42 of file type.hpp.

Constructor & Destructor Documentation

◆ wml_type() [1/2]

schema_validation::wml_type::wml_type ( )
delete

◆ wml_type() [2/2]

schema_validation::wml_type::wml_type ( const std::string &  name)
inlineexplicit

Definition at line 41 of file type.hpp.

◆ ~wml_type()

virtual schema_validation::wml_type::~wml_type ( )
inlinevirtual

Definition at line 46 of file type.hpp.

Member Function Documentation

◆ from_config()

std::shared_ptr< wml_type > schema_validation::wml_type::from_config ( const config cfg)
static

◆ matches()

virtual bool schema_validation::wml_type::matches ( const config_attribute_value value,
const map type_map 
) const
pure virtual

Member Data Documentation

◆ name_

std::string schema_validation::wml_type::name_
protected

Definition at line 38 of file type.hpp.


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