C++ Utilities  4.6.1
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
inifile.h
Go to the documentation of this file.
1 #ifndef IOUTILITIES_INIFILE_H
2 #define IOUTILITIES_INIFILE_H
3 
4 #include "../global.h"
5 
6 #include <vector>
7 #include <map>
8 #include <string>
9 
10 namespace IoUtilities {
11 
13 {
14 public:
15  IniFile();
16 
17  std::vector<std::pair<std::string, std::multimap<std::string, std::string> > > &data();
18  const std::vector<std::pair<std::string, std::multimap<std::string, std::string> > > &data() const;
19  void parse(std::istream &inputStream);
20  void make(std::ostream &outputStream);
21 
22 private:
23  std::vector<std::pair<std::string, std::multimap<std::string, std::string> > > m_data;
24 };
25 
30 {}
31 
38 inline std::vector<std::pair<std::string, std::multimap<std::string, std::string> > > &IniFile::data()
39 {
40  return m_data;
41 }
42 
47 inline const std::vector<std::pair<std::string, std::multimap<std::string, std::string> > > &IniFile::data() const
48 {
49  return m_data;
50 }
51 
52 } // namespace IoUtilities
53 
54 #endif // IOUTILITIES_INIFILE_H
std::vector< std::pair< std::string, std::multimap< std::string, std::string > > > & data()
Returns the data of the file.
Definition: inifile.h:38
Contains utility classes helping to read and write streams.
Definition: binaryreader.h:10
IniFile()
Constructs an empty ini file.
Definition: inifile.h:29
The IniFile class parses and makes INI files.
Definition: inifile.h:12
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.