ActivityElement is the base class for all Activity and Activity Host classes. More...
#include <kanzi/ui/node/concept/activity/activity_element.hpp>
Public Member Functions | |
vector< NodeSharedPtr >::const_iterator | beginChildHosts () const |
Returns the begin iterator to the registered child Activity Host. | |
virtual void | deserialize (string_view data) |
Deserializes the activity element from a byte buffer. | |
vector< NodeSharedPtr >::const_iterator | endChildHosts () const |
Returns the end iterator to the registered child Activity Host. | |
Node * | findChildHost (string_view hostName) |
Finds a child Activity Host by name. | |
vector< string > | getCommands () const |
Gets the list of commands handled by code behind of this activity element. | |
ActivityHistoryManager * | getHistoryManager () const |
Gets the history manager of this activity element. | |
virtual const Node * | getNode () const =0 |
Gets the underlying Node object. | |
virtual Node * | getNode ()=0 |
Gets the underlying Node object. | |
ActivityElement * | getParentElement () |
Gets the parent ActivityElement type node. | |
bool | isLeafActivityNode () const |
Returns whether an ActivityElement has a child Activity Host. | |
virtual string | serialize () |
Serializes the activity element to a byte buffer. | |
void | setCodeBehind (CodeBehindSharedPtr codeBehind) |
Attaches a code behind object. | |
void | setCodeBehind (const Metaclass *metaclass) |
Instantiates and attaches a code behind object by specifying its metaclass. | |
virtual | ~ActivityElement ()=default |
Destructor. | |
Static Public Member Functions | |
static string | getFirstElement (string_view activationSequence) |
Gets the first element of the activation sequence. | |
static string | getRestToForward (string_view activationSequence) |
Gets the remainder of the activation sequence. | |
template<typename Type > | |
static bool | isActivityElement (const Type &object) |
Returns whether an object is an ActivityElement. | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Attributes | |
Properties | |
Use this property to check whether an ActivityElement type node is attached or not. The default value is false. | |
static PropertyType< bool > | AttachedProperty |
static PropertyType< bool > | PreserveHistoryProperty |
Enables the preservation of Activity property values when that Activity becomes inactive. | |
Protected Member Functions | |
optional< ActivityBrowserController::ActivityID > | getActivityID () const |
Gets the unique ID that is used by the implementation of the Activity Browser. | |
string | getPathInParent () |
Gets the activation path of this activity element relative to its parent. | |
void | initialize () |
Initializes the activity element. | |
bool | isRootActivityElement () const |
Returns whether an ActivityElement is the root Activity Host node of the Screen node. | |
virtual void | notifyChildrenNodeTreeAvailable () |
Notifies child activity elements that node info tree is available. | |
void | onForceTrigger (const ActivityBrowserController::ForceTriggerMessageArguments &args) |
Message handler for ActivityBrowserController::ForceTriggerMessage. | |
void | onNodeInfoTreeAvailable (const ActivityBrowserController::NodeInfoTreeAvailableArguments &) |
Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage. | |
void | registerChildHost (string_view hostPath) |
Registers a child host in this activity element. | |
virtual void | registerInParentActivityElement ()=0 |
Derived classes implement this function to register themselves in the parent during the construction of the activity graph. | |
void | setActivityID (optional< ActivityBrowserController::ActivityID > activityID) |
Sets the unique ID that is used by the implementation of the Activity Browser. | |
void | unregisterChildHost (string_view hostName) |
Unregisters a child host from this activity element. | |
virtual void | unregisterInParentActivityElement ()=0 |
Derived classes implement this function to unregister themselves from the parent during the destruction of the activity graph. | |
void | updateActivityBrowserProperties () |
Triggers the Activity Browser to update the properties of the Activity Element. | |
ActivityElement is the base class for all Activity and Activity Host classes.
ActivityElement provides the way to manipulate the activity graph in a uniform manner. ActivityElement provides this base functionality to all Activity and Activity Host classes:
|
virtualdefault |
Destructor.
|
static |
Gets the underlying Node object.
Implemented in kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::DataDrivenExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >.
Gets the underlying Node object.
Implemented in kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::DataDrivenExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >.
|
virtual |
Serializes the activity element to a byte buffer.
Reimplemented in kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >.
Deserializes the activity element from a byte buffer.
data | The byte buffer containing the serialized data. |
Reimplemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ParallelActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, and kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >.
Instantiates and attaches a code behind object by specifying its metaclass.
metaclass | The metaclass of the code behind class you want to instantiate and attach. |
void kanzi::ActivityElement::setCodeBehind | ( | CodeBehindSharedPtr | codeBehind | ) |
Attaches a code behind object.
codeBehind | The code behind object you want to attach. |
vector< string > kanzi::ActivityElement::getCommands | ( | ) | const |
Gets the list of commands handled by code behind of this activity element.
ActivityHistoryManager * kanzi::ActivityElement::getHistoryManager | ( | ) | const |
Gets the history manager of this activity element.
ActivityElement * kanzi::ActivityElement::getParentElement | ( | ) |
Gets the parent ActivityElement type node.
Node * kanzi::ActivityElement::findChildHost | ( | string_view | hostName | ) |
Finds a child Activity Host by name.
hostName | The name of the child Activity Host to find. |
bool kanzi::ActivityElement::isLeafActivityNode | ( | ) | const |
Returns whether an ActivityElement has a child Activity Host.
|
static |
Returns whether an object is an ActivityElement.
object | Object for which you want to check whether it is an ActivityElement. |
|
static |
Gets the first element of the activation sequence.
activationSequence | Activation sequence to parse. |
|
static |
Gets the remainder of the activation sequence.
activationSequence | Activation sequence to parse. |
vector< NodeSharedPtr >::const_iterator kanzi::ActivityElement::beginChildHosts | ( | ) | const |
Returns the begin iterator to the registered child Activity Host.
vector< NodeSharedPtr >::const_iterator kanzi::ActivityElement::endChildHosts | ( | ) | const |
Returns the end iterator to the registered child Activity Host.
Derived classes implement this function to register themselves in the parent during the construction of the activity graph.
Implemented in kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >.
Derived classes implement this function to unregister themselves from the parent during the destruction of the activity graph.
Implemented in kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >.
|
protected |
Initializes the activity element.
You must call this function in derived classes.
|
protected |
Registers a child host in this activity element.
hostPath | The node tree path to the host to register. |
|
protected |
Unregisters a child host from this activity element.
hostName | The name of the host to unregister. |
Notifies child activity elements that node info tree is available.
Reimplemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >.
|
protected |
Gets the unique ID that is used by the implementation of the Activity Browser.
|
protected |
Sets the unique ID that is used by the implementation of the Activity Browser.
|
protected |
Gets the activation path of this activity element relative to its parent.
|
protected |
Triggers the Activity Browser to update the properties of the Activity Element.
|
protected |
Returns whether an ActivityElement is the root Activity Host node of the Screen node.
|
protected |
Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage.
Performs connection to the Activity Browser data model.
|
protected |
Message handler for ActivityBrowserController::ForceTriggerMessage.
Forces a trigger to execute.
|
static |
|
static |
Enables the preservation of Activity property values when that Activity becomes inactive.
The default value is true.