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 <typenameT >
void
setData(T data)
template <typenameT >
std::optional< T >
value() const
Property(constuint32_t _tag)
Property()
Property(constProperty & v)
voidmakeReadOnly() const
~Property()
voidsetDeallocSelf()
Property &operator=(constProperty & other)
voidcopyFrom(constProperty & other)
boolserializeTo(uint8_t * buf, uint16_t & offset, uint16_t bufSize, uint16_t * consumedBytes =nullptr) const
booldeserializeFrom(constuint8_t * buf, uint16_t & offset, uint16_t bufSize, uint16_t * consumedBytes =nullptr)
boolisErrorValue() const
uint16_tgetSerializedSize() const
char *toString() const

Friends

Name
booloperator==(constProperty & lhs, constProperty & rhs)
booloperator!=(constProperty & lhs, constProperty & 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 <typenameT >
inline void setData(
    T data
)

function value

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

function Property

cpp
inline explicit Property(
    constuint32_t _tag
)

function Property

cpp
inline Property()

function Property

cpp
inline Property(
    constProperty & v
)

function makeReadOnly

cpp
inline void makeReadOnly() const

function ~Property

cpp
inline ~Property()

function setDeallocSelf

cpp
inline void setDeallocSelf()

function operator=

cpp
inline Property & operator=(
    constProperty & other
)

function copyFrom

cpp
inline void copyFrom(
    constProperty & other
)

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(
    constuint8_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==(
    constProperty & lhs,

    constProperty & rhs
);

friend operator!=

cpp
friend bool operator!=(
    constProperty & lhs,

    constProperty & rhs
);