Kanzi  3.9.4
Kanzi Engine API
kanzi::ActivitySwitchingSynchronizer Class Reference

Encapsulates the synchronization of animations for activating and deactivating Activity nodes. More...

#include <kanzi/ui/node/concept/activity/activity_switching_synchronizer.hpp>

Public Member Functions

 ActivitySwitchingSynchronizer (ExclusiveActivityHostConcept &activityHost)
 Constructor. More...
 
void deactivate (unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive)
 Deactivates an Activity node. More...
 
NodeWeakPtr getActivating () const
 Returns the Activity node that the Activity Host node is currently activating. More...
 
string_view getActivatingName () const
 Returns the name of the Activity node that the Activity Host node is currently activating. More...
 
string_view getActivatingPath () const
 Returns the path of the Activity node that the Activity Host node is currently activating. More...
 
NodeWeakPtr getDeactivating () const
 Returns the Activity node that the Activity Host node is currently deactivating. More...
 
string getDeactivatingName () const
 Returns the name of the Activity node that the Activity Host node is currently deactivating. More...
 
void notifyActivityRemoved (string_view name)
 Notifies about the removal of an Activity node. More...
 
void onFinishedExclusiveDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for the FinishedExclusiveDeactivatingAnimationInternal message. More...
 
void onFinishedParallelActivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for FinishedParallelActivatingAnimationInternal message. More...
 
void onFinishedParallelDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args)
 Message handler for the FinishedParallelDeactivatingAnimationInternal message. More...
 
void switchActivity (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath)
 Switches to a new Activity node. More...
 
void switchActivityNoAnimation (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath)
 Switches to a new Activity node without any animations. More...
 
 ~ActivitySwitchingSynchronizer ()
 Destructor. More...
 

Detailed Description

Encapsulates the synchronization of animations for activating and deactivating Activity nodes.

This is a helper class for the Exclusive Activity Host type classes.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ ActivitySwitchingSynchronizer()

kanzi::ActivitySwitchingSynchronizer::ActivitySwitchingSynchronizer ( ExclusiveActivityHostConcept activityHost)
explicit

Constructor.

Parameters
activityHostExclusive Activity Host node that is the owner of this object.

◆ ~ActivitySwitchingSynchronizer()

kanzi::ActivitySwitchingSynchronizer::~ActivitySwitchingSynchronizer ( )

Destructor.

Member Function Documentation

◆ onFinishedParallelActivatingAnimationInternal()

void kanzi::ActivitySwitchingSynchronizer::onFinishedParallelActivatingAnimationInternal ( const ActivityConcept::StatusChangedInternalMessageArguments args)

Message handler for FinishedParallelActivatingAnimationInternal message.

Parameters
argsMessage arguments.

◆ onFinishedParallelDeactivatingAnimationInternal()

void kanzi::ActivitySwitchingSynchronizer::onFinishedParallelDeactivatingAnimationInternal ( const ActivityConcept::StatusChangedInternalMessageArguments args)

Message handler for the FinishedParallelDeactivatingAnimationInternal message.

Parameters
argsMessage arguments.

◆ onFinishedExclusiveDeactivatingAnimationInternal()

void kanzi::ActivitySwitchingSynchronizer::onFinishedExclusiveDeactivatingAnimationInternal ( const ActivityConcept::StatusChangedInternalMessageArguments args)

Message handler for the FinishedExclusiveDeactivatingAnimationInternal message.

Parameters
argsMessage arguments.

◆ switchActivityNoAnimation()

void kanzi::ActivitySwitchingSynchronizer::switchActivityNoAnimation ( const ActivityHostConcept::ActivityInfo activityToActivate,
unique_ptr< ActivityHostConcept::ActiveActivity currentlyActive,
string_view  continuationActivationPath 
)

Switches to a new Activity node without any animations.

Parameters
activityToActivateThe information of the Activity node to switch to.
currentlyActiveThe Activity node to switch from.
continuationActivationPathThe remainder of the activation path in the activation sequence.

◆ switchActivity()

void kanzi::ActivitySwitchingSynchronizer::switchActivity ( const ActivityHostConcept::ActivityInfo activityToActivate,
unique_ptr< ActivityHostConcept::ActiveActivity currentlyActive,
string_view  continuationActivationPath 
)

Switches to a new Activity node.

Parameters
activityToActivateThe information of Activity node to switch to.
currentlyActiveThe Activity node to switch from.
continuationActivationPathThe remainder of the activation path in the activation sequence.

◆ deactivate()

void kanzi::ActivitySwitchingSynchronizer::deactivate ( unique_ptr< ActivityHostConcept::ActiveActivity currentlyActive)

Deactivates an Activity node.

Parameters
currentlyActiveThe Activity node to deactivate.

◆ notifyActivityRemoved()

void kanzi::ActivitySwitchingSynchronizer::notifyActivityRemoved ( string_view  name)

Notifies about the removal of an Activity node.

Removing an Activity node during synchronization can get stuck, because messages used for synchronization are not sent by the removed Activity nodes. For this reason, to continue with the transition animation, Kanzi must inform the synchronizer that an Activity node was removed.

Parameters
nameThe name of the removed Activity node.

◆ getActivating()

NodeWeakPtr kanzi::ActivitySwitchingSynchronizer::getActivating ( ) const

Returns the Activity node that the Activity Host node is currently activating.

Returns
The currently activating Activity node.

◆ getActivatingName()

string_view kanzi::ActivitySwitchingSynchronizer::getActivatingName ( ) const

Returns the name of the Activity node that the Activity Host node is currently activating.

Returns
The name of the currently activating Activity node.

◆ getActivatingPath()

string_view kanzi::ActivitySwitchingSynchronizer::getActivatingPath ( ) const

Returns the path of the Activity node that the Activity Host node is currently activating.

Returns
The path of the currently activating Activity node.

◆ getDeactivating()

NodeWeakPtr kanzi::ActivitySwitchingSynchronizer::getDeactivating ( ) const

Returns the Activity node that the Activity Host node is currently deactivating.

Returns
The currently deactivating Activity node.

◆ getDeactivatingName()

string kanzi::ActivitySwitchingSynchronizer::getDeactivatingName ( ) const

Returns the name of the Activity node that the Activity Host node is currently deactivating.

Returns
The name of the currently deactivating Activity node.

The documentation for this class was generated from the following file: