Skip to content

Commit

Permalink
[#2] Started writing an INI class
Browse files Browse the repository at this point in the history
Signed-off-by: Clovis Durand <cd.clovel19@gmail.com>
  • Loading branch information
Clovel committed Mar 2, 2020
1 parent 6927419 commit 4016c44
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions generator/src/INI.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* @brief INI file class
*
* @file INI.hpp
*/

#ifndef INI_HPP
#define INI_HPP

/* Includes -------------------------------------------- */
#include <string>
#include <fstream>
#include <map>
#include <set>

/* Defines --------------------------------------------- */

/* Type definitions ------------------------------------ */

/* Forzqrd declarations -------------------------------- */

/* EDS class ------------------------------------------- */
class INI {
public:
INI();

virtual ~INI();

/* Getters */
std::string fileName(void) const;

/* Setters */
int setFile(const std::string &pFileName);

/* Parser */
int parseEDSFile(const std::string &pFile);
protected:
std::string mFileName;
std::fstream mFileStream;

std::map<std:sstring> mValues;
std::set<std::string> mSections;
std::map<std::string, std::set<std::string> *> mFields;

private:
};

#endif /* INI_HPP */

0 comments on commit 4016c44

Please sign in to comment.