Kanzi  3.9.7
Kanzi Engine API
kanzi::ActivityHostConcept Class Referenceabstract

Base class for Activity Host classes. More...

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

Inheritance diagram for kanzi::ActivityHostConcept:
[legend]

Classes

struct  ActivatingActivity
 Class to manage storing and switching of Activity nodes. More...
 
class  ActivationMessageArguments
 Message arguments for ActivateActivity and DeactivateActivity messages. More...
 
struct  ActiveActivity
 Class to manage storing and switching of Activity nodes. More...
 
struct  ActivityInfo
 Stores information that identifies an Activity node. More...
 
class  ActivityPrefabMessageArguments
 Message arguments for ActivityPrefabAttachedMessage and ActivityPrefabDetachedMessage. More...
 
struct  DeactivatingActivity
 Class to manage storing and switching of Activity nodes. More...
 
class  RegisterActivityElementInternalMessageArguments
 Message arguments for RegisterActivityElementInternal message. More...
 
class  UnregisterActivityElementInternalMessageArguments
 Message arguments for UnregisterActivityElementInternal message. More...
 

Public Types

enum  ActivationStatus { ActivationStatus::PreparingForActivation, ActivationStatus::ParallelAnimation, ActivationStatus::ExclusiveAnimation }
 Specifies possible stages for internal tracking of activation of an Activity. More...
 
using ActivityInfoContainer = vector< ActivityInfo >
 
enum  DeactivationStatus { DeactivationStatus::ExclusiveAnimation, DeactivationStatus::ParallelAnimation, DeactivationStatus::WaitingForRelease }
 Specifies possible stages for internal tracking of deactivation of an Activity. More...
 

Public Member Functions

virtual vector< string > getActivatingNames ()=0
 Returns the names of activating Activities in this Activity Host. More...
 
virtual void onActivateActivityOverride (string_view activationPath)=0
 Derived classes implement this method to react to ActivateActivity message. More...
 
virtual void resolveFocusWithPolicy (Node &activityNode)=0
 Focuses a given Activity if the focusing policy of this Activity Host instructs so. More...
 
virtual void setActivationModifier (string_view activityName, BindingTokenWeakPtr weakModifier)=0
 Sets a property modifier to apply activation to a child Activity Node of an Activity Host. More...
 
virtual ~ActivityHostConcept ()=default
 Destructor. More...
 

Static Public Member Functions

template<typename Type >
static bool isActivityHost (const Type &object)
 Determines if an object is an ActivityHost. More...
 
static bool isActivityHostMetaclass (const Metaclass *metaclass)
 Checks whether the given Metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Static Public Attributes

Messages
static MessageType< ActivationMessageArgumentsActivateActivityMessage
 You can send ActivateActivity to the Activity Host to activate an Activity. More...
 
static MessageType< ActivationMessageArgumentsDeactivateActivityMessage
 You can send DeactivateActivity to the Activity Host to deactivate an Activity. More...
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabAttachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated. More...
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabDetachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated. More...
 
Internal Messages
static MessageType< RegisterActivityElementInternalMessageArgumentsRegisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to register the Activity Host in the parent. More...
 
static MessageType< UnregisterActivityElementInternalMessageArgumentsUnregisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to unregister the Activity Host from the parent. More...
 

Detailed Description

Base class for Activity Host classes.

This class defines common types, properties and messages for Activity Host classes.

See also
ExclusiveActivityHost2D, ExclusiveActivityHost3D, ParallelActivityHost2D, ParallelActivityHost3D.

Member Typedef Documentation

Member Enumeration Documentation

Specifies possible stages for internal tracking of activation of an Activity.

Enumerator
PreparingForActivation 

The Activity is preparing for the activation sequence.

For example, resources can be loaded at this stage.

ParallelAnimation 

The Activity is in animation stage parallel to another Activity.

ExclusiveAnimation 

The Activity is in exclusive animation stage.

Specifies possible stages for internal tracking of deactivation of an Activity.

Enumerator
ExclusiveAnimation 

The Activity is in exclusive animation stage.

ParallelAnimation 

The Activity is in animation stage parallel to another Activity.

WaitingForRelease 

The Activity has finished all possible actions during the deactivation.

Constructor & Destructor Documentation

virtual kanzi::ActivityHostConcept::~ActivityHostConcept ( )
virtualdefault

Destructor.

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::ActivityHostConcept::makeEditorInfo ( )
static
template<typename Type >
static bool kanzi::ActivityHostConcept::isActivityHost ( const Type &  object)
inlinestatic

Determines if an object is an ActivityHost.

Parameters
objectObject to test.
Returns
Returns true if the object is an ActivityHost, false otherwise.
static bool kanzi::ActivityHostConcept::isActivityHostMetaclass ( const Metaclass metaclass)
inlinestatic

Checks whether the given Metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass.

Parameters
metaclassThe metaclass to check.
Returns
If the given metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass, returns true, otherwise false.
Since
Kanzi 3.9.4
virtual void kanzi::ActivityHostConcept::setActivationModifier ( string_view  activityName,
BindingTokenWeakPtr  weakModifier 
)
pure virtual

Sets a property modifier to apply activation to a child Activity Node of an Activity Host.

The created modifier is a BindingToken for the property that keeps a child Activity node activated for as long as the token is alive. ApplyActivationAction uses this method to apply activation to an Activity Node, upon invocation.

For ParallelActivityHost:

For ExclusiveActivityHost:

Parameters
activityNameThe name of the Activity node that the ApplyActivationAction activates.
weakModifierA BindingToken owned by the ApplyActivationAction. For ParallelActivityHost, Kanzi waits until the child Activity node prefab is instantiated. Only after the prefab is instantiated can Kanzi set the property modifier binding on the child Activity node. For ExclusiveActivityHost Kanzi does not have to wait for prefab to instantiate because it sets the property modifier directly on the Activity Host and not on its child Activity nodes.
Since
Kanzi 3.9.0

Implemented in kanzi::ParallelActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >.

virtual void kanzi::ActivityHostConcept::onActivateActivityOverride ( string_view  activationPath)
pure virtual

Member Data Documentation

MessageType<ActivationMessageArguments> kanzi::ActivityHostConcept::ActivateActivityMessage
static

You can send ActivateActivity to the Activity Host to activate an Activity.

Exclusive Activity Host deactivates the previously active Activity at the same time.

MessageType<ActivationMessageArguments> kanzi::ActivityHostConcept::DeactivateActivityMessage
static

You can send DeactivateActivity to the Activity Host to deactivate an Activity.

Exclusive Activity Host ignores this message.

MessageType<ActivityPrefabMessageArguments> kanzi::ActivityHostConcept::ActivityPrefabAttachedMessage
static

An Activity Host sends this message when it attaches the prefab of the Activity that is activated.

Since
Kanzi 3.9.1.
MessageType<ActivityPrefabMessageArguments> kanzi::ActivityHostConcept::ActivityPrefabDetachedMessage
static

An Activity Host sends this message when it attaches the prefab of the Activity that is activated.

Since
Kanzi 3.9.1.
MessageType<RegisterActivityElementInternalMessageArguments> kanzi::ActivityHostConcept::RegisterHostInternalMessage
static

Internal message sent by an Activity Host to its parent Activity or Activity Host to register the Activity Host in the parent.

MessageType<UnregisterActivityElementInternalMessageArguments> kanzi::ActivityHostConcept::UnregisterHostInternalMessage
static

Internal message sent by an Activity Host to its parent Activity or Activity Host to unregister the Activity Host from the parent.


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