|
metadata 0.2.0
Modern C++23 header-only metadata container (JSON-like)
|
Parcel cell wrapping an md::Array (std::vector<md::Value>).
More...
#include <parcel.hpp>
Inherits parcel::BaseCell< ArrayCell, Array >.
Public Member Functions | |
| template<class T0 , class T1 , class... Rest> requires (std::constructible_from<Value, T0 &&> && std::constructible_from<Value, T1 &&> && (std::constructible_from<Value, Rest &&> && ...)) | |
| ArrayCell (T0 &&a, T1 &&b, Rest &&... rest) | |
Brace-init passthrough so md::ArrayCell{"a", "b", "c"} mirrors md::Array{...}. | |
| std::string | to_string () const override |
Compact textual rendering of the wrapped md::Array, identical to streaming via operator<<. | |
Static Public Member Functions | |
| static parcel::cell_t | from_json (parcel::json_t const &j, parcel::ParcelRegistry const &) |
| Parcel deserialization entry point. | |
| static parcel::cell_type_descriptor_t | descriptor () |
Registry descriptor for ArrayCell. | |
Static Public Attributes | |
| static constexpr std::string_view | kind_id = "md:a" |
Wire-stable kind id reported under the "k" slot. | |
Parcel cell wrapping an md::Array (std::vector<md::Value>).
Wire kind: md:a. The "v" slot is a JSON array whose elements are serialized through the md::Value JSON adapter.
|
inline |
Brace-init passthrough so md::ArrayCell{"a", "b", "c"} mirrors md::Array{...}.
Constrained to ≥2 elements so that ArrayCell{some_array} continues to forward to BaseCell — Array → Value is implicit, so a 1-element overload would silently wrap the array as a single-element array.
|
inlinestatic |
Parcel deserialization entry point.
Validates "k" == "md:a" and decodes "v" as an md::Array via the <md/json.hpp> ADL hooks.
| parcel::ParcelException | on shape or kind mismatch. |