XDGKit v1.0.0-1
C++ XDG Utilities
|
A parsed INI file using string view based maps. More...
#include <XDGINI.h>
Public Member Functions | |
XDGINIView & | operator= (XDGINIView &&other) noexcept |
Move operator. | |
void | clear () noexcept |
Clears the map values and backing storage if any. | |
const void * | map () const noexcept |
Pointer to the temporary file map. | |
uint64_t | mapSize () const noexcept |
Size in bytes of the temporary file map. | |
Static Public Member Functions | |
static std::shared_ptr< XDGINIView > | LoadFile (const std::filesystem::path &iniFile) noexcept |
Loads and parses an INI file. | |
static std::shared_ptr< XDGINIView > | FromData (char *data, size_t size) noexcept |
Creates an XDGINIView instance from serialized data. | |
A parsed INI file using string view based maps.
The content is organized in nested unordered maps. The top-level map represents the sections, while the nested maps hold the key-value pairs within each section.
Unlike XDGINI, this class provides a memory view of data stored in a serialized format.
|
staticnoexcept |
Loads and parses an INI file.
The strings are stored in a mapped temporary file.
iniFile | The path to the INI file to be loaded and parsed. |
|
staticnoexcept |
Creates an XDGINIView instance from serialized data.
The data must remain immutable throughout the lifetime of the object as no copy is made.
Used internally for loading serialized index.theme
maps from the cache.
data | Pointer to serialized data. |
size | Size of the data buffer (used for validation). |
|
inlinenoexcept |
Move operator.
|
noexcept |
Clears the map values and backing storage if any.
|
inlinenoexcept |
Pointer to the temporary file map.
nullptr
if there is no backing storage.
|
inlinenoexcept |
Size in bytes of the temporary file map.