class

FConfigIniFile

Module
Core
Header
#include "Core/ConfigIni.h"
Namespace
Mowo

Properties

TypeNameDescription
std::vector<FConfigIniSection>SectionsSections in first-seen order; entries in written order.

Public functions

ReturnsNameDescription
boolCombineApplies text on top of what this file holds, with the array operators above.
boolCombineFile
std::stringWriteSections in order, keys in order, arrays as +Key= lines.
boolWriteFile
const FConfigIniSection*FindSection
FConfigIniSection&FindOrAddSection
boolGetString
voidToDocumentThe file as a Config document: section a.b becomes the Section chain a > b, so every existing dotted reader (rendering.graphics_api) reads an INI the way it read an MDF.
FConfigIniFileFromDocumentThe inverse, for Config::Save on an .ini path.
std::stringFormatValueOne value as an INI line spells it, and back — the typing ToDocument uses.
MDF::MdfValueParseValue
boolLooksLikeIniTrue when the text's first meaningful line is a [section] header.
std::stringReplaceArrayInTexttext with every key line of section replaced by values as +key= lines, and everything else — comments, blank lines, other keys and sections — left as written.

Function details

Combine

C++
bool Combine(const std::string& text, std::string* error = nullptr)

Applies text on top of what this file holds, with the array operators above. A plain Key= drops what lower layers gave the key once per combine, so repeated plain lines in one file still build a list.

CombineFile

C++
bool CombineFile(const std::filesystem::path& path, std::string* error = nullptr)

Write

C++
std::string Write() const

Sections in order, keys in order, arrays as +Key= lines. Keys before the first section header belong to the section named "".

WriteFile

C++
bool WriteFile(const std::filesystem::path& path) const

FindSection

C++
const FConfigIniSection* FindSection(const std::string& name) const

FindOrAddSection

C++
FConfigIniSection& FindOrAddSection(const std::string& name)

GetString

C++
bool GetString(const std::string& section, const std::string& key, std::string& out) const

ToDocument

C++
void ToDocument(MDF::MdfDocument& out) const

The file as a Config document: section a.b becomes the Section chain a > b, so every existing dotted reader (rendering.graphics_api) reads an INI the way it read an MDF. Values are typed by their spelling: True/False, integers, floats, (X=,Y=,Z=[,W=]) vectors; quoted text stays text; a list becomes an array.

FromDocument

C++
static FConfigIniFile FromDocument(const MDF::MdfDocument& doc)

The inverse, for Config::Save on an .ini path.

FormatValue

C++
static std::string FormatValue(const MDF::MdfValue& value, bool& quoted)

One value as an INI line spells it, and back — the typing ToDocument uses. quoted says the text must be written in quotes to read back as text (it would otherwise read as a number or a bool).

ParseValue

C++
static MDF::MdfValue ParseValue(const std::string& text, bool quoted)

LooksLikeIni

C++
static bool LooksLikeIni(const std::string& text)

True when the text's first meaningful line is a [section] header. A reader handed a path it did not resolve — a cook argument, a packaged legacy name — tells an INI from the MDF document it replaced this way.

ReplaceArrayInText

C++
static std::string ReplaceArrayInText(const std::string& text, const std::string& section, const std::string& key, const std::vector<std::string>& values)

text with every key line of section replaced by values as +key= lines, and everything else — comments, blank lines, other keys and sections — left as written. A file a machine rewrites but a person also edits keeps the person's lines; the section is appended when missing.

Generated from Core/ConfigIni.h via core.json · Nov 5, 2026Version 1.0.0