|
inicpp
C++ parser of INI files with schema validation.
|
#include <parser.h>
Public Member Functions | |
| parser ()=delete | |
| parser (const parser &source)=delete | |
| parser & | operator= (const parser &source)=delete |
| parser (parser &&source)=delete | |
| parser & | operator= (parser &&source)=delete |
Static Public Member Functions | |
| static config | load (const std::string &str) |
| static config | load (const std::string &str, const schema &schm, schema_mode mode) |
| static config | load (std::istream &str) |
| static config | load (std::istream &str, const schema &schm, schema_mode mode) |
| static config | load_file (const std::string &file) |
| static config | load_file (const std::string &file, const schema &schm, schema_mode mode) |
| static void | save (const config &cfg, const std::string &file) |
| static void | save (const config &cfg, std::ostream &str) |
| static void | save (const config &cfg, const schema &schm, const std::string &file) |
| static void | save (const config &cfg, const schema &schm, std::ostream &str) |
| static void | save (const schema &schm, const std::string &file) |
| static void | save (const schema &schm, std::ostream &str) |
Parser is not constructable class which contains methods which can be used to load or store ini configuration.
|
delete |
Deleted default constructor.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
static |
Load ini configuration from given string and return it.
| str | ini configuration description |
| parser_exception | if ini configuration is wrong |
Definition at line 305 of file parser.cpp.
|
static |
Load ini configuration from given string and validate it through schema.
| str | ini configuration description |
| schm | validation schema |
| mode | validation mode |
| parser_exception | if ini configuration is wrong |
| validation_exception | if configuration does not comply schema |
Definition at line 311 of file parser.cpp.
|
static |
Load ini configuration from given stream and return it.
| str | ini configuration description |
| parser_exception | if ini configuration is wrong |
Definition at line 319 of file parser.cpp.
Load ini configuration from given stream and validate it through schema.
| str | ini configuration description |
| schm | validation schema |
| mode | validation mode |
| parser_exception | if ini configuration is wrong |
| validation_exception | if configuration does not comply schema |
Definition at line 324 of file parser.cpp.
|
static |
Load ini configuration from file with specified name.
| file | name of file which contains ini configuration |
| parser_exception | if ini configuration is wrong |
Definition at line 331 of file parser.cpp.
|
static |
Load ini configuration from file with specified name and validate it against given schema.
| file | name of file with ini configuration |
| schm | validation schema |
| mode | validation mode |
| parser_exception | if ini configuration is wrong |
| validation_exception | if configuration does not comply schema |
Definition at line 341 of file parser.cpp.
|
static |
Save given configuration to file.
| cfg | configuration which will be saved |
| file | name of output file |
Definition at line 353 of file parser.cpp.
|
static |
Save configuration to output stream.
| cfg | configuration which will be saved |
| str | output stream |
Definition at line 360 of file parser.cpp.
|
static |
Save given configuration (could be only partial) to a file. Options which are not specified will be substitued by default values from schema.
| cfg | configuration which will be saved |
| schm | schema which will be saved |
| file | name of output file |
Definition at line 365 of file parser.cpp.
Save given configuration (could be only partial) to output stream. Options which are not specified will be substitued by default values from schema.
| cfg | configuration which will be saved |
| schm | schema which will be saved |
| str | output stream |
Definition at line 372 of file parser.cpp.
|
static |
Save validation schema to file.
| schm | schema which will be saved |
| file | name of output file |
Definition at line 377 of file parser.cpp.
|
static |
Save given validation schema to output stream.
| schm | schema which will be saved |
| str | output stream |
Definition at line 384 of file parser.cpp.