Skip to content

class flake::PropArray ​

Ordered, serializable collection of Property values. More...

#include <platform/flake/FlakeTypes.h>

Inherits from flake::Serializable

Public Types ​

Name
using std::size_tsize_type

Public Functions ​

Name
void *operator new(std::size_t sz)
voidoperator delete(void * p)
PropArray()
PropArray(const PropArray & other)
PropArray &operator=(const PropArray & other)
PropArray(PropArray && ) =deleted
PropArray &operator=(PropArray && ) =deleted
virtual~PropArray()
Property &at(size_type index)
const Property &at(size_type index) const
Property &operator[](size_type index)
const Property &operator[](size_type index) const
const Property &getAt(uint32_t index) const
size_typesize() const
size_typecount() const
boolempty() const
const Property &get(uint32_t tag) const
template <uint32_t PropTag>
PropType< PropTag >
get(PropType< PropTag > default_value =static_cast< PropType< PropTag > >(PropTypeFromTag<((PropTag) &0x7FFU)>::default_value))
boolhas(uint32_t tag) const
voidpush_back(const Property & p)
voidclear()
voideraseAt(uint32_t index)
Erase the property at index. Out-of-range is a no-op.
voidcopyFrom(const PropArray & other)
voidremove(const Property & val)
voidset(const Property & val)
voidsetDirty(const Property & val)
voidmarkCleanByTag(uint32_t tag)
boolisDirty(uint32_t tag) const
template <uint32_t PropTag,typename T >
void
set(const T & value)
virtual boolserialize(uint16_t * outLen, uint8_t ** outBuf) override
virtual booldeserialize(uint16_t len, uint8_t * buf) override
uint16_tgetSerializedSize() const
char *toString(size_t max_len) const

Additional inherited members ​

Public Functions inherited from flake::Serializable

Name
Serializable(const Serializable & ) =deleted

Protected Functions inherited from flake::Serializable

Name
Serializable() =default
~Serializable() =default
Serializable(Serializable && ) =default

Detailed Description ​

cpp
class flake::PropArray;

Ordered, serializable collection of Property values.

PropArray is the universal container for passing typed parameters across the Flake API – used for function arguments, property snapshots, indication payloads, and protocol messages.

Internally it derives from std::vector<[Property](/embed/2.2.0/API/Classes/classflake_1_1Property.md)> and adds tag-based lookup (get / set / has / remove), binary serialization, and a typed convenience accessor template.

Public Types Documentation ​

using size_type ​

cpp
using flake::PropArray::size_type =  std::size_t;

Public Functions Documentation ​

function operator new ​

cpp
static inline void * operator new(
    std::size_t sz
)

Route heap instances through the size-class byte pool so that any site using new``[PropArray()](/embed/2.2.0/API/Classes/classflake_1_1PropArray.md#function-proparray) / delete stays off the system heap. Stack-allocated PropArrays are unaffected. noexcept so a nullptr from an exhausted pool makes the new-expression yield nullptr (skipping the ctor) instead of running it on a null this — callers null-check the result.

function operator delete ​

cpp
static inline void operator delete(
    void * p
)

function PropArray ​

cpp
inline PropArray()

< Requested item does not exist.

function PropArray ​

cpp
inline PropArray(
    const PropArray & other
)

function operator= ​

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

function PropArray ​

cpp
PropArray(
    PropArray && 
) =deleted

function operator= ​

cpp
PropArray & operator=(
    PropArray && 
) =deleted

function ~PropArray ​

cpp
inline virtual ~PropArray()

function at ​

cpp
inline Property & at(
    size_type index
)

function at ​

cpp
inline const Property & at(
    size_type index
) const

function operator[] ​

cpp
inline Property & operator[](
    size_type index
)

function operator[] ​

cpp
inline const Property & operator[](
    size_type index
) const

function getAt ​

cpp
inline const Property & getAt(
    uint32_t index
) const

function size ​

cpp
inline size_type size() const

function count ​

cpp
inline size_type count() const

function empty ​

cpp
inline bool empty() const

function get ​

cpp
inline const Property & get(
    uint32_t tag
) const

function get ​

cpp
template <uint32_t PropTag>
inline PropType< PropTag > get(
    PropType< PropTag > default_value =static_cast< PropType< PropTag > >(PropTypeFromTag<((PropTag) &0x7FFU)>::default_value)
)

function has ​

cpp
inline bool has(
    uint32_t tag
) const

function push_back ​

cpp
inline void push_back(
    const Property & p
)

Append a property. Silently no-op on pool exhaustion; the public-API wrappers map that to E_NO_ALLOC.

function clear ​

cpp
inline void clear()

Release every slot this PropArray owns. The handle stays registered; the range becomes empty.

function eraseAt ​

cpp
inline void eraseAt(
    uint32_t index
)

Erase the property at index. Out-of-range is a no-op.

function copyFrom ​

cpp
inline void copyFrom(
    const PropArray & other
)

function remove ​

cpp
inline void remove(
    const Property & val
)

function set ​

cpp
inline void set(
    const Property & val
)

function setDirty ​

cpp
inline void setDirty(
    const Property & val
)

Like set but flips the destination slot's DIRTY flag on after the copy. Used by the merged property store to record a locally-issued change that still needs to be synced to the owning peer.

function markCleanByTag ​

cpp
inline void markCleanByTag(
    uint32_t tag
)

Clear the DIRTY flag on the slot identified by tag. No-op if the tag is not present.

function isDirty ​

cpp
inline bool isDirty(
    uint32_t tag
) const

Read-only DIRTY-status query by tag. Returns false if the tag is not present or the slot is clean.

function set ​

cpp
template <uint32_t PropTag,
typename T >
inline void set(
    const T & value
)

function serialize ​

cpp
inline virtual bool serialize(
    uint16_t * outLen,
    uint8_t ** outBuf
) override

Reimplements: flake::Serializable::serialize

function deserialize ​

cpp
inline virtual bool deserialize(
    uint16_t len,
    uint8_t * buf
) override

Reimplements: flake::Serializable::deserialize

function getSerializedSize ​

cpp
inline uint16_t getSerializedSize() const

function toString ​

cpp
inline char * toString(
    size_t max_len
) const