|
Antares Simulator
Power System Simulator
|
Data for an INI file. More...
#include <inifile.h>
Classes | |
| class | Property |
| A single entry in an INI file. More... | |
| class | Section |
| A single section, with all its keys. More... | |
Public Member Functions | |
Constructor & Destructor | |
| IniFile ()=default | |
| Default Constructor. | |
| IniFile (const std::filesystem::path &filename) | |
| Load an INI file. | |
| ~IniFile () | |
| Destructor. | |
Load / Save | |
| void | clear () |
| Empty the INI File. | |
| bool | loaded () const |
| Get if the INI file has been loaded/written. | |
| bool | open (const std::string &filename, bool warnings=true) |
| Load an INI file. More... | |
| bool | open (const std::filesystem::path &filename, bool warnings=true) |
| bool | readStream (std::istream &in_stream) |
| bool | save (const AnyString &filename) const |
| Save the entire INI into a file. | |
| void | saveToStream (std::ostream &, uint64_t &) const |
| std::string | toString () const |
| const std::string & | filename () const |
| Get the last filename saved or loaded. | |
Sections | |
| Section * | firstSection = nullptr |
| Section * | lastSection = nullptr |
| Section * | add (Section *s) |
| Add an existing section into the INI structure. | |
| Section * | addSection (const AnyString &name) |
| Create a new section. | |
| bool | empty () const |
| Get if the inifile is empty. | |
| Section * | find (const AnyString &name) |
| Try to find a section by its name. | |
| const Section * | find (const AnyString &name) const |
| Try to find a section by its name (const) | |
| template<class CallbackT > | |
| void | each (const CallbackT &callback) |
| Iterate through all sections. More... | |
| template<class CallbackT > | |
| void | each (const CallbackT &callback) const |
| Iterate through all sections (const) More... | |
| template<class CallbackT > | |
| void | properties (const CallbackT &callback) |
| Iterate through all properties of all sections. More... | |
| template<class CallbackT > | |
| void | properties (const CallbackT &callback) const |
| Iterate through all properties of all sections (const) More... | |
Data for an INI file.
| void Antares::IniFile::each | ( | const CallbackT & | callback | ) |
Iterate through all sections.
| void Antares::IniFile::each | ( | const CallbackT & | callback | ) | const |
Iterate through all sections (const)
| bool Antares::IniFile::open | ( | const std::string & | filename, |
| bool | warnings = true |
||
| ) |
Load an INI file.
| filename | Filename to load |
| void Antares::IniFile::properties | ( | const CallbackT & | callback | ) |
Iterate through all properties of all sections.
| void Antares::IniFile::properties | ( | const CallbackT & | callback | ) | const |
Iterate through all properties of all sections (const)