NDS3  1.0.0
API reference manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iniFileParser.h
Go to the documentation of this file.
1 /*
2  * Nominal Device Support v3 (NDS3)
3  *
4  * Copyright (c) 2015 Cosylab d.d.
5  *
6  * For more information about the license please refer to the license.txt
7  * file included in the distribution.
8  */
9 
10 #ifndef NDSINIFILEPARSER_H
11 #define NDSINIFILEPARSER_H
12 
22 #include <istream>
23 #include <string>
24 #include <memory>
25 #include "nds3/definitions.h"
26 
27 namespace nds
28 {
29 
30 class IniFileParserImpl;
31 
37 class NDS3_API IniFileParser
38 {
39 public:
46  IniFileParser(std::istream& inputStream);
47 
48  ~IniFileParser();
49 
60  const std::string& getString(const std::string& section, const std::string& key, const std::string& defaultValue) const;
61 
72  bool keyExists(const std::string& section, const std::string& key) const;
73 
74 private:
75  std::shared_ptr<IniFileParserImpl> m_pImplementation;
76 
77 
78 };
79 
80 }
81 
82 #endif // NDSINIFILEPARSER_H
83 
Parses an INI file and stores all the found sections and keys for future retrieval via getString()...
Definition: iniFileParser.h:37
Defines all the enumeration and common types used across the NDS library.