|
parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
|
Parcel cell adapters for the aurimasniekis/cpp-commons vocabulary types.
More...
#include <parcel/cell.h>#include <parcel/defaults.h>#include <parcel/descriptor.h>#include <parcel/json.h>#include <commons/color.hpp>#include <commons/display_info.hpp>#include <commons/flag.hpp>#include <commons/icon.hpp>#include <commons/json.hpp>#include <commons/origin.hpp>#include <commons/semver.hpp>#include <commons/version_constraint.hpp>#include <compare>#include <memory>#include <optional>#include <string>#include <string_view>

Go to the source code of this file.
Classes | |
| class | parcel::ColorCell |
Cell wrapping comms::Color. More... | |
| class | parcel::IconCell |
Cell wrapping comms::Icon. More... | |
| class | parcel::DisplayInfoCell |
Cell wrapping comms::DisplayInfo. More... | |
| class | parcel::FlagCell |
Cell wrapping comms::FlagRef. More... | |
| class | parcel::FlagSetCell |
Cell wrapping comms::FlagSet. More... | |
| class | parcel::SemVerCell |
Cell wrapping comms::SemVer. More... | |
| class | parcel::VersionConstraintCell |
Cell wrapping comms::VersionConstraint. More... | |
| class | parcel::OriginCell |
Cell wrapping comms::OriginPtr (a std::unique_ptr<comms::IOrigin>). More... | |
Parcel cell adapters for the aurimasniekis/cpp-commons vocabulary types.
Carries commons' Color, Icon, DisplayInfo, flag, and versioning / provenance types on the wire:
ColorCell — comms::Color → "color" (hex string).IconCell — comms::Icon → "icon" ("set:name" string).DisplayInfoCell — comms::DisplayInfo → "display_info" (JSON object).FlagCell — comms::FlagRef → "flag" (flag name string).FlagSetCell — comms::FlagSet → "flag_set" (array of names).SemVerCell — comms::SemVer → "semver" (version string).VersionConstraintCell — comms::VersionConstraint → "version_constraint" (range string).OriginCell — comms::OriginPtr → "origin" ({"kind",…} object).Each cell reuses commons' ADL to_json / from_json (from commons/json.hpp, auto-enabled because nlohmann/json is on the include path), so the inherited BaseCell::to_json / cell_from_json just work — only to_string, kind_id, from_json, and descriptor() are defined here, following the ext/filesystem.h PathCell pattern.
Decoding a FlagCell / FlagSetCell resolves each flag name against comms::GlobalFlagRegistry; an unregistered name throws (commons behavior).