|
metadata 0.2.0
Modern C++23 header-only metadata container (JSON-like)
|
Optional cpp-parcel adapter. More...
#include <commons/color.hpp>#include <commons/icons.hpp>#include <md/json.hpp>#include <md/object.hpp>#include <md/ostream.hpp>#include <md/value.hpp>#include <memory>#include <sstream>#include <string>#include <string_view>#include <parcel/parcel.h>
Go to the source code of this file.
Classes | |
| class | md::ValueCell |
Parcel cell wrapping an md::Value. More... | |
| class | md::ObjectCell |
Parcel cell wrapping an md::Object (a.k.a. More... | |
| class | md::ArrayCell |
Parcel cell wrapping an md::Array (std::vector<md::Value>). More... | |
Functions | |
| void | md::register_cells (parcel::ParcelRegistry ®istry) |
Register all three md cells (md:v, md:o, md:a) on registry. | |
Optional cpp-parcel adapter.
Wraps md::Value, md::Object, and md::Array as primitive-style parcel::BaseCell types so they round-trip through a parcel::ParcelRegistry like any other cell.
Wire kinds:
md:v — md::ValueCell (storage: md::Value)md:o — md::ObjectCell (storage: md::Object)md:a — md::ArrayCell (storage: md::Array)This header is auto-included from <md/metadata.hpp> when <parcel/parcel.h> is on the include path. Including it directly when cpp-parcel (or the nlohmann/json adapter it builds on) is unavailable will fail at the #include line below — match the <md/json.hpp> gating style.
|
inline |
Register all three md cells (md:v, md:o, md:a) on registry.
Equivalent to three separate register_kind(...) calls — the one-liner every consumer otherwise has to repeat. Re-registering a kind on an existing registry is a parcel-level error, so call this exactly once per registry.