vtkKWWizardWorkflow Class Reference

a wizard workflow engine. More...

#include <vtkKWWizardWorkflow.h>

Inheritance diagram for vtkKWWizardWorkflow:
Inheritance graph
[legend]
Collaboration diagram for vtkKWWizardWorkflow:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkKWStateMachine Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual int AddNextStep (vtkKWWizardStep *step)
virtual int CreateGoToTransition (vtkKWWizardStep *origin, vtkKWWizardStep *destination)
virtual int CreateGoToTransitions (vtkKWWizardStep *destination)
virtual vtkKWWizardStepGetCurrentStep ()
virtual int CreateGoToTransitionsToFinishStep ()
virtual vtkKWWizardStepGetStepFromState (vtkKWStateMachineState *)
virtual void InvokeCurrentStateChangedCommand ()

Static Public Member Functions

static vtkKWWizardWorkflowNew ()
static int IsTypeOf (const char *type)
static vtkKWWizardWorkflowSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWWizardWorkflow ()
 ~vtkKWWizardWorkflow ()

Protected Attributes

vtkKWWizardWorkflowInternals * Internals
char * NavigationStackedChangedCommand



enum  { NavigationStackedChangedEvent = 10000 }
vtkKWStateMachineStateGoToState
virtual int AddStep (vtkKWWizardStep *step)
virtual int HasStep (vtkKWWizardStep *step)
virtual int GetNumberOfSteps ()
virtual vtkKWWizardStepGetNthStep (int rank)
virtual int CreateNextTransition (vtkKWWizardStep *origin, vtkKWStateMachineInput *next_input, vtkKWWizardStep *destination)
virtual int CreateBackTransition (vtkKWWizardStep *origin, vtkKWWizardStep *destination)
virtual vtkKWWizardStepGetInitialStep ()
virtual int SetInitialStep (vtkKWWizardStep *)
virtual void SetFinishStep (vtkKWWizardStep *)
virtual vtkKWWizardStepGetFinishStep ()
virtual int GetNumberOfStepsInNavigationStack ()
virtual vtkKWWizardStepGetNthStepInNavigationStack (int rank)
virtual void AttemptToGoToNextStep ()
virtual void AttemptToGoToPreviousStep ()
virtual void AttemptToGoToFinishStep ()
virtual void SetNavigationStackedChangedCommand (vtkObject *object, const char *method)
virtual void InvokeNavigationStackedChangedCommand ()
virtual int HasNavigationStackedChangedCommand ()
virtual void TryToGoToStepCallback (vtkKWWizardStep *origin, vtkKWWizardStep *destination)
virtual void RemoveStep (vtkKWWizardStep *step)
virtual void RemoveAllSteps ()
virtual vtkKWStateMachineStateGetGoToState ()
virtual void PushStepToNavigationStack (vtkKWWizardStep *)
virtual vtkKWWizardStepPopStepFromNavigationStack ()

Detailed Description

a wizard workflow engine.

This class is the basis for a wizard workflow engine, i.e. a state machine with a enhancements to support wizard steps (vtkKWWizardStep).

Thanks:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics.
See also:
vtkKWWizardStep vtkKWStateMachine vtkKWStateMachineState

Definition at line 38 of file vtkKWWizardWorkflow.h.


Member Typedef Documentation

Reimplemented from vtkKWStateMachine.

Definition at line 43 of file vtkKWWizardWorkflow.h.


Member Enumeration Documentation

anonymous enum

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

Enumerator:
NavigationStackedChangedEvent 

Definition at line 222 of file vtkKWWizardWorkflow.h.


Constructor & Destructor Documentation

vtkKWWizardWorkflow::vtkKWWizardWorkflow (  )  [protected]
vtkKWWizardWorkflow::~vtkKWWizardWorkflow (  )  [protected]

Member Function Documentation

static vtkKWWizardWorkflow* vtkKWWizardWorkflow::New (  )  [static]

Reimplemented from vtkKWStateMachine.

virtual const char* vtkKWWizardWorkflow::GetClassName (  )  [virtual]

Reimplemented from vtkKWStateMachine.

static int vtkKWWizardWorkflow::IsTypeOf ( const char *  type  )  [static]

Reimplemented from vtkKWStateMachine.

virtual int vtkKWWizardWorkflow::IsA ( const char *  type  )  [virtual]

Reimplemented from vtkKWStateMachine.

static vtkKWWizardWorkflow* vtkKWWizardWorkflow::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkKWStateMachine.

void vtkKWWizardWorkflow::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkKWStateMachine.

virtual int vtkKWWizardWorkflow::AddStep ( vtkKWWizardStep step  )  [virtual]

