Loads, reads and parses the contents of an INI file (or string).
More...
#include <INI.hpp>
|
| Parser () |
| Creates a blank new INI file.
|
|
| Parser (std::string filename) |
| Load and parse #filename.
|
|
| Parser (std::istream &stream) |
| Parse a stream.
|
|
void | dump (std::ostream &stream) |
| Outputs the contents of the INI file to #stream.
|
|
Level & | top () |
| Returns the top level of this INI file.
|
|
const std::string & | operator[] (const std::string &name) |
| Shortcut to access a key within the top level.
|
|
Level & | operator() (const std::string &name) |
| Shortcut to access a Level within the top level.
|
|
void | create () |
| Creates a blank INI registry.
|
|
void | saveAs (std::string filename) |
| Save all the internal INI contents on a file with #filename.
|
|
Loads, reads and parses the contents of an INI file (or string).
Definition at line 156 of file INI.hpp.
◆ Parser() [1/3]
◆ Parser() [2/3]
INI::Parser::Parser |
( |
std::string | filename | ) |
|
Load and parse #filename.
Definition at line 61 of file INI.cpp.
◆ Parser() [3/3]
INI::Parser::Parser |
( |
std::istream & | stream | ) |
|
Parse a stream.
It can be used to parse strings from memory.
Definition at line 72 of file INI.cpp.
◆ create()
void INI::Parser::create |
( |
| ) |
|
Creates a blank INI registry.
It resets itself, allowing you to create brand new INI files from scratch.
- See also
- Level::addKey()
-
level::addGroup()
- Note
- It drops everything that may already have been loaded.
Definition at line 215 of file INI.cpp.
◆ dump()
void INI::Parser::dump |
( |
std::ostream & | stream | ) |
|
Outputs the contents of the INI file to #stream.
It dumps a valid INI file, according to this parsers modifications.
Definition at line 84 of file INI.cpp.
◆ operator()()
Level & INI::Parser::operator() |
( |
const std::string & | name | ) |
|
|
inline |
Shortcut to access a Level within the top level.
Definition at line 193 of file INI.hpp.
◆ operator[]()
const std::string & INI::Parser::operator[] |
( |
const std::string & | name | ) |
|
|
inline |
Shortcut to access a key within the top level.
Definition at line 187 of file INI.hpp.
◆ saveAs()
void INI::Parser::saveAs |
( |
std::string | filename | ) |
|
Save all the internal INI contents on a file with #filename.
Definition at line 206 of file INI.cpp.
◆ top()
Returns the top level of this INI file.
You can then access all it's keys and nested groups with the Level methods.
- See also
- Level
Definition at line 79 of file INI.cpp.
The documentation for this class was generated from the following files: