|
parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
|
CRTP base that fills in the boilerplate of every cell-type descriptor. More...
#include <descriptor.h>


Public Member Functions | |
| BaseCellTypeDescriptor (DisplayInfo info) | |
| Construct with the given display info. | |
| std::string_view | kind () const override |
| Wire-stable kind identifier. | |
| DisplayInfo | display_info () const override |
| Display info for this cell type. | |
| std::type_index | storage_type () const override |
std::type_index of the cell's storage type. | |
| json_t | to_json () const override |
| Serialize the descriptor itself (kind + display info + category + extras). | |
Public Member Functions inherited from parcel::ICellTypeDescriptor | |
| virtual descriptor::CellCategory | category () const =0 |
| Coarse classification (primitive, list, struct, …). | |
| virtual cell_t | cell_from_json (const json_t &j, ParcelRegistry const ®) const =0 |
Construct a cell from JSON, dispatching to the concrete from_json. | |
Static Public Attributes | |
| static constexpr std::string_view | kind_id = T::kind_id |
Wire-stable kind id, lifted from T::kind_id. | |
Protected Member Functions | |
| json_t | base_to_json () const |
Common JSON skeleton (kind, display_info, category) reused by overrides. | |
Protected Attributes | |
| DisplayInfo | display_info_ |
| Stored display info. | |
CRTP base that fills in the boilerplate of every cell-type descriptor.
Concrete descriptors inherit BaseCellTypeDescriptor<T> and provide the category() plus, when relevant, cell_from_json and to_json overrides.
| T | A CellLike cell type whose descriptor this is. |
|
inlineexplicit |
Construct with the given display info.
| info | Display info. |
|
inlineprotected |
Common JSON skeleton (kind, display_info, category) reused by overrides.
to_json overrides extend.
|
inlineoverridevirtual |
Serialize the descriptor itself (kind + display info + category + extras).
Implements parcel::ICellTypeDescriptor.
Reimplemented in parcel::TypedListCellTypeDescriptor< T >, parcel::TypedMapCellTypeDescriptor< T >, parcel::StructCellTypeDescriptor< Derived, Payload >, and parcel::UnionCellTypeDescriptor< Ts >.