Add a step. Note that the step's components will be added automatically to the state machine (i.e. its InteractionState and ValidationState states as well as its ValidationTransition and ValidationFailedTransition transitions). A new cluster will be created for both InteractionState and ValidationState states. Return 1 on success, 0 otherwise.

virtual int vtkKWWizardWorkflow::HasStep ( vtkKWWizardStep step  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual int vtkKWWizardWorkflow::GetNumberOfSteps (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetNthStep ( int  rank  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual int vtkKWWizardWorkflow::AddNextStep ( vtkKWWizardStep step  )  [virtual]

Add a next step, connecting it to the previous added step (if any). The convenience method will: - call AddStep(), - create a transition from the previously added step (if any) *to* this step, by calling the CreateNextTransition() method, - create a transition from this step *back* to the previously added step (if any), by calling the CreateBackTransition() method. Return 1 on success, 0 otherwise.

virtual int vtkKWWizardWorkflow::CreateNextTransition ( vtkKWWizardStep origin,
vtkKWStateMachineInput next_input,
vtkKWWizardStep destination 
) [virtual]

Create a transition from an originating step to a destination step. The destination step should semantically be a "next" step, i.e. from a workflow perspective, the destination step is meant to appear "after" the originating step. More specifically, this method creates a transition from the origin's ValidationState state to the destination's InteractionState, triggered by next_input. The transition's StartCommand callback is automatically set to invoke the originating step's HideUserInterface method (which calls the HideUserInterfaceCommand callback as well), effectively hiding the originating step's UI before the destination state is reached. This method is used by the AddNextStep() method to connect a newly added step to a previously added step (if any). The input used in that case is vtkKWWizardStep::ValidationSucceededInput, and is expected to be pushed by the previously added step's Validate method/callback.

virtual int vtkKWWizardWorkflow::CreateBackTransition ( vtkKWWizardStep origin,
vtkKWWizardStep destination 
) [virtual]

Create a transition *back* from a destination step to an originating step. The destination step should semantically be a "next" step, i.e. from a workflow perspective, the destination step is meant to appear "after" the originating step. More specifically, this method creates a transition from the destination's InteractionState state to the origin's InteractionState state, triggered by the origin step's GoBackToSelfInput input. The transition's StartCommand callback is automatically set to invoke the destination step's HideUserInterface method (which calls the HideUserInterfaceCommand callback as well), effectively hiding the destination step's UI before the origin state is reached back.

virtual int vtkKWWizardWorkflow::CreateGoToTransition ( vtkKWWizardStep origin,
vtkKWWizardStep destination 
) [virtual]

Create a go-to transition from an originating step to a destination step. The destination step does NOT have to be a "next" step semantically, i.e. from a workflow perspective, the destination step can be meant to appear "after" or "before" the originating step. Such a transition is designed to reach a step directly, effectively bypassing all others steps: this should be used *very* carefully (as it bends the state machine principles to some extent), and is provided only to implement features such as the "Finish" button in a wizard widget. More specifically, this method creates 4 transitions: 1) A transition from the origin's InteractionState to an internal GoToState state acting as a hub, triggered by the destination step's GoToSelfInput input. The transition's EndCommand callback is automatically set to invoke the TryToGoToStepCallback callback, which is in turn responsible for checking if the destination step can be reached, by invoking its CanGoToSelf method/callback. On success, the destination step's UI is hidden by calling its HideUserInterface method, and its GoToSelfInput input is pushed again to trigger transition 2). On error, the origin step's GoBackToSelfInput input is pushed to trigger transition 3). 2) A transition from the internal GoToState hub state to the destination step's InteractionState state, triggered by the destination step's GoToSelfInput input that will be pushed by the TryToGoToStepCallback callback attached to transition 1). This will effectively lead the state machine to the destination state. 3) A transition from the internal GoToState hub state back to the origin step's InteractionState state, triggered by the origin step's GoBackToSelfInput input that will be pushed by the TryToGoToStepCallback callback attached to transition 1). 4) a transition from the destination's InteractionState state back to the origin's InteractionState state, triggered by the origin step's GoBackToSelfInput input (by calling the CreateBackTransition method).

virtual int vtkKWWizardWorkflow::CreateGoToTransitions ( vtkKWWizardStep destination  )  [virtual]

Create a go-to transition from all known steps added so far to a destination step. See the CreateGoToTransition() method for more details.

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetInitialStep (  )  [virtual]

Set/Get the initial step. This is a convenience method to set the vtkKWStateMachine::InitialState to a specific step's InteractionState state. Check vtkKWStateMachine for more details. Note that the initial state can not be reset. Note that setting the initial state is actually the same as entering it (i.e. the state's Enter() method will be called). In this case, this will trigger the step's ShowUserInterfaceCommand callback (by calling the step's ShowUserInterface method), effectively showing this step's UI. For that reason, this method should be the last method you call after setting up the whole workflow. Return 1 on success, 0 otherwise.

virtual int vtkKWWizardWorkflow::SetInitialStep ( vtkKWWizardStep  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetCurrentStep (  )  [virtual]

Get the current step, i.e. the step vtkKWStateMachine::CurrentState belongs too.

virtual void vtkKWWizardWorkflow::SetFinishStep ( vtkKWWizardStep  )  [virtual]

Set/Get the finish step (if not set, GetFinishStep() will return the last added step). This is not mandatory and is mainly used for user interface (vtkKWWizardWidget) or IO purposes. The finish step should semantically be the "last" step, i.e. from a workflow perspective, the finish step is meant to appear "after" all other steps, at the end.

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetFinishStep (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual int vtkKWWizardWorkflow::CreateGoToTransitionsToFinishStep (  )  [virtual]

Create a go-to transition from all known steps added so far to the Finish step. See FinishStep and the CreateGoToTransitions() and CreateGoToTransition() methods for more details.

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetStepFromState ( vtkKWStateMachineState  )  [virtual]

Get the step a state belongs to (if any)

virtual int vtkKWWizardWorkflow::GetNumberOfStepsInNavigationStack (  )  [virtual]

The wizard workflow tries its best to keep a step navigation stack, i.e. the path that lead to the current step. This is *not* a step history, as going "back" (by calling AttemptToGoToPreviousStep() for example) will actually remove steps from the stack.

virtual vtkKWWizardStep* vtkKWWizardWorkflow::GetNthStepInNavigationStack ( int  rank  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual void vtkKWWizardWorkflow::AttemptToGoToNextStep (  )  [virtual]

Attempt to navigate in the workflow by moving the next, previous, or finish step. The AttemptToGoToNextStep() method pushes a vtkKWWizardStep::ValidationInput input. The AttemptToGoToFinishStep() method pushes the FinishStep's GoToSelfInput input. The AttemptToGoToPreviousStep() method pushes the previous step's GoBackToSelfInput input (if any) and updates the navigation stack.

virtual void vtkKWWizardWorkflow::AttemptToGoToPreviousStep (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual void vtkKWWizardWorkflow::AttemptToGoToFinishStep (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual void vtkKWWizardWorkflow::SetNavigationStackedChangedCommand ( vtkObject object,
const char *  method 
) [virtual]

Specifies a command to associate with this workflow. This command is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. The 'object' argument is the object that will have the method called on it. The 'method' argument is the name of the method to be called and any arguments in string form. If the object is NULL, the method is still evaluated as a simple command.

virtual void vtkKWWizardWorkflow::InvokeNavigationStackedChangedCommand (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual int vtkKWWizardWorkflow::HasNavigationStackedChangedCommand (  )  [virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual void vtkKWWizardWorkflow::TryToGoToStepCallback ( vtkKWWizardStep origin,
vtkKWWizardStep destination 
) [virtual]

Callbacks.

virtual void vtkKWWizardWorkflow::InvokeCurrentStateChangedCommand (  )  [virtual]

Specifies a command to associate with this state machine. This command is invoked when the state machine current state has changed. Override to allow the workflow engine to keep track of a navigation stack.

Reimplemented from vtkKWStateMachine.

virtual void vtkKWWizardWorkflow::RemoveStep ( vtkKWWizardStep step  )  [protected, virtual]

Remove step(s).

virtual void vtkKWWizardWorkflow::RemoveAllSteps (  )  [protected, virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual vtkKWStateMachineState* vtkKWWizardWorkflow::GetGoToState (  )  [protected, virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX

virtual void vtkKWWizardWorkflow::PushStepToNavigationStack ( vtkKWWizardStep  )  [protected, virtual]

Push/pop a step to/from the navigation stack..

virtual vtkKWWizardStep* vtkKWWizardWorkflow::PopStepFromNavigationStack (  )  [protected, virtual]

Events. The NavigationStackedChangedCommand is invoked when the navigation stack has changed, as a result of moving forward (or backward) to a new step. BTX


Member Data Documentation

vtkKWWizardWorkflowInternals* vtkKWWizardWorkflow::Internals [protected]

Reimplemented from vtkKWStateMachine.

Definition at line 255 of file vtkKWWizardWorkflow.h.

Get the goto state

Definition at line 260 of file vtkKWWizardWorkflow.h.

Definition at line 264 of file vtkKWWizardWorkflow.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Apr 27 02:39:33 2010 for KWWidgets by  doxygen 1.6.1