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