Salome HOME
20475bcb38ff4729d821720166c2b0b6e10d0d65
[modules/yacs.git] / src / engine_swig / pilot.i
1 // Copyright (C) 2006-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 %define DOCSTRING
21 "All is needed to create and execute a calculation schema."
22 %enddef
23
24 %module(docstring=DOCSTRING) pilot
25
26 #ifndef SWIGIMPORTED
27 //work around SWIG bug #1863647
28 #if SWIG_VERSION >= 0x010336
29 #define SwigPyIterator pilot_PySwigIterator
30 #else
31 #define PySwigIterator pilot_PySwigIterator
32 #endif
33 #endif
34
35 %feature("autodoc", "1");
36
37 %include "engtypemaps.i"
38
39 #ifdef DOXYGEN_IS_OK
40 %include docengine.i
41 #endif
42
43 %{
44 #include "Any.hxx"
45 #include "TypeCode.hxx"
46 #include "ComponentDefinition.hxx"
47 #include "Visitor.hxx"
48 #include "VisitorSaveSchema.hxx"
49 #include "VisitorSaveState.hxx"
50 #include "LinkInfo.hxx"
51 #include "Catalog.hxx"
52 #include "Executor.hxx"
53 #include "ExecutorSwig.hxx"
54 #include "Dispatcher.hxx"
55 #include "Container.hxx"
56 #include "HomogeneousPoolContainer.hxx"
57 #include "Logger.hxx"
58 #include "DeploymentTree.hxx"
59 #include "ComponentInstance.hxx"
60 #include "DataNode.hxx"
61 #include "PlayGround.hxx"
62 #include "SetOfPoints.hxx"
63 #include "PointVisitor.hxx"
64 #include "ForkBlocPoint.hxx"
65 #include "LinkedBlocPoint.hxx"
66 #include "ElementaryPoint.hxx"
67 #include "ObserverAsPlugin.hxx"
68   
69 using namespace YACS::ENGINE;
70
71 %}
72
73 %init
74 %{
75   // init section
76 #ifdef OMNIORB
77   PyObject* omnipy = PyImport_ImportModule((char*)"_omnipy");
78   if (!omnipy)
79   {
80     PyErr_SetString(PyExc_ImportError,(char*)"Cannot import _omnipy");
81     return NULL;
82   }
83   PyObject* pyapi = PyObject_GetAttrString(omnipy, (char*)"API");
84   api = (omniORBpyAPI*)PyCapsule_GetPointer(pyapi,"_omnipy.API");
85   Py_DECREF(pyapi);
86 #endif
87 %}
88
89 %ignore YACS::ENGINE::Any::operator[];
90 %ignore YACS::ENGINE::TypeCode::operator=;
91 %ignore YACS::ENGINE::DeploymentTree::operator=;
92 %ignore operator<<;
93 %ignore YACS::ENGINE::Runtime::_tc_double;
94 %ignore YACS::ENGINE::Runtime::_tc_int;
95 %ignore YACS::ENGINE::Runtime::_tc_bool;
96 %ignore YACS::ENGINE::Runtime::_tc_string;
97 %ignore YACS::ENGINE::Runtime::_tc_file;
98 %rename(StateLoader) YACS::ENGINE::StateLoader; // to suppress a 503 warning
99 %rename(NbDoneLoader) YACS::ENGINE::NbDoneLoader; // to suppress a 503 warning
100 %rename(getRuntime) YACS::ENGINE::getRuntime; // to suppress a 503 warning
101 %rename(_from) YACS::ENGINE::DataLinkInfo::from ; // to suppress a 314 warning
102 %rename(_from) YACS::ENGINE::StreamLinkInfo::from ; // to suppress a 314 warning
103
104 /*
105  * Template section
106  */
107 %template()              std::pair<std::string, YACS::ENGINE::TypeCode *>;
108 %template()              std::pair<std::string, YACS::ENGINE::Node *>;
109 %template()              std::pair<std::string, YACS::ENGINE::InlineNode *>;
110 %template()              std::pair<std::string, YACS::ENGINE::ServiceNode *>;
111 %template()              std::pair<std::string, YACS::ENGINE::Container *>;
112 %template()              std::pair<YACS::ENGINE::OutPort *,YACS::ENGINE::InPort *>;
113 %template()              std::pair<YACS::ENGINE::InPort *,YACS::ENGINE::OutPort *>;
114 %template()              std::pair< std::string, int >;
115 %template(ItPy3TC)       IteratorPy3<YACS::ENGINE::TypeCode *>;
116 //%template(TCmap)         std::map<std::string, YACS::ENGINE::TypeCode *>;
117 REFCOUNT_TEMPLATE(TCmap,YACS::ENGINE::TypeCode)
118 %template(NODEmap)       std::map<std::string, YACS::ENGINE::Node *>;
119 %template(INODEmap)      std::map<std::string, YACS::ENGINE::InlineNode *>;
120 %template(SNODEmap)      std::map<std::string, YACS::ENGINE::ServiceNode *>;
121 //%template(CONTAINmap)    std::map<std::string, YACS::ENGINE::Container *>;
122 %template(ItPy3Cont)     IteratorPy3<YACS::ENGINE::Container * >;
123 REFCOUNT_TEMPLATE(CONTAINmap,YACS::ENGINE::Container)
124 %template(strvec)        std::vector<std::string>;
125 %template(uivec)         std::vector<unsigned int>;
126 %template(ivec)          std::vector<int>;
127 %template(linksvec)      std::vector< std::pair<YACS::ENGINE::OutPort *,YACS::ENGINE::InPort *> >;
128 %template(linkvec)       std::vector< std::pair<YACS::ENGINE::InPort *,YACS::ENGINE::OutPort *> >;
129 %template(instreamlist)  std::list<YACS::ENGINE::InputDataStreamPort *>;
130 %template(outstreamlist) std::list<YACS::ENGINE::OutputDataStreamPort *>;
131 %template(vpsi)          std::vector< std::pair< std::string, int > >;
132           
133 %template()              std::pair<std::string, YACS::ENGINE::CatalogLoader *>;
134 %template(loadermap)     std::map<std::string,YACS::ENGINE::CatalogLoader *>;
135 %template()              std::pair<std::string, YACS::ENGINE::ComposedNode *>;
136 %template(composedmap)   std::map<std::string,YACS::ENGINE::ComposedNode *>;
137 %template()              std::pair<std::string, YACS::ENGINE::ComponentDefinition *>;
138 %template(compomap)      std::map<std::string, YACS::ENGINE::ComponentDefinition *>;
139 %template()              std::pair<std::string, std::string>;
140 %template(propmap)       std::map<std::string, std::string>;
141 %template(ItPy3Comp)     IteratorPy3<YACS::ENGINE::ComponentInstance *>;
142 REFCOUNT_TEMPLATE(CompoInstmap,YACS::ENGINE::ComponentInstance)
143
144 %include "exception.i"
145
146 /*
147  * End of Template section
148  */
149
150 %typemap(out) Container *
151 {
152   $result=convertContainer($1,$owner);
153 }
154
155 %typemap(out) YACS::ENGINE::Container *
156 {
157   $result=convertContainer($1,$owner);
158 }
159
160 /*
161  * Ownership section
162  */
163 //Take ownership : it is not the default (constructor) as it is a factory
164 %newobject *::createProc;
165 %newobject *::createScriptNode;
166 %newobject *::createFuncNode;
167 %newobject *::createRefNode;
168 %newobject *::createCompoNode;
169 %newobject *::createSInlineNode;
170 %newobject *::createInDataNode;
171 %newobject *::createOutDataNode;
172 %newobject *::createBloc;
173 %newobject *::createForLoop;
174 %newobject *::createForEachLoop;
175 %newobject *::createWhileLoop;
176 %newobject *::createSwitch;
177 %newobject *::loadCatalog;
178 %newobject *::createComponentInstance;
179 %newobject *::createContainer;
180
181
182 %newobject *::createInputPort;
183 %newobject *::createOutputPort;
184 %newobject *::createInputDataStreamPort;
185 %newobject *::createOutputDataStreamPort;
186 %newobject *::clone;
187 %newobject *::cloneAlways;
188 %newobject *::cloneWithoutCompAndContDeepCpy;
189 %newobject *::New;
190
191 //Take ownership : transfer it from C++ (has to be completed)
192 %newobject YACS::ENGINE::Loop::edRemoveNode;
193 %newobject YACS::ENGINE::Switch::edReleaseDefaultNode;
194 %newobject YACS::ENGINE::Switch::edReleaseCase;
195 %newobject YACS::ENGINE::DynParaLoop::edRemoveNode;
196 %newobject YACS::ENGINE::DynParaLoop::edRemoveInitNode;
197 //No other way to do ??
198 %feature("pythonappend") YACS::ENGINE::Bloc::edRemoveChild(Node *node)%{
199         args[1].thisown=1
200 %}
201
202 %newobject *::createSequenceTc;
203 %newobject *::createInterfaceTc;
204 %newobject *::createStructTc;
205 %newobject *::createType;
206
207 %newobject YACS::ENGINE::SequenceAny::removeUnsetItemsFromThis;
208
209 %newobject YACS::ENGINE::TypeCode::interfaceTc;
210 %newobject YACS::ENGINE::TypeCode::sequenceTc;
211 %newobject YACS::ENGINE::TypeCode::structTc;
212
213 /*
214  * End of ownership section
215  */
216
217
218 %include <define.hxx>
219 %include <YACSBasesExport.hxx>
220 %include <Exception.hxx>
221 %include <YACSlibEngineExport.hxx>
222 %include <ConversionException.hxx>
223 %include <Runtime.hxx>
224 %include <PropertyInterface.hxx>
225
226 PYEXCEPTION(YACS::ENGINE::Executor::RunW)
227 PYEXCEPTION(YACS::ENGINE::Executor::RunB)
228 PYEXCEPTION(YACS::ENGINE::Executor::setExecMode)
229 PYEXCEPTION(YACS::ENGINE::Executor::resumeCurrentBreakPoint)
230 PYEXCEPTION(YACS::ENGINE::Executor::stopExecution)
231 PYEXCEPTION(YACS::ENGINE::Executor::waitPause)
232 PYEXCEPTION(YACS::ENGINE::ComponentInstance::load)
233
234 %include <Executor.hxx>
235
236 EXCEPTION(YACS::ENGINE::ExecutorSwig::RunPy)
237 EXCEPTION(YACS::ENGINE::ExecutorSwig::waitPause)
238 %include <ExecutorSwig.hxx>
239
240 %include <RefCounter.hxx>
241
242 %include <Any.hxx>
243
244 %ignore YACS::ENGINE::TypeCode::getOrBuildAnyFromZippedData;
245 %include <TypeCode.hxx>
246
247 %include <Scheduler.hxx>
248 %include <Task.hxx>
249 %include <Dispatcher.hxx>
250 %include <DeploymentTree.hxx>
251 %include <Port.hxx>
252 %extend YACS::ENGINE::Port
253 {
254   /* __cmp__ does not exist in Python 3 */
255   int  __lt__(Port* other)
256     {
257       if(self==other)
258         return 0;
259       else 
260         return 1;
261     }
262   int  __gt__(Port* other)
263     {
264       if(self==other)
265         return 0;
266       else 
267         return 1;
268     }
269   int __ne__(Port* other)
270     {
271       if(self==other)
272         return 0;
273       else 
274         return 1;
275     }
276   int __eq__(Port* other)
277     {
278       if(self==other)
279         return 0;
280       else 
281         return 1;
282     }
283   int __le__(Port* other)
284     {
285       if(self==other)
286         return 0;
287       else 
288         return 1;
289     }
290   int __ge__(Port* other)
291     {
292       if(self==other)
293         return 0;
294       else 
295         return 1;
296     }
297   
298   long ptr()
299     {
300       return (long)self;
301     }
302 }
303 %include <DataPort.hxx>
304 %include <InPort.hxx>
305 %include <OutPort.hxx>
306 %include <InGate.hxx>
307 %include <OutGate.hxx>
308 %include <DataFlowPort.hxx>
309 %include <DataStreamPort.hxx>
310
311 %include <LinkInfo.hxx>
312 %include <Logger.hxx>
313
314 %include <ComponentInstance.hxx>
315 %include <Container.hxx>
316 %include <HomogeneousPoolContainer.hxx>
317 %include <InputPort.hxx>
318 %extend YACS::ENGINE::InputPort
319 {
320   void edInitXML(const char * s)
321     {
322       self->edInit("XML",s);
323     }
324   void edInitPy(PyObject* ob)
325     {
326       self->edInit("Python",ob);
327     }
328 }
329 %include <InPropertyPort.hxx>
330 %extend YACS::ENGINE::InPropertyPort
331 {
332   void edInitXML(const char * s)
333     {
334       self->edInit("XML",s);
335     }
336   void edInitPy(PyObject* ob)
337     {
338       self->edInit("Python",ob);
339     }
340 }
341
342 %template(edInitInt)       YACS::ENGINE::InputPort::edInit<int>;
343 %template(edInitBool)      YACS::ENGINE::InputPort::edInit<bool>;
344 %template(edInitString)    YACS::ENGINE::InputPort::edInit<std::string>;
345 %template(edInitDbl)       YACS::ENGINE::InputPort::edInit<double>;
346
347 %include <AnyInputPort.hxx>
348 %include <ConditionInputPort.hxx>
349 %include <OutputPort.hxx>
350 %include <AnyOutputPort.hxx>
351 %include <InputDataStreamPort.hxx>
352 %include <OutputDataStreamPort.hxx>
353 %include <DataPort.hxx>
354
355 %include <Node.hxx>
356 %extend YACS::ENGINE::Node 
357 {
358   /* __cmp__ does not exist in Python 3 */
359   int  __lt__(Node* other)
360     {
361       if(self==other)
362         return 0;
363       else 
364         return 1;
365     }
366   int  __gt__(Node* other)
367     {
368       if(self==other)
369         return 0;
370       else 
371         return 1;
372     }
373   int __ne__(Node* other)
374     {
375       if(self==other)
376         return 0;
377       else 
378         return 1;
379     }
380   int __eq__(Node* other)
381     {
382       if(self==other)
383         return 0;
384       else 
385         return 1;
386     }
387   int __le__(Node* other)
388     {
389       if(self==other)
390         return 0;
391       else 
392         return 1;
393     }
394   int __ge__(Node* other)
395     {
396       if(self==other)
397         return 0;
398       else 
399         return 1;
400     }
401
402   long ptr()
403     {
404           return (long)self;
405     }
406 }
407 %include <ComplexWeight.hxx>
408 %include <ElementaryNode.hxx>
409 %include <InlineNode.hxx>
410 %include <ServiceNode.hxx>
411 %include <ServiceInlineNode.hxx>
412 %include <ServerNode.hxx>
413 %include <DataNode.hxx>
414
415 %include <ComposedNode.hxx>
416 %include <StaticDefinedComposedNode.hxx>
417 %include <Bloc.hxx>
418 %include <Proc.hxx>
419
420 %include <Loop.hxx>
421 %include <ForLoop.hxx>
422 %include <DynParaLoop.hxx>
423 %include <WhileLoop.hxx>
424 %include <ForEachLoop.hxx>
425 %include <OptimizerLoop.hxx>
426 %include <Switch.hxx>
427 %include <Visitor.hxx>
428 %include <VisitorSaveSchema.hxx>
429 %include <ComponentDefinition.hxx>
430 %include <Catalog.hxx>
431 %include <Pool.hxx>
432
433 %include <AlternateThread.hxx>
434 %include <AlternateThreadPT.hxx>
435
436 // Ignore class OptimizerAlgASync to avoid confusion with class
437 // OptimizerAlgASync in module SALOMERuntime
438 %ignore YACS::ENGINE::OptimizerAlgASync;
439 %include <OptimizerAlg.hxx>
440 %include "PlayGround.i"
441
442 %extend YACS::ENGINE::ConditionInputPort
443 {
444   bool getPyObj()
445   {
446     return self->getValue();
447   }
448 }
449 %extend YACS::ENGINE::Any
450 {
451   PyObject *getBytes()
452   {
453     YACS::ENGINE::AtomAny *self2(dynamic_cast<YACS::ENGINE::AtomAny *>(self));
454     if(!self2)
455       throw YACS::Exception("getBytes : self is not an AtomAny !");
456     std::size_t len(0);
457     const char *pt(self2->getBytesValue(len));
458     return PyBytes_FromStringAndSize(pt,len);
459   }
460 }
461
462 %extend YACS::ENGINE::AnyInputPort
463 {
464   PyObject * getPyObj()
465   {
466     return (PyObject *)getRuntime()->convertNeutral(self->edGetType(),self->getValue());
467   }
468 }
469
470 %extend YACS::ENGINE::AnyOutputPort
471 {
472   PyObject * getPyObj()
473   {
474     return (PyObject *)getRuntime()->convertNeutral(self->edGetType(),self->getValue());
475   }
476 }
477
478 %extend YACS::ENGINE::Any
479 {
480   PyObject *getPyObj()
481   {
482     return (PyObject *)getRuntime()->convertNeutral(const_cast<YACS::ENGINE::TypeCode *>(self->getType()),self);
483   }
484 }
485
486 %newobject YACS::ENGINE::SequenceAny::__getitem__;
487 %extend YACS::ENGINE::SequenceAny
488 {
489   Any* __getitem__(int i)
490   {
491     if (i < self->size())
492       {
493         AnyPtr a=(*self)[i];
494         a->incrRef();
495         return a;
496       }
497     else
498       throw std::length_error("index too large");
499   }
500 }
501
502 %newobject YACS::ENGINE::StructAny::__getitem__;
503 %extend YACS::ENGINE::StructAny
504 {
505   Any* __getitem__(const char * key)
506   {
507     AnyPtr a=(*self)[key];
508     a->incrRef();
509     return a;
510   }
511 }
512
513 %extend YACS::ENGINE::ForEachLoop
514 {
515   PyObject *getPassedResults(Executor *execut) const
516   {
517     std::vector<SequenceAny *> ret1;
518     std::vector<std::string> ret2;
519     std::vector<unsigned int> ret0(self->getPassedResults(execut,ret1,ret2));
520     PyObject *ret(PyTuple_New(3));
521     // param 0
522     PyObject *ret0Py(PyList_New(ret0.size()));
523     for(std::size_t i=0;i<ret0.size();i++)
524       PyList_SetItem(ret0Py,i,PyLong_FromLong(ret0[i]));
525     PyTuple_SetItem(ret,0,ret0Py);
526     // param 1
527     PyObject *ret1Py(PyList_New(ret1.size()));
528     for(std::size_t i=0;i<ret1.size();i++)
529       PyList_SetItem(ret1Py,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret1[i]),SWIGTYPE_p_YACS__ENGINE__SequenceAny, SWIG_POINTER_OWN | 0 ));
530     PyTuple_SetItem(ret,1,ret1Py);
531     // param 2
532     PyObject *ret2Py(PyList_New(ret2.size()));
533     for(std::size_t i=0;i<ret2.size();i++)
534       PyList_SetItem(ret2Py,i,PyUnicode_FromString(ret2[i].c_str()));
535     PyTuple_SetItem(ret,2,ret2Py);
536     return ret;
537   }
538
539   void assignPassedResults(const std::vector<unsigned int>& passedIds, PyObject *passedOutputs, const std::vector<std::string>& nameOfOutputs)
540   {
541     std::vector<SequenceAny *> passedOutputsCpp;
542     convertFromPyObjVectorOfObj<YACS::ENGINE::SequenceAny *>(passedOutputs,SWIGTYPE_p_YACS__ENGINE__SequenceAny,"SequenceAny",passedOutputsCpp);
543     self->assignPassedResults(passedIds,passedOutputsCpp,nameOfOutputs);
544   }
545 }
546
547 namespace YACS
548 {
549   namespace ENGINE
550   {
551     class AbstractPoint
552     {
553     protected:
554       virtual ~AbstractPoint();
555       AbstractPoint();
556       AbstractPoint(const AbstractPoint&);
557     };
558
559     class ElementaryPoint : public AbstractPoint
560     {
561     public:
562       Node *getFirstNode();
563     private:
564       ~ElementaryPoint();
565       ElementaryPoint();
566       ElementaryPoint(const ElementaryPoint&);
567     };
568
569     class BlocPoint : public AbstractPoint
570     {
571     protected:
572       ~BlocPoint();
573       BlocPoint();
574       BlocPoint(const BlocPoint&);
575     };
576
577     class LinkedBlocPoint : public BlocPoint
578     {
579     private:
580       ~LinkedBlocPoint();
581       LinkedBlocPoint();
582       LinkedBlocPoint(const LinkedBlocPoint&);
583     };
584
585     class ForkBlocPoint : public BlocPoint
586     {
587     private:
588       ~ForkBlocPoint();
589       ForkBlocPoint();
590       ForkBlocPoint(const ForkBlocPoint&);
591     };
592     
593     class SetOfPoints
594     {
595     public:
596       SetOfPoints(const std::list<Node *>& nodes);
597       ~SetOfPoints();
598       void simplify();
599       std::string getRepr() const;
600       %extend
601       {
602       void accept(PyObject *pv)
603       {
604         class MyPointVisitor : public YACS::ENGINE::PointVisitor
605         {
606         public:
607           MyPointVisitor(PyObject *py):_py(py) { }
608           void beginForkBlocPoint(ForkBlocPoint *pt)
609           {
610             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__ForkBlocPoint,0));
611             PyObject *meth(PyString_FromString("beginForkBlocPoint"));
612             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
613             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
614           }
615           void endForkBlocPoint(ForkBlocPoint *pt)
616           {
617             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__ForkBlocPoint,0));
618             PyObject *meth(PyString_FromString("endForkBlocPoint"));
619             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
620             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
621           }
622           void beginLinkedBlocPoint(LinkedBlocPoint *pt)
623           {
624             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__LinkedBlocPoint,0));
625             PyObject *meth(PyString_FromString("beginLinkedBlocPoint"));
626             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
627             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
628           }
629           void endLinkedBlocPoint(LinkedBlocPoint *pt)
630           {
631             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__LinkedBlocPoint,0));
632             PyObject *meth(PyString_FromString("endLinkedBlocPoint"));
633             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
634             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
635           }
636           void beginElementaryPoint(ElementaryPoint *pt)
637           {
638             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__ElementaryPoint,0));//$descriptor(YACS::ENGINE::ElementaryPoint *)
639             PyObject *meth(PyString_FromString("beginElementaryPoint"));
640             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
641             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
642           }
643           void endElementaryPoint(ElementaryPoint *pt)
644           {
645             PyObject *ptPy(SWIG_NewPointerObj((void*)pt,SWIGTYPE_p_YACS__ENGINE__ElementaryPoint,0));
646             PyObject *meth(PyString_FromString("endElementaryPoint"));
647             PyObject *ret(PyObject_CallMethodObjArgs(_py,meth,ptPy,nullptr));
648             Py_XDECREF(ret); Py_XDECREF(meth); Py_XDECREF(ptPy);
649           }
650         private:
651           PyObject *_py;
652         };
653         MyPointVisitor mpv(pv);
654         self->accept(&mpv);
655         }
656       }
657     };
658   }
659 }
660
661 %rename(LoadObserversPluginIfAny) LoadObserversPluginIfAnySwig;
662 %rename(UnLoadObserversPluginIfAny) UnLoadObserversPluginIfAnySwig;
663                                   
664 %inline{
665   void LoadObserversPluginIfAnySwig(YACS::ENGINE::ComposedNode *rootNode, YACS::ENGINE::ExecutorSwig *executor)
666   {
667     YACS::ENGINE::LoadObserversPluginIfAny(rootNode,executor);
668   }
669
670   void UnLoadObserversPluginIfAnySwig()
671   {
672     YACS::ENGINE::UnLoadObserversPluginIfAny();
673   }
674 }