C++ Utilities  4.17.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Public Member Functions | List of all members
IoUtilities::IniFile Class Reference

The IniFile class parses and makes INI files. More...

#include <inifile.h>

Public Member Functions

 IniFile ()
 Constructs an empty ini file. More...
 
std::vector< std::pair< std::string, std::multimap< std::string, std::string > > > & data ()
 Returns the data of the file. More...
 
const std::vector< std::pair< std::string, std::multimap< std::string, std::string > > > & data () const
 Returns the data of the file. More...
 
void parse (std::istream &inputStream)
 Parses all data from the specified inputStream. More...
 
void make (std::ostream &outputStream)
 Write the current data to the specified outputStream. More...
 

Detailed Description

The IniFile class parses and makes INI files.

Definition at line 12 of file inifile.h.

Constructor & Destructor Documentation

◆ IniFile()

IoUtilities::IniFile::IniFile ( )
inline

Constructs an empty ini file.

Definition at line 28 of file inifile.h.

Member Function Documentation

◆ data() [1/2]

std::vector< std::pair< std::string, std::multimap< std::string, std::string > > > & IoUtilities::IniFile::data ( )
inline

Returns the data of the file.

Remarks
  • The returned pairs represent the [scope names] and the contained "key = value"-pairs.
  • The data might be modified and then saved using the make() method.

Definition at line 38 of file inifile.h.

◆ data() [2/2]

const std::vector< std::pair< std::string, std::multimap< std::string, std::string > > > & IoUtilities::IniFile::data ( ) const
inline

Returns the data of the file.

Remarks
The returned pairs represent the [scope names] and the contained "key = value"-pairs.

Definition at line 47 of file inifile.h.

◆ make()

void IoUtilities::IniFile::make ( std::ostream &  outputStream)

Write the current data to the specified outputStream.

Definition at line 153 of file inifile.cpp.

◆ parse()

void IoUtilities::IniFile::parse ( std::istream &  inputStream)

Parses all data from the specified inputStream.

Definition at line 18 of file inifile.cpp.


The documentation for this class was generated from the following files: