|
cppfig 0.1.0
Modern C++20 compile-time type-safe configuration library
|
Flat key-value .conf serializer — the default, zero-dependency serializer.
More...
#include <conf.h>
Public Types | |
| using | data_type = Value |
Static Public Member Functions | |
| static auto | Parse (std::istream &is) -> StatusOr< Value > |
Parses a .conf stream into a Value tree. | |
| static auto | ParseString (std::string_view str) -> StatusOr< Value > |
Parses a .conf string into a Value tree. | |
| static auto | Stringify (const Value &data) -> std::string |
Converts a Value tree to flat key = value lines. | |
Flat key-value .conf serializer — the default, zero-dependency serializer.
File format:
Keys are the full dot-separated setting paths. There are no sections or grouping — each line is simply path = value.
Type inference during parsing:
true/false/yes/no/on/off → bool-) → int64"...") → string (quotes stripped)Parses a .conf stream into a Value tree.
|
inlinestatic |
Parses a .conf string into a Value tree.
|
inlinestatic |
Converts a Value tree to flat key = value lines.