Appearance
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_t | size_type |
Public Functions
| Name | |
|---|---|
| void * | operator new(std::size_t sz) |
| void | operator 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_type | size() const |
| size_type | count() const |
| bool | empty() 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)) |
| bool | has(uint32_t tag) const |
| void | push_back(const Property & p) |
| void | clear() |
| void | eraseAt(uint32_t index) Erase the property at index. Out-of-range is a no-op. |
| void | copyFrom(const PropArray & other) |
| void | remove(const Property & val) |
| void | set(const Property & val) |
| void | setDirty(const Property & val) |
| void | markCleanByTag(uint32_t tag) |
| bool | isDirty(uint32_t tag) const |
| template <uint32_t PropTag,typename T > void | set(const T & value) |
| virtual bool | serialize(uint16_t * outLen, uint8_t ** outBuf) override |
| virtual bool | deserialize(uint16_t len, uint8_t * buf) override |
| uint16_t | getSerializedSize() 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 &&
) =deletedfunction operator=
cpp
PropArray & operator=(
PropArray &&
) =deletedfunction ~PropArray
cpp
inline virtual ~PropArray()function at
cpp
inline Property & at(
size_type index
)function at
cpp
inline const Property & at(
size_type index
) constfunction operator[]
cpp
inline Property & operator[](
size_type index
)function operator[]
cpp
inline const Property & operator[](
size_type index
) constfunction getAt
cpp
inline const Property & getAt(
uint32_t index
) constfunction size
cpp
inline size_type size() constfunction count
cpp
inline size_type count() constfunction empty
cpp
inline bool empty() constfunction get
cpp
inline const Property & get(
uint32_t tag
) constfunction 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
) constfunction 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
) constRead-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
) overrideReimplements: flake::Serializable::serialize
function deserialize
cpp
inline virtual bool deserialize(
uint16_t len,
uint8_t * buf
) overrideReimplements: flake::Serializable::deserialize
function getSerializedSize
cpp
inline uint16_t getSerializedSize() constfunction toString
cpp
inline char * toString(
size_t max_len
) const