215 std::pair<Section*, Entry*>,
257 if( section.Name.IsNotEmpty() && section.Comments.IsNull() )
259 "Hint: New section \"{}\", which was programmatically added to\n"
260 " INI-file \"{}\", has no comments.",
321 if( section ==
nullptr )
constexpr bool IsEmpty() const
std::size_t HashcodeIgnoreCase() const
bool Equals(const TString< TChar > &rhs) const
ALIB_DLL void Reset()
Clears all data, resets the internal mono allocator.
ALIB_DLL Entry * DeleteEntry(Section *section, const String &name)
ALIB_DLL Section * CreateSection(const String &name)
ALIB_DLL void Write(const system::PathString &path=system::NULL_PATH)
ALIB_DLL Entry * CreateEntry(Section *section, const String &name)
ALIB_DLL void AddComments(String &dest, const String &comments, const String &prefix=A_CHAR("# "))
system::PathString FileName
The file name.
bool startsWithCommentSymbol(String &subs)
HashMap< MonoAllocator, EntryKey, std::pair< Section *, Entry * >, EntryKey::Hash, EntryKey::EqualTo > entryTable
List< MonoAllocator, integer > LinesWithReadErrors
ALIB_DLL std::pair< Section *, bool > SearchOrCreateSection(const String §ionName)
List< MonoAllocator, Section > Sections
The list of sections.
ALIB_DLL std::pair< Section *, Entry * > SearchEntry(const String §ion, const String &name)
ALIB_DLL integer Read(const system::CPathString &path)
Entry * DeleteEntry(const String §ionName, const String &name)
ALIB_DLL IniFile()
Default constructor.
ALIB_DLL Section * DeleteSection(const String &name)
MonoAllocator Allocator
A monotonic allocator used for allocating sections and entries.
ALIB_DLL Section * SearchSection(const String §ionName)
IniFile(const system::Path &path)
String FileComments
The file header which will be written out as a comment lines with "# " prefixes.
#define ALIB_WARNING(domain,...)
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
strings::TCString< PathCharType > CPathString
The string-type used with this ALib Module.
strings::TString< PathCharType > PathString
The string-type used with this ALib Module.
constexpr PathString NULL_PATH
A nulled path string.
@ ErrorWritingFile
An error occurred writing the file .
@ ErrorOpeningFile
File not found when reading.
constexpr String NULL_STRING
A nulled string of the default character type.
lang::integer integer
Type alias in namespace alib.
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< character > String
Type alias in namespace alib.
containers::List< TAllocator, T, TRecycling > List
Type alias in namespace alib.
Equality functor for nodes hashed in field entryTable.
bool operator()(const EntryKey &lhs, const EntryKey &rhs) const
Hash functor for nodes hashed in field entryTable.
std::size_t operator()(const EntryKey &key) const
EntryKey(const String §ionName, const String &entryName)
const String & EntryName
The name of the entry.
const String & SectionName
The name of the section.
String NewValue
If this value is set, RawValue will ignored on writing.
String Name
The entry's name.
String Comments
The entry's comments.
bool WriteBack
If given, a write back indicator was found for this entry.
String Comments
The comment lines of the section.
Section(MonoAllocator &monoAllocator)
bool WriteBack
If given, a write back indicator was found for this entry.
List< MonoAllocator, Entry, Recycling::None > Entries
The list of variables of the section.
String Name
The name of the section.