VTK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkProcess Class Referenceabstract

a process that can be launched by a vtkMultiProcessController More...

#include <vtkProcess.h>

Inherits vtkObject.

Collaboration diagram for vtkProcess:
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkProcessNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Execute ()=0
 
vtkMultiProcessControllerGetController ()
 
void SetController (vtkMultiProcessController *aController)
 
int GetReturnValue ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkProcessSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkProcess ()
 

Protected Attributes

vtkMultiProcessControllerController
 
int ReturnValue
 

Detailed Description

a process that can be launched by a vtkMultiProcessController

vtkProcess is an abstract class representing a process that can be launched by a vtkMultiProcessController. Concrete classes just have to implement Execute() method and make sure it set the proper value in ReturnValue.

Example:
class MyProcess: public vtkProcess ... vtkMultiProcessController *c; MyProcess *p=new MyProcess::New(); p->SetArgs(argc,argv); // some parameters specific to the process p->SetX(10.0); // ... c->SetSingleProcess(p); c->SingleMethodExecute(); int returnValue=p->GetReturnValue();
See Also
vtkMultiProcessController
Tests:
vtkProcess (Tests)

Definition at line 48 of file vtkProcess.h.

Member Typedef Documentation

typedef vtkObject vtkProcess::Superclass

Definition at line 51 of file vtkProcess.h.

Constructor & Destructor Documentation

vtkProcess::vtkProcess ( )
protected

Member Function Documentation

static int vtkProcess::IsTypeOf ( const char *  type)
static
virtual int vtkProcess::IsA ( const char *  type)
virtual
static vtkProcess* vtkProcess::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkProcess::NewInstanceInternal ( ) const
protectedvirtual
vtkProcess* vtkProcess::NewInstance ( ) const
void vtkProcess::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual void vtkProcess::Execute ( )
pure virtual

Entry point of the process. This method is expected to update ReturnValue.

vtkMultiProcessController* vtkProcess::GetController ( )

Give access to the controller that launched the process. Initial value is NULL.

void vtkProcess::SetController ( vtkMultiProcessController aController)

This method should not be called directly but set by the controller itself.

int vtkProcess::GetReturnValue ( )

Value set at the end of a call to Execute.

Member Data Documentation

vtkMultiProcessController* vtkProcess::Controller
protected

Definition at line 72 of file vtkProcess.h.

int vtkProcess::ReturnValue
protected

Definition at line 73 of file vtkProcess.h.


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