mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
Expose some ways to manage an INI file.
This is required for our later INI file loaders and savers
This commit is contained in:
parent
a2f5c3dbe0
commit
85c3e677da
@ -76,11 +76,15 @@ public:
|
|||||||
bool Get(const std::string& key, std::vector<std::string>* values) const;
|
bool Get(const std::string& key, std::vector<std::string>* values) const;
|
||||||
|
|
||||||
bool operator<(const Section& other) const { return name < other.name; }
|
bool operator<(const Section& other) const { return name < other.name; }
|
||||||
|
using SectionMap = std::map<std::string, std::string, CaseInsensitiveStringCompare>;
|
||||||
|
|
||||||
|
const std::string& GetName() const { return name; }
|
||||||
|
const SectionMap& GetValues() const { return values; }
|
||||||
protected:
|
protected:
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
std::vector<std::string> keys_order;
|
std::vector<std::string> keys_order;
|
||||||
std::map<std::string, std::string, CaseInsensitiveStringCompare> values;
|
SectionMap values;
|
||||||
|
|
||||||
std::vector<std::string> lines;
|
std::vector<std::string> lines;
|
||||||
};
|
};
|
||||||
@ -140,6 +144,7 @@ public:
|
|||||||
// In particular it is used in PostProcessing for its configuration
|
// In particular it is used in PostProcessing for its configuration
|
||||||
static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut);
|
static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut);
|
||||||
|
|
||||||
|
const std::list<Section>& GetSections() const { return sections; }
|
||||||
private:
|
private:
|
||||||
std::list<Section> sections;
|
std::list<Section> sections;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user