IniFile class
#include <Spore ModAPI/Spore/IO/IniFile.h>
A class that is used to read, parse, and write INI configuration files.
Stub, do not detour.
Public types
- enum Options { kOptionNone, kOptionLeaveFileOpen }
- using EnumCallback_t = bool(*)(wchar_t*, wchar_t*, void*)
Constructors, destructors, conversion operators
Public functions
- auto GetOption(Options option) const -> int virtual
- auto SetOption(Options option, int value) -> void virtual
-
auto GetPath() const -> wchar_
t const* virtual -
auto SetPath(const wchar_
t* pPath) -> bool virtual - auto GetStream() const -> IStream* virtual
- auto SetStream(IStream* pStream) -> bool virtual
- auto Close() -> bool virtual
-
auto ReadEntry(const wchar_
t* pSection, const wchar_ t* pKey, eastl::basic_string<wchar_ t>& sValue) -> int virtual -
auto ReadEntryToBuffer(const wchar_
t* pSection, const wchar_ t* pKey, wchar_ t* pValue, uint32_ t nValueLength) -> int virtual -
auto ReadEntryFormatted(const wchar_
t* pSection, const wchar_ t* pKey, const wchar_ t* pValueFormat, ...) -> int virtual -
auto WriteEntry(const wchar_
t* pSection, const wchar_ t* pKey, const wchar_ t* pValue) -> bool virtual -
auto WriteEntryFormatted(const wchar_
t* pSection, const wchar_ t* pKey, const wchar_ t* kValueFormat, ...) -> bool virtual -
auto ReadBinary(const wchar_
t* pSection, const wchar_ t* pKey, void* pData, uint32_ t nDataLength) -> int virtual -
auto WriteBinary(const wchar_
t* pSection, const wchar_ t* pKey, const void* pData, uint32_ t nDataLength) -> bool virtual -
auto EnumSections(EnumCallback_
t pCallback, void* pContext) -> int virtual -
auto EnumEntries(const wchar_
t* pSection, EnumCallback_ t pCallback, void* pContext) -> int virtual -
auto SectionExists(const wchar_
t* pSection) -> bool virtual
Protected functions
- auto Open(int nAccessFlags) -> bool virtual
- auto GetEncoding() -> int virtual
- auto LoadSectionNames(int nAccessFlags) -> bool virtual
- auto GetFileLine8To8(eastl::basic_string<char>& sLine) -> bool virtual
-
auto GetFileLine16To16(eastl::basic_string<wchar_
t>& sLine) -> bool virtual -
auto GetFileLine(eastl::basic_string<wchar_
t>& sLine) -> bool virtual -
auto ConvertAndWriteStream(const wchar_
t* pchar, uint32_ t count) -> bool virtual
Protected variables
-
wchar_
t mPath - FileStream mFileStream
- IStream* mpStream
- int mnEncodingSrc
- bool mbFileIsOpenForWriting
- bool mbLeaveFileOpenBetweenOperations
- bool mbReadEntryCacheReady
-
eastl::map<eastl::basic_string<wchar_
t>, long, eastl::less<eastl::basic_string<wchar_ t>>> mSectionPositionMap -
eastl::map<eastl::basic_string<wchar_
t>, eastl::basic_string<wchar_ t>, eastl::less<eastl::basic_string<wchar_ t>>> mSectionNameMap