Commit c15e7d1b authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: Simplify initialization and finalization of process module

parent 4835f03b
......@@ -164,7 +164,7 @@ int MyMain(int argc, char *argv[])
pm->SetGUIHelper(helper);
helper->Delete();
pm->InitializeInterpreter();
pm->Initialize();
ParaViewInitializeInterpreter(pm);
// Start the application's event loop. This will enable
......@@ -177,8 +177,7 @@ int MyMain(int argc, char *argv[])
startVal = pm->Start(new_argc, new_argv);
// Clean up for exit.
pm->SetRenderModule(0);
pm->FinalizeInterpreter();
pm->Finalize();
pm->Delete();
pm = NULL;
......
......@@ -45,7 +45,7 @@ struct vtkProcessModuleInternals
};
//----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkProcessModule, "1.13");
vtkCxxRevisionMacro(vtkProcessModule, "1.14");
vtkCxxSetObjectMacro(vtkProcessModule, RenderModule, vtkPVRenderModule);
//----------------------------------------------------------------------------
......@@ -765,3 +765,17 @@ vtkCommand* vtkProcessModule::GetObserver()
return this->Observer;
}
//----------------------------------------------------------------------------
void vtkProcessModule::Initialize()
{
this->InitializeInterpreter();
}
//----------------------------------------------------------------------------
void vtkProcessModule::Finalize()
{
this->SetGUIHelper(0);
this->SetRenderModule(0);
this->FinalizeInterpreter();
}
......@@ -178,6 +178,11 @@ public:
virtual void FinalizeInterpreter();
//ETX
// Description:
// Initialize and finalize process module.
void Initialize();
void Finalize();
// Description:
// Set/Get whether to report errors from the Interpreter.
vtkGetMacro(ReportInterpreterErrors, int);
......
......@@ -148,7 +148,7 @@ int main(int argc, char* argv[])
pm->SetGUIHelper(helper);
helper->Delete();
pm->InitializeInterpreter();
pm->Initialize();
ParaViewInitializeInterpreter(pm);
// Start the application's event loop. This will enable
......@@ -161,8 +161,7 @@ int main(int argc, char* argv[])
startVal = pm->Start(new_argc, new_argv);
// Clean up for exit.
pm->SetRenderModule(0);
pm->FinalizeInterpreter();
pm->Finalize();
pm->Delete();
pm = NULL;
......
......@@ -160,7 +160,7 @@ int main(int argc, char* argv[])
vtkProcessModule* pm = vtkPVCreateProcessModule::CreateProcessModule(options);
pm->InitializeInterpreter();
pm->Initialize();
ParaViewInitializeInterpreter(pm);
// Start the application's event loop. This will enable
......@@ -173,8 +173,7 @@ int main(int argc, char* argv[])
startVal = pm->Start(new_argc, new_argv);
// Clean up for exit.
pm->SetRenderModule(0);
pm->FinalizeInterpreter();
pm->Finalize();
pm->Delete();
pm = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment