Salome HOME
Fix the python API of the savestate feature.
[modules/yacs.git] / src / runtime / VisitorSalomeSaveState.cxx
index 589f76db1f0f76ebe58007ede60dcf71fda751ad..b0957cf9363b98110f6b10a018f122096e03eeba 100644 (file)
@@ -111,24 +111,13 @@ void VisitorSalomeSaveState::visitForEachLoop(ForEachLoop *node)
   _out << "  </node>" << std::endl;
 }
 
-
-SchemaSaveState::SchemaSaveState(Proc* proc, Executor* exec)
-: _p(proc),
-  _exec(exec)
-{
-  YASSERT(_p);
-  YASSERT(_exec);
-}
-
-SchemaSaveState::~SchemaSaveState()
-{
-}
-
-void SchemaSaveState::save(std::string xmlSchemaFile)
+void YACS::ENGINE::schemaSaveState(Proc* proc,
+                                  Executor* exec,
+                                  const std::string& xmlSchemaFile)
 {
-  YACS::BASES::AutoLocker<YACS::BASES::Mutex> alck(&(_exec->getTheMutexForSchedulerUpdate()));
-  VisitorSalomeSaveState vss(_p);
+  YACS::BASES::AutoLocker<YACS::BASES::Mutex> alck(&(exec->getTheMutexForSchedulerUpdate()));
+  VisitorSalomeSaveState vss(proc);
   vss.openFileDump(xmlSchemaFile);
-  _p->accept(&vss);
+  proc->accept(&vss);
   vss.closeFileDump();
 }