|
C++ Utilities 5.36.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
The IniFile class allows parsing and writing INI files. More...
#include <inifile.h>
Public Types | |
| using | ScopeName = std::string |
| using | ScopeData = std::multimap<std::string, std::string> |
| using | Scope = std::pair<ScopeName, ScopeData> |
| using | ScopeList = std::vector<Scope> |
Public Member Functions | |
| IniFile () | |
| Constructs an empty ini file. | |
| ScopeList & | data () |
| Returns the data of the file. | |
| const ScopeList & | data () const |
| Returns the data of the file. | |
| void | parse (std::istream &inputStream) |
| Parses all data from the specified inputStream. | |
| void | make (std::ostream &outputStream) |
| Write the current data to the specified outputStream. | |
The IniFile class allows parsing and writing INI files.
| using CppUtilities::IniFile::Scope = std::pair<ScopeName, ScopeData> |
| using CppUtilities::IniFile::ScopeData = std::multimap<std::string, std::string> |
| using CppUtilities::IniFile::ScopeList = std::vector<Scope> |
| using CppUtilities::IniFile::ScopeName = std::string |
|
inline |
|
inline |
|
inline |
| void CppUtilities::IniFile::make | ( | std::ostream & | outputStream | ) |
Write the current data to the specified outputStream.
| Throws | an std::ios_base::failure when an IO error occurs. |
Definition at line 157 of file inifile.cpp.
| void CppUtilities::IniFile::parse | ( | std::istream & | inputStream | ) |
Parses all data from the specified inputStream.
| Throws | an std::ios_base::failure when an IO error (other than end-of-file) occurs. |
Definition at line 38 of file inifile.cpp.