mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-09 22:18:58 +01: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 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:
|
||||
std::string name;
|
||||
|
||||
std::vector<std::string> keys_order;
|
||||
std::map<std::string, std::string, CaseInsensitiveStringCompare> values;
|
||||
SectionMap values;
|
||||
|
||||
std::vector<std::string> 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<Section>& GetSections() const { return sections; }
|
||||
private:
|
||||
std::list<Section> sections;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user