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. | |
void | activatedOnHostAttach (bool value) |
Notifies the prefab loader that the activation of an Activity node is requested. | |
ActivityInParallelHostPrefabLoader (NodeWeakPtr callbackOwner, ActivityPrefabLoader::ActivityPrefabLoaderCallback callback) | |
Constructor. | |
void | addApplyActivationModifier (BindingTokenWeakPtr weakModifier) |
Stores callback to the ApplyActivationAction that Kanzi executes when an Activity Host node loads the prefab of an Activity node. | |
void | finalizeActivation (NodeSharedPtr node) |
Finalizes the activation by setting the appropriate property or setting the property modifier binding: | |
bool | hasValidActivationModifier () const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by modifier bindings callbacks of ApplyActivationAction. | |
void | invalidate () |
Invalidates the prefab loading. | |
bool | isActivatedByMessage () const |
Indicates whether the activation of any child Activity node of a ParallelActivityHost is requested by ActivateActivityMessage. | |
bool | isActivatedOnHostAttach () const |
Indicates whether of the activation of any child Activity node of a ParallelActivityHost is requested. | |
bool | isValid () const override |
ActivityPrefabLoader::isValid() implementation. | |
Public Member Functions inherited from kanzi::ActivityPrefabLoader | |
ActivityPrefabLoader (NodeWeakPtr callbackOwner, ActivityPrefabLoaderCallback callback) | |
Constructor. | |
void | onAsyncLoadCompleted (string_view loadedPrefabPath) |
Callback for asynchronous resource loading. | |
void | requestPrefabLoading (string_view prefabPath, string_view activityName) |
Requests the loading of a prefab. | |
virtual | ~ActivityPrefabLoader ()=default |
Destructor. | |
Public Attributes | |
vector< BindingTokenWeakPtr > | m_applyActivationModifiers |
Container of the property modifier bindings callbacks of ApplyActivationAction. | |
Additional Inherited Members | |
Public Types inherited from kanzi::ActivityPrefabLoader | |
using | ActivityPrefabLoaderCallback |
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.