Encapsulates serialized data for activity elements. More...
#include <kanzi/ui/node/concept/activity/activity_element_history.hpp>
Classes | |
struct | SerializedActivityProperty |
Encapsulates the serialized data for a property. More... | |
Public Types | |
typedef vector< SerializedActivityProperty > | SerializedActivityPropertyContainer |
Container of serialized of properties. More... | |
Public Member Functions | |
ActivityElementHistory (string activityElementHistoryData) | |
Constructor. More... | |
ActivityElementHistory (Node &node, const vector< string > &childrenHistory) | |
Constructor. More... | |
ActivityElementHistory (string_view name, const SerializedActivityPropertyContainer &properties, const vector< string > &childrenHistory) | |
Constructor. More... | |
string | serialize () const |
Serializes the history to a byte buffer. More... | |
activityName The name of an Activity node. | |||
Returns whether a property belongs to an Activity node, or not. A property belongs to an Activity node if:
| |||
static constexpr const char * | s_activityPropertyNamespace | ||
The namespace to which an Activity Property must belong. More... | |||
const SerializedActivityPropertyContainer & | getProperties () const | ||
Accesses the serialized properties. More... | |||
const vector< string > & | getChildrenHistory () const | ||
Accesses the serialized children. More... | |||
const string & | getName () const | ||
Accesses the name of the element. More... | |||
static bool | isActivityProperty (AbstractPropertyType property, string_view activityName) | ||
static vector< SerializedActivityProperty > | getSerializedProperties (Node &node) | ||
Returns the properties and property values that an Activity serialized. More... | |||
static string | serializeActivityProperty (AbstractPropertyType property, string_view value) | ||
Serializes a single Activity property to a string. More... | |||
static void | deserializeActivityProperty (Node &node, const SerializedActivityProperty &property) | ||
Deserializes an activity property. More... | |||
static optional< string > | findPropertyValue (string_view propertyName, string_view serializedActivityElement) | ||
Returns a value for a property in the serialized history of an ActivityElement. More... | |||
static bool | extractVariantFromSerializedPropertyString (string_view value, PropertyDataType dataType, Variant &variant) | ||
Extracts property data from a serialized string into a Variant type. More... | |||
static bool | isPropertySkippedForUpdate (string_view name) | ||
Checks if property given with name does not trigger the update of Activity Browser Properties. More... | |||
Encapsulates serialized data for activity elements.
This is a helper class for activities and activity hosts.
typedef vector<SerializedActivityProperty> kanzi::ActivityElementHistory::SerializedActivityPropertyContainer |
Container of serialized of properties.
|
explicit |
Constructor.
Constructs the history of a node and its child nodes from serialized data.
activityElementHistoryData | Serialized data. |
|
explicit |
Constructor.
Constructs the history for a node and uses serialized data for its children.
node | The node to extract history from. |
childrenHistory | The serialized history of the activity element's children. |
|
explicit |
Constructor.
Constructs the history from a nodes name, its properties and serialized history of its children.
name | The name of the activity element. |
properties | The properties of the activity element. |
childrenHistory | The serialized history of the activity element's children. |
string kanzi::ActivityElementHistory::serialize | ( | ) | const |
Serializes the history to a byte buffer.
|
static |
|
static |
Returns the properties and property values that an Activity serialized.
node | The activity node to serialize. |
|
static |
Serializes a single Activity property to a string.
This serialized string is included in the serialized history of the ActivityElement.
property | The property to serialize. |
value | The value of property to serialize. |
|
static |
Deserializes an activity property.
node | The activity node. |
property | The serialized property. |
const SerializedActivityPropertyContainer& kanzi::ActivityElementHistory::getProperties | ( | ) | const |
Accesses the serialized properties.
const vector<string>& kanzi::ActivityElementHistory::getChildrenHistory | ( | ) | const |
Accesses the serialized children.
const string& kanzi::ActivityElementHistory::getName | ( | ) | const |
Accesses the name of the element.
|
static |
Returns a value for a property in the serialized history of an ActivityElement.
propertyName | The name of the property for which you requested the value. |
serializedActivityElement | String representation of a serialized ActivityElement. |
|
static |
Extracts property data from a serialized string into a Variant type.
value | The serialized property data string. |
dataType | The data type of the property to extract. |
variant | A reference to the extracted Variant. |
|
static |
Checks if property given with name does not trigger the update of Activity Browser Properties.
name | The property name to check. |
|
static |
The namespace to which an Activity Property must belong.