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

Stores information about a schema type. More...

#include <type.hpp>

Inheritance diagram for schema_validation::wml_type_simple:

Public Member Functions

 wml_type_simple (const std::string &name, const std::string &pattern)
 
bool matches (const config_attribute_value &value, const map &type_map) const override
 
void allow_translatable ()
 
- 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 pattern_
 
bool allow_translatable_ = false
 

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 simple pattern match.

Definition at line 53 of file type.hpp.

Constructor & Destructor Documentation

◆ wml_type_simple()

schema_validation::wml_type_simple::wml_type_simple ( const std::string &  name,
const std::string &  pattern 
)
inline

Definition at line 57 of file type.hpp.

Member Function Documentation

◆ allow_translatable()

void schema_validation::wml_type_simple::allow_translatable ( )
inline

Definition at line 59 of file type.hpp.

References allow_translatable_.

◆ matches()

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

Member Data Documentation

◆ allow_translatable_

bool schema_validation::wml_type_simple::allow_translatable_ = false
private

Definition at line 55 of file type.hpp.

Referenced by allow_translatable(), and matches().

◆ pattern_

boost::regex schema_validation::wml_type_simple::pattern_
private

Definition at line 54 of file type.hpp.

Referenced by matches().


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