Skip to content

class flake::Property ​

A single typed, tagged property value. More...

#include <platform/flake/FlakeTypes.h>

Public Functions ​

Name
Property(Property && ) =default
Property &operator=(Property && ) =default
uint32_ttag() const
boolisMeta() const
voidsetNull()
voidsetError(tt_int8_t err)
PropValuedata() const
template <typename T >
void
setData(const T & data)
template <typename T >
std::optional< T >
value() const
Property(const uint32_t _tag)
Property()
Property(const Property & v)
voidmakeReadOnly() const
~Property()
voidreleaseOwned()
Free the array or blob payload this property owns and forget it.
voidsetDeallocSelf()
boolisDirty() const
voidmarkDirty()
voidmarkClean()
Property &operator=(const Property & other)
voidcopyFrom(const Property & other)
boolserializeTo(uint8_t * buf, uint16_t & offset, uint16_t bufSize, uint16_t * consumedBytes =nullptr) const
booldeserializeFrom(const uint8_t * buf, uint16_t & offset, uint16_t bufSize, uint16_t * consumedBytes =nullptr)
boolisErrorValue() const
uint16_tgetSerializedSize() const
char *toString() const

Friends ​

Name
booloperator==(const Property & lhs, const Property & rhs)
booloperator!=(const Property & lhs, const Property & rhs)

Detailed Description ​

cpp
class flake::Property;

A single typed, tagged property value.

A Property combines a 32-bit tag (encoding property ID, type code, and attribute flags) with an optional variant value. Properties are the atomic unit of the Flake data model: every object state change, every RPC parameter, and every bus notification is expressed as one or more Properties inside a PropArray.

Properties support binary serialization/deserialization for on-wire transport, deep-copy semantics for binary/array payloads, and null/error sentinel states.

Public Functions Documentation ​

function Property ​

cpp
Property(
    Property && 
) =default

function operator= ​

cpp
Property & operator=(
    Property && 
) =default

function tag ​

cpp
inline uint32_t tag() const

function isMeta ​

cpp
inline bool isMeta() const

function setNull ​

cpp
inline void setNull()

function setError ​

cpp
inline void setError(
    tt_int8_t err
)

function data ​

cpp
inline PropValue data() const

function setData ​

cpp
template <typename T >
inline void setData(
    const T & data
)

function value ​

cpp
template <typename T >
inline std::optional< T > value() const

function Property ​

cpp
inline explicit Property(
    const uint32_t _tag
)

function Property ​

cpp
inline Property()

function Property ​

cpp
inline Property(
    const Property & v
)

function makeReadOnly ​

cpp
inline void makeReadOnly() const

function ~Property ​

cpp
inline ~Property()

function releaseOwned ​

cpp
inline void releaseOwned()

Free the array or blob payload this property owns and forget it.

function setDeallocSelf ​

cpp
inline void setDeallocSelf()

function isDirty ​

cpp
inline bool isDirty() const

Status helpers for the merged property store. isDirty true means the value has been set locally but not yet acknowledged by the owning peer; cleared once a sync CONF lands or a changed indication brings the same value back.

function markDirty ​

cpp
inline void markDirty()

function markClean ​

cpp
inline void markClean()

function operator= ​

cpp
inline Property & operator=(
    const Property & other
)

function copyFrom ​

cpp
inline void copyFrom(
    const Property & other
)

< Memory allocation failed.

< Memory allocation failed.

function serializeTo ​

cpp
inline bool serializeTo(
    uint8_t * buf,
    uint16_t & offset,
    uint16_t bufSize,
    uint16_t * consumedBytes =nullptr
) const

function deserializeFrom ​

cpp
inline bool deserializeFrom(
    const uint8_t * buf,
    uint16_t & offset,
    uint16_t bufSize,
    uint16_t * consumedBytes =nullptr
)

function isErrorValue ​

cpp
inline bool isErrorValue() const

function getSerializedSize ​

cpp
inline uint16_t getSerializedSize() const

function toString ​

cpp
inline char * toString() const

Friends ​

friend operator== ​

cpp
friend bool operator==(
    const Property & lhs,

    const Property & rhs
);

friend operator!= ​

cpp
friend bool operator!=(
    const Property & lhs,

    const Property & rhs
);