nw::Ini

struct Ini

Ini file format parser.

Lookup is by “<section>/<key>”

Note

This is read only currently.

Public Functions

Ini() = default
explicit Ini(const std::filesystem::path &filename)
explicit Ini(ResourceData data)
template<typename T>
std::optional<T> get(String key) const

Gets a value.

Template Parameters:

Tint32_t, float, or String

Parameters:

key

Returns:

std::optional<T>

bool get_to(String key, String &out) const

Gets string value.

template<typename T>
bool get_to(String key, T &out) const

Gets numeric value.

bool valid() const noexcept

Deterimes if Ini file was successfully parsed.