Appearance
class flake::PropArray
Ordered, serializable collection of Property values. More...
#include <platform/flake/FlakeTypes.h>
Inherits from flake::Serializable, std::vector< Property >
Public Functions
| Name | |
|---|---|
| PropArray(PropArray && ) =default | |
| PropArray & | operator=(PropArray && ) =default |
| virtual | ~PropArray() =default |
| PropArray() | |
| PropArray(constPropArray & va) | |
| PropArray & | operator=(constPropArray & other) |
| void | copyFrom(constPropArray & other) |
| constProperty & | getAt(uint32_t index) const |
| constProperty & | 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 | remove(constProperty & val) |
| void | set(constProperty & val) |
| template <uint32_t PropTag,typenameT > void | set(T value) |
| size_type | count() const Return the number of properties in this array. |
| 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(constSerializable & ) =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/v2/API/Classes/classflake_1_1_property.md)> and adds tag-based lookup (get / set / has / remove), binary serialization, and a typed convenience accessor template.
Public Functions Documentation
function PropArray
cpp
PropArray(
PropArray &&
) =defaultfunction operator=
cpp
PropArray & operator=(
PropArray &&
) =defaultfunction ~PropArray
cpp
virtual ~PropArray() =defaultfunction PropArray
cpp
inline PropArray()< Requested item does not exist.
function PropArray
cpp
inline PropArray(
constPropArray & va
)function operator=
cpp
inline PropArray & operator=(
constPropArray & other
)function copyFrom
cpp
inline void copyFrom(
constPropArray & other
)function getAt
cpp
inline constProperty & getAt(
uint32_t index
) constfunction get
cpp
inline constProperty & 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 remove
cpp
inline void remove(
constProperty & val
)function set
cpp
inline void set(
constProperty & val
)function set
cpp
template <uint32_t PropTag,
typenameT >
inline void set(
T value
)function count
cpp
inline size_type count() constReturn the number of properties in this array.
Return: Property count (same as std::vector::size()).
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