The Battle for Wesnoth  1.19.7+dev
Classes | Functions | Variables
schema_validation Namespace Reference

Classes

class  wml_key
 wml_key is used to save the information about one key. More...
 
class  wml_tag
 Stores information about tag. More...
 
class  wml_condition
 Stores information about a conditional portion of a tag. More...
 
class  wml_type
 Stores information about a schema type. More...
 
class  wml_type_simple
 Stores information about a schema type. More...
 
class  wml_type_alias
 Stores information about a schema type. More...
 
class  wml_type_composite
 Stores information about a schema type. More...
 
class  wml_type_union
 Stores information about a schema type. More...
 
class  wml_type_intersection
 Stores information about a schema type. More...
 
class  wml_type_list
 Stores information about a schema type. More...
 
class  wml_type_tstring
 
class  schema_validator
 Realization of serialization/validator.hpp abstract validator. More...
 
class  schema_self_validator
 

Functions

static std::string at (const std::string &file, int line)
 
static void print_output (const std::string &message, bool flag_exception=false)
 
static std::string extra_tag_error (const std::string &file, int line, const std::string &name, int n, const std::string &parent, bool flag_exception)
 
static std::string wrong_tag_error (const std::string &file, int line, const std::string &name, const std::string &parent, bool flag_exception)
 
static std::string missing_tag_error (const std::string &file, int line, const std::string &name, int n, const std::string &parent, bool flag_exception)
 
static std::string extra_key_error (const std::string &file, int line, const std::string &tag, const std::string &key, bool flag_exception)
 
static std::string missing_key_error (const std::string &file, int line, const std::string &tag, const std::string &key, bool flag_exception)
 
static std::string wrong_value_error (const std::string &file, int line, const std::string &tag, const std::string &key, const std::string &value, const std::string &expected, bool flag_exception)
 
static std::string inheritance_cycle_error (const std::string &file, int line, const std::string &tag, const std::string &schema_name, const std::string &value, bool flag_exception)
 
static std::string link_cycle_error (const std::string &file, int line, const std::string &tag, const std::string &value, bool flag_exception)
 
static std::string missing_super_error (const std::string &file, int line, const std::string &tag, const std::string &schema_name, const std::string &super, bool flag_exception)
 
static void wrong_path_error (const std::string &file, int line, const std::string &tag, const std::string &key, const std::string &value, bool flag_exception)
 
static void duplicate_tag_error (const std::string &file, int line, const std::string &tag, const std::string &pat, const std::string &value, bool flag_exception)
 
static void duplicate_key_error (const std::string &file, int line, const std::string &tag, const std::string &pat, const std::string &value, bool flag_exception)
 
static void inheritance_loop_error (const std::string &file, int line, const std::string &tag, const std::string &key, const std::string &value, int index, bool flag_exception)
 
static void wrong_type_error (const std::string &file, int line, const std::string &tag, const std::string &key, const std::string &type, bool flag_exception)
 

Variables

wml_tag any_tag ("", 0, -1, "", true)
 
static lg::log_domain log_validation ("validation")
 

Function Documentation

◆ at()

static std::string schema_validation::at ( const std::string &  file,
int  line 
)
static

◆ duplicate_key_error()

static void schema_validation::duplicate_key_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  pat,
const std::string &  value,
bool  flag_exception 
)
static

◆ duplicate_tag_error()

static void schema_validation::duplicate_tag_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  pat,
const std::string &  value,
bool  flag_exception 
)
static

◆ extra_key_error()

static std::string schema_validation::extra_key_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
bool  flag_exception 
)
static

◆ extra_tag_error()

static std::string schema_validation::extra_tag_error ( const std::string &  file,
int  line,
const std::string &  name,
int  n,
const std::string &  parent,
bool  flag_exception 
)
static

Definition at line 61 of file schema_validator.cpp.

References at(), draw::line(), n, and print_output().

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

◆ inheritance_cycle_error()

static std::string schema_validation::inheritance_cycle_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  schema_name,
const std::string &  value,
bool  flag_exception 
)
static

◆ inheritance_loop_error()

static void schema_validation::inheritance_loop_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
const std::string &  value,
int  index,
bool  flag_exception 
)
static

◆ link_cycle_error()

static std::string schema_validation::link_cycle_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  value,
bool  flag_exception 
)
static

◆ missing_key_error()

static std::string schema_validation::missing_key_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
bool  flag_exception 
)
static

◆ missing_super_error()

static std::string schema_validation::missing_super_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  schema_name,
const std::string &  super,
bool  flag_exception 
)
static

◆ missing_tag_error()

static std::string schema_validation::missing_tag_error ( const std::string &  file,
int  line,
const std::string &  name,
int  n,
const std::string &  parent,
bool  flag_exception 
)
static

Definition at line 84 of file schema_validator.cpp.

References at(), draw::line(), n, and print_output().

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

◆ print_output()

static void schema_validation::print_output ( const std::string &  message,
bool  flag_exception = false 
)
static

◆ wrong_path_error()

static void schema_validation::wrong_path_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
const std::string &  value,
bool  flag_exception 
)
static

◆ wrong_tag_error()

static std::string schema_validation::wrong_tag_error ( const std::string &  file,
int  line,
const std::string &  name,
const std::string &  parent,
bool  flag_exception 
)
static

◆ wrong_type_error()

static void schema_validation::wrong_type_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
const std::string &  type,
bool  flag_exception 
)
static

◆ wrong_value_error()

static std::string schema_validation::wrong_value_error ( const std::string &  file,
int  line,
const std::string &  tag,
const std::string &  key,
const std::string &  value,
const std::string &  expected,
bool  flag_exception 
)
static

Variable Documentation

◆ any_tag

wml_tag schema_validation::any_tag("", 0, -1, "", true) ( ""  ,
,
1,
""  ,
true   
)

◆ log_validation

lg::log_domain schema_validation::log_validation("validation") ( "validation"  )
static