|
libbio
|
Canonical scalar base-data helpers for physical::Symmetry.
These helpers enforce the canonical scalar storage contract: each SetX sets both the SymmetryType AND the ByteStream payload using the exact storage type required by the canonical contract, so that a downstream axis can rely on the type without having to guess from the ByteStream alone.
The getters return true iff the SymmetryType matches the canonical kind AND the ByteStream payload is present in the expected storage type.
These are free functions (not methods on Symmetry) so that the set of canonical kinds can grow without adding N virtual methods to the physical base class, and so that the scalar contract stays separate from the structural contract (which lives in chemical::base_data).
| void bio::physical::base_data::SetBytes | ( | Symmetry & | symmetry, |
| const ::bio::Bytes & | value | ||
| ) |
Set the symmetry to the canonical Null kind. Clears the ByteStream payload and sets the SymmetryType to Null.
Try to read the canonical payload. Each returns true iff the symmetry both has the matching SymmetryType AND the ByteStream holds the exact storage type required by the contract. On false, the out parameter is untouched.
| bool bio::physical::base_data::TryGetBytes | ( | const Symmetry & | symmetry, |
| ::bio::Bytes & | out | ||
| ) |