|
Antares Simulator
Power System Simulator
|
A single section, with all its keys. More...
#include <inifile.h>
Public Member Functions | |
| Section (const AnyString &name) | |
| template<class U > | |
| Property * | add (const AnyString &key, const U &value) |
| Add a new property. | |
| template<class U > | |
| Property * | add (const AnyString &key, const std::optional< U > &value) |
| void | add (const Property &property) |
| void | saveToStream (std::ostream &file, uint64_t &written) const |
| Property * | find (const AnyString &key) |
| const Property * | find (const AnyString &key) const |
| template<class U , class StringT > | |
| U | read (const StringT &key, const U &defValue) const |
| Try to read a property. More... | |
| template<class CallbackT > | |
| void | each (const CallbackT &callback) |
| Iterate through all properties. More... | |
| template<class CallbackT > | |
| void | each (const CallbackT &callback) const |
| Iterate through all properties (const) More... | |
| bool | empty () const |
| Get if the section is empty. | |
| uint | size () const |
| Get the number of properties. | |
| template<class U > | |
| IniFile::Property * | add (const AnyString &key, const U &value) |
| template<class U > | |
| IniFile::Property * | add (const AnyString &key, const std::optional< U > &value) |
Public Attributes | |
| Yuni::ShortString256 | name |
| The name of the section. | |
| IniFile::Property * | firstProperty = nullptr |
| The first property of the section. | |
| IniFile::Property * | lastProperty = nullptr |
| The last property of the section. | |
| Section * | next = nullptr |
| The next section. | |
A single section, with all its keys.
| void Antares::IniFile::Section::each | ( | const CallbackT & | callback | ) |
Iterate through all properties.
| void Antares::IniFile::Section::each | ( | const CallbackT & | callback | ) | const |
Iterate through all properties (const)
|
inline |
Try to read a property.
If the property can not be found, the default value will be used.
| key | The property name |
| defValue | The default value |