|
libbio
|
#include <CborAxis.h>


Public Member Functions | |
| CborAxis () | |
| virtual | ~CborAxis () |
| virtual Pointer< Symmetry > | Rotate (std::string encoded) const |
| virtual ::std::string | Rotate (Pointer< const Symmetry > symmetry) const |
| virtual Pointer< Symmetry > | Rotate (std::string) const |
Public Member Functions inherited from bio::physical::Axis | |
| Axis () | |
| virtual | ~Axis () |
| virtual ::std::string | Rotate (Pointer< const Symmetry > symmetry) const |
| virtual ::std::string | operator| (Pointer< Wave > particle) const |
| virtual Pointer< Symmetry > | operator() (std::string encoded) const |
Protected Member Functions | |
| virtual ::std::string | Encode (Pointer< const Symmetry > symmetry) const |
Protected Member Functions inherited from bio::physical::Axis | |
| virtual ::std::string | Encode (Pointer< const Symmetry > symmetry) const |
Additional Inherited Members | |
Static Public Member Functions inherited from bio::physical::Axis | |
| ::std::string | Failed () |
Raw CBOR Axis which maps canonical Symmetry kinds directly to RFC 8949 CBOR.
Kind mapping:
Null -> 0xf6
Bool -> 0xf4 / 0xf5
SignedInt -> major 0 if >= 0, major 1 if < 0
UnsignedInt -> major 0
Float32 -> shortest-form float (half 0xf9, else 0xfa)
Float64 -> shortest-form float (half 0xf9, else 0xfa, else 0xfb)
Text -> major 3
Bytes -> major 2
Simple -> major 7 simple value
Array -> major 4
Map -> major 5 (MapEntry children flattened to k,v pairs in insertion order)
Tag -> major 6 + wrapped value child
Integer lengths are encoded length-minimally. Floats are emitted in the shortest CBOR form that losslessly preserves the stored value, per RFC 8949 §4.2.2 — Float64 narrows to Float32 and then to half-precision when the round-trip is exact, and NaNs collapse to canonical half 0xf9 0x7e 0x00. On decode, half-precision values are materialised into a Float32 Symmetry slot. Map entries are emitted in bytewise lexicographic order of their deterministically-encoded keys, per RFC 8949 §4.2.1, so the wire output is spec-compliant deterministic CBOR regardless of the insertion order of the source Map's children.
The returned std::string is used as an opaque byte container and may contain embedded NUL bytes. Callers should use .size() rather than strlen().
| bio::physical::CborAxis::CborAxis | ( | ) |
|
virtual |
Decode CBOR bytes into a Symmetry.
| encoded | CBOR bytes. |
Reimplemented from bio::physical::Axis.
Express the given text into something intelligible by this system.
Reimplemented from bio::physical::Axis.