parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
Loading...
Searching...
No Matches
parcel::SimpleCellTypeDescriptor< T > Class Template Referencefinal

Plain descriptor for cells in the Primitive category. More...

#include <descriptor.h>

Inheritance diagram for parcel::SimpleCellTypeDescriptor< T >:
Collaboration diagram for parcel::SimpleCellTypeDescriptor< T >:

Public Member Functions

 SimpleCellTypeDescriptor (DisplayInfo info)
 Construct with the given display info.
 
descriptor::CellCategory category () const override
 Coarse classification (primitive, list, struct, …).
 
cell_t cell_from_json (const json_t &j, const ParcelRegistry &reg) const override
 Construct a cell from JSON, dispatching to the concrete from_json.
 
- Public Member Functions inherited from parcel::BaseCellTypeDescriptor< T >
 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).
 

Additional Inherited Members

- Static Public Attributes inherited from parcel::BaseCellTypeDescriptor< T >
static constexpr std::string_view kind_id = T::kind_id
 Wire-stable kind id, lifted from T::kind_id.
 
- Protected Member Functions inherited from parcel::BaseCellTypeDescriptor< T >
json_t base_to_json () const
 Common JSON skeleton (kind, display_info, category) reused by overrides.
 
- Protected Attributes inherited from parcel::BaseCellTypeDescriptor< T >
DisplayInfo display_info_
 Stored display info.
 

Detailed Description

template<CellLike T>
class parcel::SimpleCellTypeDescriptor< T >

Plain descriptor for cells in the Primitive category.

Used by PrimitiveCell<T>, ListCell, and MapCell — anywhere there is nothing more to expose beyond the base shape.

Template Parameters
TA CellLike cell type.

Constructor & Destructor Documentation

◆ SimpleCellTypeDescriptor()

template<CellLike T>
parcel::SimpleCellTypeDescriptor< T >::SimpleCellTypeDescriptor ( DisplayInfo  info)
inlineexplicit

Construct with the given display info.

Parameters
infoDisplay info.

Member Function Documentation

◆ cell_from_json()

template<CellLike T>
cell_t parcel::SimpleCellTypeDescriptor< T >::cell_from_json ( const json_t j,
const ParcelRegistry reg 
) const
inlineoverridevirtual

Construct a cell from JSON, dispatching to the concrete from_json.

Parameters
jJSON object to deserialize.
regRegistry used to resolve nested polymorphic cells.
Returns
Newly built cell handle.
Exceptions
std::runtime_erroron shape or kind mismatch.

Implements parcel::ICellTypeDescriptor.


The documentation for this class was generated from the following file: