42 inputStream.exceptions(ios_base::failbit | ios_base::badbit);
57 if (key.empty() && value.empty() &&
state !=
Value) {
60 if (m_data.empty() || m_data.back().first !=
sectionName) {
63 m_data.back().second.insert(
make_pair(key, value));
145 }
catch (
const std::ios_base::failure &) {
161 outputStream.exceptions(ios_base::failbit | ios_base::badbit);
162 for (
const auto &
section : m_data) {
219 inputStream.exceptions(ios_base::failbit | ios_base::badbit);
236 if (key.empty() && value.empty() &&
state !=
Value) {
378 }
catch (
const std::ios_base::failure &) {
414 outputStream.exceptions(ios_base::failbit | ios_base::badbit);
416 if (!
section.precedingCommentBlock.empty()) {
421 if (!
section.followingInlineComment.empty()) {
427 if (!
field.precedingCommentBlock.empty()) {
437 if (!
field.followingInlineComment.empty()) {
void parse(std::istream &inputStream)
Parses all data from the specified inputStream.
void make(std::ostream &outputStream)
Write the current data to the specified outputStream.
Contains all utilities provides by the c++utilities library.
IntegralType stringToNumber(const StringType &string, BaseType base=10)
Converts the given string to an unsigned/signed number assuming string uses the specified base.
The AdvancedIniFile::Field class represents a field within an INI file.
The AdvancedIniFile::Section class represents a section within an INI file.
IniFileSectionFlags flags
std::string precedingCommentBlock
void make(std::ostream &outputStream, IniFileMakeOptions options=IniFileMakeOptions::None)
Write the current data to the specified outputStream.
void parse(std::istream &inputStream, IniFileParseOptions options=IniFileParseOptions::None)
Parses all data from the specified inputStream.