From 85c3e677da02d9850a488cc2f648a0eaefd0ad35 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 14 Jan 2016 16:38:06 -0600 Subject: [PATCH] Expose some ways to manage an INI file. This is required for our later INI file loaders and savers --- Source/Core/Common/IniFile.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/IniFile.h b/Source/Core/Common/IniFile.h index d0b3ec3618..41061e4d67 100644 --- a/Source/Core/Common/IniFile.h +++ b/Source/Core/Common/IniFile.h @@ -76,11 +76,15 @@ public: bool Get(const std::string& key, std::vector* values) const; bool operator<(const Section& other) const { return name < other.name; } + using SectionMap = std::map; + + const std::string& GetName() const { return name; } + const SectionMap& GetValues() const { return values; } protected: std::string name; std::vector keys_order; - std::map values; + SectionMap values; std::vector lines; }; @@ -140,6 +144,7 @@ public: // In particular it is used in PostProcessing for its configuration static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut); + const std::list
& GetSections() const { return sections; } private: std::list
sections;