Extends ActivityPrefabLoader with a specialized behavior for child Activity nodes of a ParallelExclusiveActivityHost. More...
#include <kanzi/ui/node/concept/activity/parallel_activity_host_concept.hpp>
Public Member Functions | |
void | activatedByMessage (bool value) |
Notifies the prefab loader that the activation of an Activity node is requested through the ActivateActivityMessage. More... | |
void | activatedOnHostAttach (bool value) |
Notifies the prefab loader that the activation of an Activity node is requested. More... | |
ActivityInParallelHostPrefabLoader (NodeWeakPtr callbackOwner, ActivityPrefabLoader::ActivityPrefabLoaderCallback callback) | |
Constructor. More... | |
void | addApplyActivationModifier (BindingTokenWeakPtr weakModifier) |
Stores callback to the ApplyActivationAction that Kanzi executes when an Activity Host node loads the prefab of an Activity node. More... | |
void | finalizeActivation (NodeSharedPtr node) |
Finalizes the activation by setting the appropriate property or setting the property modifier binding: More... | |
bool | hasValidActivationModifier () const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by modifier bindings callbacks of ApplyActivationAction. More... | |
void | invalidate () |
Invalidates the prefab loading. More... | |
bool | isActivatedByMessage () const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by ActivateActivityMessage. More... | |
bool | isActivatedOnHostAttach () const |
Indicates whether of the activation of any child Activity node of a ParallelActivityHost is requested. More... | |
bool | isValid () const override |
ActivityPrefabLoader::isValid() implementation. More... | |
Public Member Functions inherited from kanzi::ActivityPrefabLoader | |
ActivityPrefabLoader (NodeWeakPtr callbackOwner, ActivityPrefabLoaderCallback callback) | |
Constructor. More... | |
void | onAsyncLoadCompleted (string_view loadedPrefabPath) |
Callback for asynchronous resource loading. More... | |
void | requestPrefabLoading (string_view prefabPath, string_view activityName) |
Requests the loading of a prefab. More... | |
virtual | ~ActivityPrefabLoader ()=default |
Destructor. More... | |
Public Attributes | |
vector< BindingTokenWeakPtr > | m_applyActivationModifiers |
Container of the property modifier bindings callbacks of ApplyActivationAction. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::ActivityPrefabLoader | |
using | ActivityPrefabLoaderCallback = function< void(PrefabTemplateSharedPtr, string_view)> |
Extends ActivityPrefabLoader with a specialized behavior for child Activity nodes of a ParallelExclusiveActivityHost.
An activation request to an Activity node in a ParallelExclusiveActivityHost is valid for as long as an ApplyActivationAction request is valid, or there is an ActivateActivityMessage request, given that it is not invalidated by a DeactivateActivityMessage message.
The ApplyActivationAction mechanism sets a property modifier to apply activation to a child Activity node.
For ParallelActivityHost:
For ExclusiveActivityHost:
|
explicit |
Constructor.
callbackOwner | The node that owns the callback. |
callback | The callback that Kanzi calls when the prefab loading is completed. |
bool kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::hasValidActivationModifier | ( | ) | const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by modifier bindings callbacks of ApplyActivationAction.
bool kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::isActivatedByMessage | ( | ) | const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by ActivateActivityMessage.
bool kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::isActivatedOnHostAttach | ( | ) | const |
Indicates whether of the activation of any child Activity node of a ParallelActivityHost is requested.
void kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::addApplyActivationModifier | ( | BindingTokenWeakPtr | weakModifier | ) |
Stores callback to the ApplyActivationAction that Kanzi executes when an Activity Host node loads the prefab of an Activity node.
weakModifier | A property modifier binding callback provided by the ApplyActivationAction to finalize the activation. |
void kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::activatedByMessage | ( | bool | value | ) |
Notifies the prefab loader that the activation of an Activity node is requested through the ActivateActivityMessage.
This message invalidates the active prefab loading of an Activity node, if the activation request is no longer valid.
value | Set to e\ true, when the activation of the Activity node is requested by ActivateActivityMessage. Set to e\ false, when the requested activation is no longer valid. |
void kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::activatedOnHostAttach | ( | bool | value | ) |
Notifies the prefab loader that the activation of an Activity node is requested.
value | Set to e\ true, when the activation of the Activity node is requested by ActivateActivityMessage. Set to e\ false, when the requested activation is no longer valid. |
void kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::finalizeActivation | ( | NodeSharedPtr | node | ) |
Finalizes the activation by setting the appropriate property or setting the property modifier binding:
node | The Activity node to activate. |
|
overridevirtual |
ActivityPrefabLoader::isValid() implementation.
Indicates whether a ParallelActivityHost must load the prefab of a child Activity node.
Reimplemented from kanzi::ActivityPrefabLoader.
void kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::invalidate | ( | ) |
Invalidates the prefab loading.
Once invalidated, Kanzi neither acquires the prefab, nor calls the callback when the asynchronous resource loading is completed.
vector<BindingTokenWeakPtr> kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader::m_applyActivationModifiers |
Container of the property modifier bindings callbacks of ApplyActivationAction.
Kanzi uses this container to set the modifier that ensures an Activity node stays active.