Used in parsing config file. More...
#include <validator.hpp>

Classes | |
| struct | error |
| Used to manage with not initialized validators Supposed to be thrown from the constructor. More... | |
Public Member Functions | |
| abstract_validator () | |
| Constructor of validator can throw validator::error. More... | |
| virtual | ~abstract_validator () |
| virtual void | open_tag (const std::string &name, int start_line, const std::string &file, bool addittion=false)=0 |
| Is called when parser opens tag. More... | |
| virtual void | close_tag ()=0 |
| As far as parser is built on stack, some realizations can store stack too. More... | |
| virtual void | validate (const config &cfg, const std::string &name, int start_line, const std::string &file)=0 |
| Validates config. More... | |
| virtual void | validate_key (const config &cfg, const std::string &name, const std::string &value, int start_line, const std::string &file)=0 |
| Checks if key is allowed and if its value is valid What exactly is validated depends on validator realization. More... | |
Used in parsing config file.
parser.cpp Contains virtual methods, which are called by parser and take information about config to be validated
Definition at line 36 of file validator.hpp.
|
inline |
Constructor of validator can throw validator::error.
| abstract_validator::error |
Definition at line 43 of file validator.hpp.
|
inlinevirtual |
Definition at line 45 of file validator.hpp.
|
pure virtual |
As far as parser is built on stack, some realizations can store stack too.
So they need to know if tag was closed.
Implemented in schema_validation::schema_validator.
|
pure virtual |
Is called when parser opens tag.
| name | Name of tag |
| start_line | Line in file |
| file | Name of file |
Implemented in schema_validation::schema_validator.
|
pure virtual |
Validates config.
Checks if all mandatory elements are present. What exactly is validated depends on validator realization
| cfg | Config to be validated. |
| name | Name of tag |
| start_line | Line in file |
| file | Name of file |
Implemented in schema_validation::schema_validator.
|
pure virtual |
Checks if key is allowed and if its value is valid What exactly is validated depends on validator realization.
| cfg | Config to be validated. |
| name | Name of tag |
| start_line | Line in file |
| file | Name of file |
Implemented in schema_validation::schema_validator.
1.8.8