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.
◆ ActivityHistoryManager()
kanzi::ActivityHistoryManager::ActivityHistoryManager |
( |
ActivityElement & |
activityElement | ) |
|
|
explicit |
◆ hasHistory()
bool kanzi::ActivityHistoryManager::hasHistory |
( |
string_view |
activityElementName | ) |
const |
Checks if a child activity element has history data stored in the internal buffer.
- Parameters
-
activityElementName | The activity element you want to check. |
- Returns
- Returns if the activity elements has history data, false otherwise.
◆ serialize() [1/2]
string kanzi::ActivityHistoryManager::serialize |
( |
| ) |
const |
Serializes the activity element to a byte buffer.
- Returns
- The byte buffer containing the serialized data.
◆ deserialize() [1/2]
void kanzi::ActivityHistoryManager::deserialize |
( |
string_view |
data | ) |
|
Deserializes the activity element from a byte buffer.
- Parameters
-
data | The byte buffer containing the serialized data. |
◆ serialize() [2/2]
void kanzi::ActivityHistoryManager::serialize |
( |
ActivityElement & |
activityElement | ) |
|
Serializes a child activity element to the internal byte buffer.
- Parameters
-
activityElement | The activity element to serialize. |
◆ deserialize() [2/2]
void kanzi::ActivityHistoryManager::deserialize |
( |
ActivityElement & |
activityElement | ) |
|
Deserializes a child activity element from the internal byte buffer.
- Parameters
-
activityElement | The activity element to deserialize. |
◆ excludePropertyFromDeserialization()
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
◆ removePropertyFromDeserializationExclusion()
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
◆ beginSerializedChildren()
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
◆ endSerializedChildren()
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
◆ getPropertyFromHistory()
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: