The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Private Attributes | List of all members
schema_validation::wml_type_alias Class Reference

Stores information about a schema type. More...

#include <type.hpp>

Inheritance diagram for schema_validation::wml_type_alias:

Public Member Functions

 wml_type_alias (const std::string &name, const std::string &link)
 
bool matches (const config_attribute_value &value, const map &type_map) const override
 
const std::string & link () const
 
- Public Member Functions inherited from schema_validation::wml_type
 wml_type ()=delete
 
 wml_type (const std::string &name)
 
virtual ~wml_type ()
 

Private Attributes

std::shared_ptr< wml_typecached_
 
std::string link_
 

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
std::string name_
 

Detailed Description

Stores information about a schema type.

This type represents a name alias for another type.

Definition at line 66 of file type.hpp.

Constructor & Destructor Documentation

◆ wml_type_alias()

schema_validation::wml_type_alias::wml_type_alias ( const std::string &  name,
const std::string &  link 
)
inline

Definition at line 70 of file type.hpp.

Member Function Documentation

◆ link()

const std::string& schema_validation::wml_type_alias::link ( ) const
inline

Definition at line 72 of file type.hpp.

References link_.

Referenced by schema_validation::schema_validator::collect_link_target().

◆ matches()

bool schema_validation::wml_type_alias::matches ( const config_attribute_value value,
const map type_map 
) const
overridevirtual

Implements schema_validation::wml_type.

Definition at line 93 of file type.cpp.

References cached_, and link_.

Member Data Documentation

◆ cached_

std::shared_ptr<wml_type> schema_validation::wml_type_alias::cached_
mutableprivate

Definition at line 67 of file type.hpp.

Referenced by matches().

◆ link_

std::string schema_validation::wml_type_alias::link_
private

Definition at line 68 of file type.hpp.

Referenced by link(), and matches().


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