The base class for transitions between states in the state machine.
This class provides a common interface for any transition.
This type of transition is taken whenever the source state becomes active.
Transitions have one source state and 0 or more target states.
A CYIAbstractTimeline can be tied to each transition. With no CYIAbstractTimeline, the transition is instantaneous, and has duration 0. If a CYIAbstractTimeline is specified, the transition has duration equal to the length of the CYIAbstractTimeline.
Start and end callbacks are provided in the form of signals and virtual methods. If no CYIAbstractTimeline is set end will be triggered immediately after start.
#include <deprecated/YiTransition.h>

Public Attributes | |
| CYISignal | TransitionStarted |
| CYISignal | TransitionEnded |
Protected Member Functions | |
| virtual bool | TestEvent (CYIEvent *) |
| virtual void | OnTransitionStart (CYIEvent *) |
| virtual void | OnTransitionEnd (CYIEvent *) |
| CYITransition (CYITransitionPriv *priv, CYICompoundState *source, CYIAbstractState *target) | |
Protected Attributes | |
| CYITransitionPriv * | m_pPriv |
Friends | |
| class | CYICompoundState |
| class | CYITransitionPriv |
| yi::deprecated::CYITransition::CYITransition | ( | CYICompoundState * | pSource, |
| CYIAbstractState * | pTarget = 0 |
||
| ) |
Create a transition from pSource to pTarget. pSource may be nullptr, but remember to set it later using CYITransition::SetSourceState
|
virtual |
|
protected |
| void yi::deprecated::CYITransition::AddTargetState | ( | CYIAbstractState * | pState | ) |
Adds pState as a target state of this transition.
| uint64_t yi::deprecated::CYITransition::GetDuration | ( | ) | const |
Returns the time in milliseconds that this transition will last. Is always equal to the length of the associated timeline.
| CYICompoundState* yi::deprecated::CYITransition::GetSourceState | ( | ) |
Returns the source state of this transition, can be nullptr.
| std::list<CYIAbstractState *> yi::deprecated::CYITransition::GetTargetStates | ( | ) |
Returns a list of the target states of this transition.
| const CYIAbstractTimeline* yi::deprecated::CYITransition::GetTimeline | ( | ) | const |
Retrieve the timeline associated with this transition.
| CYIAbstractTimeline::DIRECTION yi::deprecated::CYITransition::GetTimelineDirection | ( | ) | const |
Returns the direction of timeline playback.
|
protectedvirtual |
This virutal method is called with the transition ends.
Reimplemented in yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3 >, and yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3, YI_SLOT_PARAM4 >.
|
protectedvirtual |
This virutal method is called when the transition starts.
Reimplemented in yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3 >, and yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3, YI_SLOT_PARAM4 >.
| void yi::deprecated::CYITransition::RemoveTargetState | ( | CYIAbstractState * | pState | ) |
Removes pState as a target state of this transition.
| void yi::deprecated::CYITransition::RemoveTimeline | ( | ) |
Remove the timeline. This timeline will have duration of 0.
| void yi::deprecated::CYITransition::SetName | ( | const CYIString & | name | ) |
Sets the name of this transition for debugging purposes.
| void yi::deprecated::CYITransition::SetSourceState | ( | CYICompoundState * | pState | ) |
Sets the source state of this transition. pState may be nullptr, but remember to set it later
| void yi::deprecated::CYITransition::SetTimeline | ( | CYIAbstractTimeline * | pTimeline | ) |
Set the timeline associated with this transition. Pass in nullptr to remove, or use CYITransition::RemoveTimeline.
| void yi::deprecated::CYITransition::SetTimeline | ( | CYIAbstractTimeline * | pTimeline, |
| CYIAbstractTimeline::DIRECTION | direction | ||
| ) |
Set the timeline associated with this transition along with the direction of playback.
| void yi::deprecated::CYITransition::SetTimelineDirection | ( | CYIAbstractTimeline::DIRECTION | direction | ) |
Set the direction of playback for the timeline associated with this transition. The direction is ignored if there is no timeline.
|
protectedvirtual |
This virtual method provides the conditions for this transition to take place. Override this method to create transitions with custom conditions.
Reimplemented in yi::deprecated::CYISignalTransition<>, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2 >, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3 >, yi::deprecated::CYIEventTransition, yi::deprecated::CYIKeyEventTransition, yi::deprecated::CYIActionEventTransition, yi::deprecated::CYISignalTransition< YI_SLOT_PARAM1, YI_SLOT_PARAM2, YI_SLOT_PARAM3, YI_SLOT_PARAM4 >, and yi::deprecated::CYIAbstractSignalTransition.
|
friend |
|
friend |
|
protected |
| CYISignal yi::deprecated::CYITransition::TransitionEnded |
The signal emitted when this transition ends. Is emitted immediately after CYITransition::TransitionStarted if this transition has duration 0.
| CYISignal yi::deprecated::CYITransition::TransitionStarted |
The signal emitted when this transition is started