libbio
Loading...
Searching...
No Matches
Functions
bio::physical::base_data Namespace Reference

Functions

bool IsNull (const Symmetry &symmetry)
 
bool IsBool (const Symmetry &symmetry)
 
bool IsSignedInt (const Symmetry &symmetry)
 
bool IsUnsignedInt (const Symmetry &symmetry)
 
bool IsFloat32 (const Symmetry &symmetry)
 
bool IsFloat64 (const Symmetry &symmetry)
 
bool IsText (const Symmetry &symmetry)
 
bool IsBytes (const Symmetry &symmetry)
 
bool IsSimple (const Symmetry &symmetry)
 
bool IsBaseDataScalar (const Symmetry &symmetry)
 
void SetNull (Symmetry &symmetry)
 
void SetBool (Symmetry &symmetry, bool value)
 
void SetSignedInt (Symmetry &symmetry, int64_t value)
 
void SetUnsignedInt (Symmetry &symmetry, uint64_t value)
 
void SetFloat32 (Symmetry &symmetry, float value)
 
void SetFloat64 (Symmetry &symmetry, double value)
 
void SetText (Symmetry &symmetry, const String &value)
 
void SetBytes (Symmetry &symmetry, const Bytes &value)
 
void SetSimple (Symmetry &symmetry, uint8_t value)
 
bool TryGetBool (const Symmetry &symmetry, bool &out)
 
bool TryGetSignedInt (const Symmetry &symmetry, int64_t &out)
 
bool TryGetUnsignedInt (const Symmetry &symmetry, uint64_t &out)
 
bool TryGetFloat32 (const Symmetry &symmetry, float &out)
 
bool TryGetFloat64 (const Symmetry &symmetry, double &out)
 
bool TryGetText (const Symmetry &symmetry, String &out)
 
bool TryGetBytes (const Symmetry &symmetry, Bytes &out)
 
bool TryGetSimple (const Symmetry &symmetry, uint8_t &out)
 
void SetBytes (Symmetry &symmetry, const ::bio::Bytes &value)
 
bool TryGetBytes (const Symmetry &symmetry, ::bio::Bytes &out)
 

Function Documentation

◆ IsBaseDataScalar()

bool bio::physical::base_data::IsBaseDataScalar ( const Symmetry symmetry)
Returns
true iff the SymmetryType is one of the canonical scalar base-data kinds.

◆ IsBool()

bool bio::physical::base_data::IsBool ( const Symmetry symmetry)

◆ IsBytes()

bool bio::physical::base_data::IsBytes ( const Symmetry symmetry)

◆ IsFloat32()

bool bio::physical::base_data::IsFloat32 ( const Symmetry symmetry)

◆ IsFloat64()

bool bio::physical::base_data::IsFloat64 ( const Symmetry symmetry)

◆ IsNull()

bool bio::physical::base_data::IsNull ( const Symmetry symmetry)

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).

◆ IsSignedInt()

bool bio::physical::base_data::IsSignedInt ( const Symmetry symmetry)

◆ IsSimple()

bool bio::physical::base_data::IsSimple ( const Symmetry symmetry)

◆ IsText()

bool bio::physical::base_data::IsText ( const Symmetry symmetry)

◆ IsUnsignedInt()

bool bio::physical::base_data::IsUnsignedInt ( const Symmetry symmetry)

◆ SetBool()

void bio::physical::base_data::SetBool ( Symmetry symmetry,
bool  value 
)

◆ SetBytes() [1/2]

void bio::physical::base_data::SetBytes ( Symmetry symmetry,
const ::bio::Bytes value 
)

◆ SetBytes() [2/2]

void bio::physical::base_data::SetBytes ( Symmetry symmetry,
const Bytes value 
)

◆ SetFloat32()

void bio::physical::base_data::SetFloat32 ( Symmetry symmetry,
float  value 
)

◆ SetFloat64()

void bio::physical::base_data::SetFloat64 ( Symmetry symmetry,
double  value 
)

◆ SetNull()

void bio::physical::base_data::SetNull ( Symmetry symmetry)

Set the symmetry to the canonical Null kind. Clears the ByteStream payload and sets the SymmetryType to Null.

◆ SetSignedInt()

void bio::physical::base_data::SetSignedInt ( Symmetry symmetry,
int64_t  value 
)

◆ SetSimple()

void bio::physical::base_data::SetSimple ( Symmetry symmetry,
uint8_t  value 
)

◆ SetText()

void bio::physical::base_data::SetText ( Symmetry symmetry,
const String value 
)

◆ SetUnsignedInt()

void bio::physical::base_data::SetUnsignedInt ( Symmetry symmetry,
uint64_t  value 
)

◆ TryGetBool()

bool bio::physical::base_data::TryGetBool ( const Symmetry symmetry,
bool out 
)

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.

◆ TryGetBytes() [1/2]

bool bio::physical::base_data::TryGetBytes ( const Symmetry symmetry,
::bio::Bytes out 
)

◆ TryGetBytes() [2/2]

bool bio::physical::base_data::TryGetBytes ( const Symmetry symmetry,
Bytes out 
)

◆ TryGetFloat32()

bool bio::physical::base_data::TryGetFloat32 ( const Symmetry symmetry,
float out 
)

◆ TryGetFloat64()

bool bio::physical::base_data::TryGetFloat64 ( const Symmetry symmetry,
double out 
)

◆ TryGetSignedInt()

bool bio::physical::base_data::TryGetSignedInt ( const Symmetry symmetry,
int64_t out 
)

◆ TryGetSimple()

bool bio::physical::base_data::TryGetSimple ( const Symmetry symmetry,
uint8_t out 
)

◆ TryGetText()

bool bio::physical::base_data::TryGetText ( const Symmetry symmetry,
String out 
)

◆ TryGetUnsignedInt()

bool bio::physical::base_data::TryGetUnsignedInt ( const Symmetry symmetry,
uint64_t out 
)