ActivityHistoryManager encapsulates functionality of serialization of activities.
More...
#include <kanzi/ui/node/concept/activity/activity_history_manager.hpp>
ActivityHistoryManager encapsulates functionality of serialization of activities.
kanzi::ActivityHistoryManager::ActivityHistoryManager |
( |
ActivityElement & |
activityElement | ) |
|
|
explicit |
bool kanzi::ActivityHistoryManager::hasHistory |
( |
string_view |
activityPath | ) |
const |
Returns whether a child ActivityElement or one of its parent nodes has history data stored in the internal buffer.
- Parameters
-
activityPath | Relative path to the ActivityElement whose history you want to check. |
- Returns
- If the ActivityElement at the given path has history, true, otherwise false.
string kanzi::ActivityHistoryManager::serialize |
( |
| ) |
const |
Serializes the activity element to a byte buffer.
- Returns
- The byte buffer containing the serialized data.
void kanzi::ActivityHistoryManager::deserialize |
( |
string_view |
data | ) |
|
Deserializes the activity element from a byte buffer.
- Parameters
-
data | The byte buffer containing the serialized data. |
void kanzi::ActivityHistoryManager::serialize |
( |
ActivityElement & |
activityElement | ) |
|
Serializes a child activity element to the internal byte buffer.
- Parameters
-
activityElement | The activity element to serialize. |
void kanzi::ActivityHistoryManager::deserialize |
( |
ActivityElement & |
activityElement | ) |
|
Deserializes a child activity element from the internal byte buffer.
- Parameters
-
activityElement | The activity element to deserialize. |
void kanzi::ActivityHistoryManager::invalidate |
( |
string_view |
activityPath | ) |
|
Invalidates the history for an ActivityElement with the given relative path.
- Parameters
-
activityPath | The relative path of the ActivityElement for which to invalidate the history. |
- Since
- Kanzi 3.9.3
void kanzi::ActivityHistoryManager::invalidateProperties |
( |
string_view |
activityPath, |
|
|
const vector< AbstractPropertyType > & |
invalidProperties |
|
) |
| |
Invalidates the serialized property values for an ActivityElement with the given relative path.
- Parameters
-
activityPath | The relative path of the ActivityElement for which to invalidate the properties. |
invalidProperties | The list of property types to invalidate. |
- Since
- Kanzi 3.9.3
void kanzi::ActivityHistoryManager::excludePropertyFromDeserialization |
( |
string_view |
name | ) |
|
Excludes a property type from the list of properties that Kanzi can deserialize, when Kanzi initializes an Activity node.
- Parameters
-
name | The name of a property to exclude from deserialization. |
- Since
- Kanzi 3.9.0
void kanzi::ActivityHistoryManager::removePropertyFromDeserializationExclusion |
( |
string_view |
name | ) |
|
Removes a property from the list of properties that Kanzi does not deserialize.
This way you enable Kanzi to deserialize a property type when Kanzi initializes an Activity node.
- Parameters
-
name | The name of the property to remove from the list of properties that Kanzi does not deserialize. |
- Since
- Kanzi 3.9.0
vector<string>::const_iterator kanzi::ActivityHistoryManager::beginSerializedChildren |
( |
| ) |
const |
Returns the begin iterator to the internal storage of serialized child items.
/return The begin iterator to the internal storage of serialized child items.
- Since
- Kanzi 3.9.0
vector<string>::const_iterator kanzi::ActivityHistoryManager::endSerializedChildren |
( |
| ) |
const |
Returns the end iterator to the internal storage of serialized child items.
/return The end iterator to the internal storage of serialized child items.
- Since
- Kanzi 3.9.0
template<typename DataType >
optional<DataType> kanzi::ActivityHistoryManager::getPropertyFromHistory |
( |
AbstractPropertyType |
property, |
|
|
string_view |
serializedActivityElement |
|
) |
| const |
Returns the value of property type stored in the history.
- Parameters
-
property | The name of the property type to find in the serialized ActivityElement whose value you want to get. |
serializedActivityElement | The serialized ActivityElement where to look for the property type. |
- Returns
- Returns the property type value found in the serialized ActivityElement. If the property type is not serialized, returns nullopt.
- Since
- Kanzi 3.9.0
The documentation for this class was generated from the following file: