parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
Loading...
Searching...
No Matches
parcel::HashMapCellTypeDescriptor Class Referencefinal

Descriptor for the heterogeneous HashMapCell. More...

#include <unordered_map.h>

Inheritance diagram for parcel::HashMapCellTypeDescriptor:
Collaboration diagram for parcel::HashMapCellTypeDescriptor:

Public Member Functions

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< HashMapCell >
 BaseCellTypeDescriptor (DisplayInfo info)
 Construct with the given display info.
 

Additional Inherited Members

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

Detailed Description

Descriptor for the heterogeneous HashMapCell.

Reports CellCategory::Map (the wire shape is the same as MapCell, just hash-backed in memory).

Member Function Documentation

◆ cell_from_json()

cell_t parcel::HashMapCellTypeDescriptor::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: