#include <section_schema.h>
In section_schema are defined rules which ini section should fulfil. Section can be validated against section_schema objects.
Definition at line 37 of file section_schema.h.
inicpp::section_schema::section_schema |
( |
| ) |
|
|
delete |
Default constructor is deleted.
inicpp::section_schema::section_schema |
( |
const section_schema & |
source | ) |
|
void inicpp::section_schema::add_option |
( |
const option_schema & |
opt | ) |
|
template<typename ArgType >
Creates option_schema from given arguments and add it to options list.
- Parameters
-
arguments | creation paramaters |
- Exceptions
-
Definition at line 111 of file section_schema.h.
bool inicpp::section_schema::contains |
( |
const std::string & |
option_name | ) |
const |
Tries to find option_schema with specified name inside this section.
- Parameters
-
option_name | name which is searched |
- Returns
- true if option_schema with this name is present, false otherwise
Definition at line 140 of file section_schema.cpp.
const std::string & inicpp::section_schema::get_comment |
( |
| ) |
const |
Get textual description of section.
- Returns
- constant reference
Definition at line 59 of file section_schema.cpp.
const std::string & inicpp::section_schema::get_name |
( |
| ) |
const |
bool inicpp::section_schema::is_mandatory |
( |
| ) |
const |
Determines whether this section is mandatory.
- Returns
- true if section has to be in configuration
Definition at line 64 of file section_schema.cpp.
option_schema & inicpp::section_schema::operator[] |
( |
size_t |
index | ) |
|
const option_schema & inicpp::section_schema::operator[] |
( |
size_t |
index | ) |
const |
option_schema & inicpp::section_schema::operator[] |
( |
const std::string & |
option_name | ) |
|
const option_schema & inicpp::section_schema::operator[] |
( |
const std::string & |
option_name | ) |
const |
void inicpp::section_schema::remove_option |
( |
const std::string & |
name | ) |
|
Remove containing option schema of given name.
- Parameters
-
name | name of option schema to be removed |
- Exceptions
-
Definition at line 81 of file section_schema.cpp.
size_t inicpp::section_schema::size |
( |
| ) |
const |
Returns size of option schemas list
- Returns
- unsigned integer
Definition at line 99 of file section_schema.cpp.
void inicpp::section_schema::validate_section |
( |
section & |
sect, |
|
|
schema_mode |
mode |
|
) |
| const |
std::ostream & inicpp::section_schema::write_additional_info |
( |
std::ostream & |
os | ) |
const |
To given output stream writes additional information about section. Written info is in ini comment format.
- Parameters
-
- Returns
- reference to output stream for better chaining
Definition at line 196 of file section_schema.cpp.
std::ostream & inicpp::section_schema::write_section_name |
( |
std::ostream & |
os | ) |
const |
To given output stream writes name of this section. Written name is in ini format.
- Parameters
-
- Returns
- reference to output stream for better chaining
Definition at line 211 of file section_schema.cpp.
INICPP_API friend std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const section_schema & |
sect_schema |
|
) |
| |
|
friend |
Classic stream operator for printing this instance to output stream.
- Parameters
-
os | output stream |
sect_schema | reference to section_schema instance to be written |
- Returns
- reference to output stream which allows chaining
Definition at line 217 of file section_schema.cpp.
The documentation for this class was generated from the following files: