This file is indexed.

/usr/include/KWWidgets/vtkKWWizardWorkflow.h is in libkwwidgets1-dev 1.0.0~cvs20100930-8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/*=========================================================================

  Module:    $RCSfile: vtkKWWizardWorkflow.h,v $

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkKWWizardWorkflow - a wizard workflow engine.
// .SECTION Description
// This class is the basis for a wizard workflow engine, i.e. a state
// machine with a enhancements to support wizard steps (vtkKWWizardStep).
// .SECTION 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.
// .SECTION See Also
// vtkKWWizardStep vtkKWStateMachine vtkKWStateMachineState

#ifndef __vtkKWWizardWorkflow_h
#define __vtkKWWizardWorkflow_h

#include "vtkKWStateMachine.h"

class vtkKWWizardStep;
class vtkKWStateMachineState;
class vtkKWWizardWorkflowInternals;

class KWWidgets_EXPORT vtkKWWizardWorkflow : public vtkKWStateMachine
{
public:
  static vtkKWWizardWorkflow* New();
  vtkTypeRevisionMacro(vtkKWWizardWorkflow, vtkKWStateMachine);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // 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 AddStep(vtkKWWizardStep *step);
  virtual int HasStep(vtkKWWizardStep *step);
  virtual int GetNumberOfSteps();
  virtual vtkKWWizardStep* GetNthStep(int rank);

  // Description:
  // 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 AddNextStep(vtkKWWizardStep *step);

  // Description:
  // 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 CreateNextTransition(
    vtkKWWizardStep *origin, 
    vtkKWStateMachineInput *next_input,
    vtkKWWizardStep *destination);

  // Description:
  // 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 CreateBackTransition(
    vtkKWWizardStep *origin, 
    vtkKWWizardStep *destination);

  // Description:
  // 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 CreateGoToTransition(
    vtkKWWizardStep *origin, 
    vtkKWWizardStep *destination);

  // Description:
  // Create a go-to transition from all known steps added so far to a 
  // destination step. See the CreateGoToTransition() method for more details.
  virtual int CreateGoToTransitions(vtkKWWizardStep *destination);

  // Description:
  // 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 vtkKWWizardStep* GetInitialStep();
  virtual int SetInitialStep(vtkKWWizardStep*);

  // Description:
  // Get the current step, i.e. the step vtkKWStateMachine::CurrentState
  // belongs too.
  virtual vtkKWWizardStep* GetCurrentStep();

  // Description:
  // 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 void SetFinishStep(vtkKWWizardStep*);
  virtual vtkKWWizardStep* GetFinishStep();

  // Description:
  // 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 int CreateGoToTransitionsToFinishStep();

  // Description:
  // Get the step a state belongs to (if any)
  virtual vtkKWWizardStep* GetStepFromState(vtkKWStateMachineState*);

  // Description:
  // 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 int GetNumberOfStepsInNavigationStack();
  virtual vtkKWWizardStep* GetNthStepInNavigationStack(int rank);

  // Description:
  // 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 AttemptToGoToNextStep();
  virtual void AttemptToGoToPreviousStep();
  virtual void AttemptToGoToFinishStep();

  // Description:
  // 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 SetNavigationStackedChangedCommand(
    vtkObject *object, const char *method);
  virtual void InvokeNavigationStackedChangedCommand();
  virtual int HasNavigationStackedChangedCommand();

  // Description:
  // Events. The NavigationStackedChangedCommand is invoked when the navigation
  // stack has changed, as a result of moving forward (or backward) to a 
  // new step.
  //BTX
  enum
  {
    NavigationStackedChangedEvent = 10000
  };
  //ETX

  // Description:
  // Callbacks.
  virtual void TryToGoToStepCallback(
    vtkKWWizardStep *origin, vtkKWWizardStep *destination);

  // Description:
  // 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.
  virtual void InvokeCurrentStateChangedCommand();

protected:
  vtkKWWizardWorkflow();
  ~vtkKWWizardWorkflow();

  // Description:
  // Remove step(s).
  virtual void RemoveStep(vtkKWWizardStep *step);
  virtual void RemoveAllSteps();

  // PIMPL Encapsulation for STL containers
  //BTX
  vtkKWWizardWorkflowInternals *Internals;
  //ETX

  // Description:
  // Get the goto state
  vtkKWStateMachineState *GoToState;
  virtual vtkKWStateMachineState* GetGoToState();

  char *NavigationStackedChangedCommand;

  // Description:
  // Push/pop a step to/from the navigation stack..
  virtual void PushStepToNavigationStack(vtkKWWizardStep*);
  virtual vtkKWWizardStep* PopStepFromNavigationStack();

private:

  vtkKWWizardStep *FinishStep;

  vtkKWWizardWorkflow(const vtkKWWizardWorkflow&); // Not implemented
  void operator=(const vtkKWWizardWorkflow&); // Not implemented
};

#endif