1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
6 <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2 (Linux)">
7 <META NAME="CREATED" CONTENT="20100112;18335600">
8 <META NAME="CHANGED" CONTENT="20100126;17235200">
9 <STYLE TYPE="text/css">
11 H2 { margin-top: 0.33in; margin-bottom: 0.08in; color: #ff0000; text-align: left }
12 H2.western { font-family: "Liberation Serif", serif; font-size: 14pt }
13 H2.cjk { font-family: "DejaVu Sans"; font-size: 14pt }
14 H2.ctl { font-family: "DejaVu Sans"; font-size: 14pt }
18 <BODY LANG="en-US" DIR="LTR">
19 <P ALIGN=CENTER><FONT SIZE=6><B>PARAVIS development</B></FONT></P>
20 <P ALIGN=CENTER><FONT SIZE=6><B>General architecture of PARAVIEW
21 extractor</B></FONT></P>
22 <H1 STYLE="page-break-before: always"><A NAME="1.Introduction|outline"></A>
23 <A HREF="#1.Introduction|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>1.Introduction</B></FONT></FONT></A></H1>
24 <P><A HREF="#2.General architecture|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>2.General
25 architecture</B></FONT></FONT></A></P>
26 <P><A HREF="#3.Automatic generation of container classes|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.Automatic
27 generation of container classes</B></FONT></FONT></A></P>
28 <H1><A NAME="3.1. Source files related to PARAVIS server definition|outline"></A>
29 <A HREF="#3.1. Source files related to PARAVIS server definition|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.1.
30 Source files related to PARAVIS server definition</B></FONT></FONT></A></H1>
31 <P><A HREF="#3.2. Process of generation|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.2.
32 Process of generation</B></FONT></FONT></A></P>
33 <P><A HREF="#3.3. Definition of IDL interfaces|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.3.
34 Definition of IDL interfaces</B></FONT></FONT></A></P>
35 <P><A HREF="#3.4. Base interface and its implementation|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.4.
36 Base interface and its implementation</B></FONT></FONT></A></P>
37 <H1><A NAME="3.5. GUI events queue|outline"></A><A HREF="#3.5. GUI events queue|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.5.
38 GUI events queue</B></FONT></FONT></A></H1>
39 <P><A HREF="#3.6. Overloaded methods definition|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.6.
40 Overloaded methods definition</B></FONT></FONT></A></P>
41 <P><A HREF="#3.7. Creation of objects in Python|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.7.
42 Creation of objects in Python</B></FONT></FONT></A></P>
43 <P><A HREF="#3.8. servermanager.py and simple.py|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.8.
44 servermanager.py and simple.py</B></FONT></FONT></A></P>
45 <P><A HREF="#4.Trace functionality|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>4.Trace
46 functionality</B></FONT></FONT></A></P>
52 <P>This document describes development of ParaView server manager API
53 for PARAVIS module. The new API must provide following features:</P>
55 <LI><P>Define interaction between two different processes: Python
56 console and PARAVIS GUI defined in SALOME desktop.</P>
57 <LI><P>Make possible to manage PARAVIS GUI and ParaView server data
58 from Python scripts in synchronized mode.</P>
59 <LI><P>The new API must be similar as much as possible to the API
60 provided by servermanager.py module from ParaView in order to make
61 possible launching the same scripts as in ParaView as in PARAVIS
62 without modifications.</P>
64 <P>General architecture and development features of this task are
66 <H1><A NAME="2.General architecture|outline"></A>General architecture</H1>
67 <P>Main components of PARAVIS architecture and their relations can be
68 represented as on the following picture:</P>
69 <P><IMG SRC="GeneralArchitecture_html_m4ed0a034.gif" NAME="graphics1" ALIGN=LEFT WIDTH=100% BORDER=0><BR CLEAR=LEFT><BR><BR>
71 <P>The usual way to implement SALOME module is to develop a
72 Data/Algorithms engine unit as a CORBA server and module GUI as a
73 CORBA client. But in case if we need to use GUI and Algorithms from
74 Python console (what usually is an external process) in synchronized
75 mode then we have to implement them together as a CORBA server within
77 <P>On the diagram above following component are shown:
80 <LI><P>PARAVIS module GUI which is responsible for creation of
81 necessary widgets within SALOME Desktop, initialization of ParaView
82 client objects, connection of ParaView GUI objects to created
84 <LI><P>ParaView client code is a set of ParaView objects what
85 provides ParaView GUI.</P>
86 <LI><P>ParaView server for PARAVIS module can be used as built-in
87 (by default) as remote. For connection to remote server it is
88 necessary to use corresponded menu commands connect/disconnect as it
89 is used in standard ParaView GUI client.</P>
90 <LI><P>ParaView server manager API is a set of classes provided by
91 ParaView for definition of API for Python interpreter.</P>
92 <LI><P>Container objects - implementation of CORBA servants for
93 wrapping server manager object instances and redirection of CORBA
94 interface calls to corresponded server manager object.</P>
96 <H1><A NAME="3.Automatic generation of container classes|outline"></A>
97 Automatic generation of container classes</H1>
98 <H2 CLASS="western">Source files related to PARAVIS server definition</H2>
99 <P STYLE="margin-bottom: 0in">In PARAVIS_SRC/idl/ directory:</P>
101 <LI><P><B>PARAVIS_Gen.idl</B> – defines main interfaces to PARAVIS
103 <LI><P><B>PARAVIS_Gen_Types.idl</B> – defines data collection
105 <LI><P><B>hints_paravis</B> – defines sizes of arrays missed in
106 standard VTK hints file. If some functions of VTK classes which
107 return array data are not extracted then it is necessary to edit
108 this file in order to describe missed functions.</P>
109 <LI><P><B>pythonIDL.py</B> – command file which is used for
110 extraction of IDL interfaces to Python files. This is modification
111 of similar file from omniidl product what takes into account
112 overloading of methods in class.</P>
113 <LI><P><B>vtkWrapIDL.c</B> – source file for building extraction
114 executables: <SPAN STYLE="font-weight: medium">vtkWrapIDL,
115 vtkWrapIDL_CC, vtkWrapIDL_HH.</SPAN></P>
117 <P STYLE="font-weight: medium">In PARAVIS_SRC/src/PVGUI directory:</P>
119 <LI><P><B>PARAVIS_Gen_i.cc</B> <SPAN STYLE="font-weight: medium">and
120 </SPAN><B>PARAVIS_Gen_i.hh</B> – <SPAN STYLE="font-weight: medium">implementation
121 of PARAVIS_Gen interface.</SPAN></P>
122 <LI><P><B>PV_Events.h</B> – <SPAN STYLE="font-weight: medium">defines
123 events for synchronization of CORBA client calls with main GUI
124 events queue.</SPAN></P>
125 <LI><P STYLE="font-weight: medium">Other files are related to GUI
126 definition and auxiliary tools.</P>
128 <P STYLE="font-weight: medium">In <SPAN STYLE="font-weight: medium">PARAVIS_SRC/src/PV_SWIG
129 directory:</SPAN></P>
131 <LI><P STYLE="font-weight: medium"><B>paravis.py</B> – <SPAN STYLE="font-weight: medium">general
132 Python module for PARAVIS. It installs connection to PARAVIS CORBA
133 server, defines a variable </SPAN><B>myParavis</B> <SPAN STYLE="font-weight: medium">in
134 order to provide acces to </SPAN><B>PARAVIS_Gen</B> <SPAN STYLE="font-weight: medium">functions,
135 creates a set of empty constructors for all extracted ParaView
137 <LI><P STYLE="font-weight: medium"><B>paravisSM.py</B> – <SPAN STYLE="font-weight: medium">modified
138 copy of servermanager.py module from ParaView. Modification done
139 according to conventions defined by paravis.py module and features
140 of working with CORBA server.</SPAN></P>
141 <LI><P STYLE="font-weight: medium"><B>pvsimple.py</B> – <SPAN STYLE="font-weight: medium">modified
142 copy of simple.py module from ParaView. Modifications done because
143 of the same reasons.</SPAN></P>
145 <H2 CLASS="western">Process of generation</H2>
146 <P>CORBA servant classes for wrapping of server manager API classes
147 is generated automatically. The process of building PARAVIS module
148 with generation of wrappers is performed in the following way:</P>
150 <LI><P>Call <B>build_configure</B> script. During performing of this
151 script it performs some standard steps of SALOME module building and
152 calls a Python command file <B>getwrapclasses.py</B> is called. This
153 procedure creates a list of ParaView and VTK class names what has to
154 be extracted. This list includes all <B>vtkSM*</B> classes and <B>vtk*
155 </B>classes what are referred by previous group of classes. Results
156 of build_configure step are:</P>
158 <LI><P>idl/wrap.am – defines variables what lists all interfaces
159 (*.idl and *.cc files) what will be generated.</P>
160 <LI><P>idl/vtkWrapIDL.h – defines a list of extracted classes in
161 form of char* array.</P>
162 <LI><P>src/PVGUI/wrap.am - defines variables what lists all servant
163 classes (*.hh and *.cc files) what will be generated.</P>
164 <LI><P>src/PVGUI/PARAVIS_CreateClass.cxx is a C++ file what
165 contains a one function CreateInstance. This function creates a
166 servant class which corresponds to a given name of original
167 ParaView/VTK class.</P>
169 <LI><P>Launch <B>configure</B> script from a build directory. This
170 step is similar to the same steps in other SALOME modules and does
171 not have any special related to automatic generation of CORBA
173 <LI><P>Call <B>make</B> command in build directory. This command
174 does following steps related to automatic generation:</P>
176 <LI><P>Builds <B>vtkWrapIDL</B> executable in <B>idl</B> directory
177 what is responsible for generation of IDL files using names of
178 classes to wrap. This executable analyzes related header files for
179 classes from vtkWrapIDL.h and defines corresponded IDL file.</P>
180 <LI><P>Defines all IDL files with help of this executable and
181 launches standard SALOME compilation for <B>idl</B> directory.</P>
182 <LI><P>Compiles <B>vtkWrapIDL_CC </B><SPAN STYLE="font-weight: medium">and
183 </SPAN><B>vtkWrapIDL_HH</B> <SPAN STYLE="font-weight: medium">executables
184 in src/PVGUI directory what are responsible for generation of
185 header files (*.hh) and implementation files (*.cc) for servants
187 <LI><P STYLE="font-weight: medium">Generation of servant classes
188 with help of these executables and building the library.</P>
190 <LI><P><SPAN STYLE="font-weight: medium">Call </SPAN><B>make install</B>
191 <SPAN STYLE="font-weight: medium">command in build directory. This
192 will finalize building of libraries and generate Python files for
193 IDL interfaces.</SPAN></P>
195 <P STYLE="font-weight: medium"><SPAN STYLE="background: transparent">Note:</SPAN></P>
196 <P STYLE="font-weight: medium"><SPAN STYLE="background: transparent">make
197 command can not be used with -j key because extraction of parent
198 classes should be done before extraction of child classes.</SPAN></P>
199 <H2 CLASS="western">Definition of IDL interfaces</H2>
200 <P>Process of IDL interfaces generation has to respect following
201 restrictions of IDL format:</P>
203 <LI><P>IDL does not support several functions with the same name
204 within a one interface definition. Even they have different
205 parameters (overloading of methods as in C++). Also this is not
206 supported between parent and its ancestors.</P>
207 <LI><P>In context of PARAVIS it is difficult to extract methods what
208 accept or return “void*” data type. In IDL it can be described
209 as “ANY” data type, but in context of ParaView it is not clear
210 to what type it has to be casted.</P>
212 <P>IDL interfaces extracted following to the next principals:</P>
214 <LI><P>All interfaces are inherited from a common parent interface
217 <LI><P>Each interface includes all extracted methods of its
218 prototype class including all its parents.</P>
219 <LI><P>If the prototype class contains overloaded methods (methods
220 with the same name) then each appearance of this method name is
221 supplied with index.</P>
222 <LI><P>If prototype class contains methods which return or accept
223 void* then these methods are ignored.</P>
224 <LI><P>If prototype class contains methods which return array (int*,
225 double*, ...) which size is not defined in “hints” or
226 “hints_paravis” files then these methods are ignored.</P>
227 <LI><P><SPAN STYLE="background: transparent">If prototype class
228 contains methods which get a pointer to function then these methods
229 are ignored.</SPAN></P>
230 <LI><P>If a method of prototype class returns/accepts a pointer on
231 ParaView/VTK class instance then interface will return/accept Base
234 <H2 CLASS="western">Base interface and its implementation</H2>
235 <P>Base interface is defined in order to satisfy following points:</P>
237 <LI><P>Sometimes we need to have a possibility to use a servant as a
238 pointer on a common interface.</P>
239 <LI><P>We need to have possibility to define a common auxiliary
240 methods for all generated interfaces which out of ParaView/VTK
242 <LI><P>We need to have a base implementation for all servant
245 <P>Currently Base class implements smart pointer on a vtkObjectBase
246 instance and several methods to Get/Set this pointer. By default each
247 ancestor class initializes this pointer with help of New() method.
248 This useful for classes what contain static methods. But after this
249 pointer can be reinitialized from outside what is used when we need
250 to have access to certain instance.</P>
251 <P>Also Base interface introduces a method IsSame(Base theOther). We
252 need this method when it is necessary to compare two ParaView objects
253 in Python process. In fact if we will apply standard operation “==”
254 then we will compare two wrapper instances instead of ParaView
255 objects instances. So, method IsSame(Base theOther) checks if two
256 wrappers refer to the same ParaView instance or not.</P>
257 <H2 CLASS="western">GUI events queue</H2>
258 <P>Some calls of server manager API functions cause a modification of
259 GUI state: creation of new widgets, update of widgets state,
260 visualization of presentable objects in viewers. In our case we have
261 two different processes: Python console and PARAVIS GUI. At the same
262 moment the Python console “manages” PARAVIS GUI with help of
263 server manager API functions calls. So, for correct performance of
264 Python scripts the calls of Python commands have to be synchronized
265 with PARAVIS GUI events queue.</P>
266 <P>For this purposes all calls to server manager API from servant are
267 additionally wrapped by event classes. Therefore implementation of
268 servants methods accords to following general template:</P>
270 <LI><P>Get an encapsulated pointer on VTK object instance.</P>
271 <LI><P>Create a special event instance for target function call.</P>
272 <LI><P>Launch event and wait while it returns.</P>
273 <LI><P>Get result from event (if result is supposed).</P>
274 <LI><P>Return this result as result of servant method.</P>
277 <P>Class vtkSMProxyManager has a method GetProxy. This method
278 implemented in corresponded servant class as following:</P>
279 <TABLE WIDTH=100% BORDER=1 BORDERCOLOR="#000000" CELLPADDING=3 CELLSPACING=0>
284 <TD WIDTH=5% BGCOLOR="#000080">
285 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>#</I></FONT></FONT></FONT></P>
287 <TD WIDTH=64% BGCOLOR="#000080">
288 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Code</I></FONT></FONT></FONT></P>
290 <TD WIDTH=31% BGCOLOR="#000080">
291 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Remarks</I></FONT></FONT></FONT></P>
295 <TD WIDTH=5% BGCOLOR="#4d4d4d">
296 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>1</I></FONT></FONT></FONT></P>
298 <TD WIDTH=64% BGCOLOR="#ffffff">
299 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>//C++:
300 vtkSMProxy *GetProxy (const char *groupname, const char *name);</I></FONT></FONT></FONT></P>
302 <TD WIDTH=31% BGCOLOR="#cccccc">
308 <TD WIDTH=5% BGCOLOR="#4d4d4d">
309 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>2</I></FONT></FONT></FONT></P>
311 <TD WIDTH=64% BGCOLOR="#ffffff">
312 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>struct
313 CreateEventName(GetProxy_0): public SALOME_Event</I></FONT></FONT></FONT></P>
315 <TD WIDTH=31% BGCOLOR="#cccccc">
316 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Generation
317 of unique event class name with help of a special macros</I></FONT></FONT></FONT></P>
321 <TD WIDTH=5% BGCOLOR="#4d4d4d">
322 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>3</I></FONT></FONT></FONT></P>
324 <TD WIDTH=64% BGCOLOR="#ffffff">
325 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>{</I></FONT></FONT></FONT></P>
327 <TD WIDTH=31% BGCOLOR="#cccccc">
333 <TD WIDTH=5% BGCOLOR="#4d4d4d">
334 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>4</I></FONT></FONT></FONT></P>
336 <TD WIDTH=64% BGCOLOR="#ffffff">
337 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
338 ::vtkSMProxy* TResult;</I></FONT></FONT></FONT></P>
340 <TD WIDTH=31% BGCOLOR="#cccccc">
346 <TD WIDTH=5% BGCOLOR="#4d4d4d">
347 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>5</I></FONT></FONT></FONT></P>
349 <TD WIDTH=64% BGCOLOR="#ffffff">
350 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TResult
351 myResult;</I></FONT></FONT></FONT></P>
353 <TD WIDTH=31% BGCOLOR="#cccccc">
354 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Definition
355 of the return type</I></FONT></FONT></FONT></P>
359 <TD WIDTH=5% BGCOLOR="#4d4d4d">
360 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>6</I></FONT></FONT></FONT></P>
362 <TD WIDTH=64% BGCOLOR="#ffffff">
363 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
364 ::vtkSMProxyManager* TObj;</I></FONT></FONT></FONT></P>
366 <TD WIDTH=31% BGCOLOR="#cccccc">
372 <TD WIDTH=5% BGCOLOR="#4d4d4d">
373 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>7</I></FONT></FONT></FONT></P>
375 <TD WIDTH=64% BGCOLOR="#ffffff">
376 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TObj
377 myObj;</I></FONT></FONT></FONT></P>
379 <TD WIDTH=31% BGCOLOR="#cccccc">
380 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Definition
381 of parameters</I></FONT></FONT></FONT></P>
385 <TD WIDTH=5% BGCOLOR="#4d4d4d">
386 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>8</I></FONT></FONT></FONT></P>
388 <TD WIDTH=64% BGCOLOR="#ffffff">
389 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
390 char* TParam0;</I></FONT></FONT></FONT></P>
392 <TD WIDTH=31% BGCOLOR="#cccccc">
398 <TD WIDTH=5% BGCOLOR="#4d4d4d">
399 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>9</I></FONT></FONT></FONT></P>
401 <TD WIDTH=64% BGCOLOR="#ffffff">
402 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TParam0
403 myParam0;</I></FONT></FONT></FONT></P>
405 <TD WIDTH=31% BGCOLOR="#cccccc">
411 <TD WIDTH=5% BGCOLOR="#4d4d4d">
412 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>10</I></FONT></FONT></FONT></P>
414 <TD WIDTH=64% BGCOLOR="#ffffff">
415 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
416 char* TParam1;</I></FONT></FONT></FONT></P>
418 <TD WIDTH=31% BGCOLOR="#cccccc">
424 <TD WIDTH=5% BGCOLOR="#4d4d4d">
425 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>11</I></FONT></FONT></FONT></P>
427 <TD WIDTH=64% BGCOLOR="#ffffff">
428 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TParam1
429 myParam1;</I></FONT></FONT></FONT></P>
431 <TD WIDTH=31% BGCOLOR="#cccccc">
437 <TD WIDTH=5% BGCOLOR="#4d4d4d">
438 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>12</I></FONT></FONT></FONT></P>
440 <TD WIDTH=64% BGCOLOR="#ffffff">
444 <TD WIDTH=31% BGCOLOR="#cccccc">
450 <TD WIDTH=5% BGCOLOR="#4d4d4d">
451 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>13</I></FONT></FONT></FONT></P>
453 <TD WIDTH=64% BGCOLOR="#ffffff">
454 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>CreateEventName(GetProxy_0)(TObj
455 theObj, TParam0 theParam0, TParam1 theParam1):</I></FONT></FONT></FONT></P>
457 <TD WIDTH=31% BGCOLOR="#cccccc">
458 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Constructor
459 of event. Defines object instance and necessary parameters</I></FONT></FONT></FONT></P>
463 <TD WIDTH=5% BGCOLOR="#4d4d4d">
464 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>14</I></FONT></FONT></FONT></P>
466 <TD WIDTH=64% BGCOLOR="#ffffff">
467 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>myObj(theObj),
468 myParam0(theParam0), myParam1(theParam1)</I></FONT></FONT></FONT></P>
470 <TD WIDTH=31% BGCOLOR="#cccccc">
476 <TD WIDTH=5% BGCOLOR="#4d4d4d">
477 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>15</I></FONT></FONT></FONT></P>
479 <TD WIDTH=64% BGCOLOR="#ffffff">
480 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>{
481 }</I></FONT></FONT></FONT></P>
483 <TD WIDTH=31% BGCOLOR="#cccccc">
489 <TD WIDTH=5% BGCOLOR="#4d4d4d">
490 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>16</I></FONT></FONT></FONT></P>
492 <TD WIDTH=64% BGCOLOR="#ffffff">
496 <TD WIDTH=31% BGCOLOR="#cccccc">
502 <TD WIDTH=5% BGCOLOR="#4d4d4d">
503 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>17</I></FONT></FONT></FONT></P>
505 <TD WIDTH=64% BGCOLOR="#ffffff">
506 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>virtual
507 void Execute()</I></FONT></FONT></FONT></P>
509 <TD WIDTH=31% BGCOLOR="#cccccc">
510 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Execution
511 method.</I></FONT></FONT></FONT></P>
515 <TD WIDTH=5% BGCOLOR="#4d4d4d">
516 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>18</I></FONT></FONT></FONT></P>
518 <TD WIDTH=64% BGCOLOR="#ffffff">
519 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>{</I></FONT></FONT></FONT></P>
521 <TD WIDTH=31% BGCOLOR="#cccccc">
527 <TD WIDTH=5% BGCOLOR="#4d4d4d">
528 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>19</I></FONT></FONT></FONT></P>
530 <TD WIDTH=64% BGCOLOR="#ffffff">
531 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>myResult
532 = myObj->GetProxy(myParam0, myParam1);</I></FONT></FONT></FONT></P>
534 <TD WIDTH=31% BGCOLOR="#cccccc">
535 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Call
536 of target method</I></FONT></FONT></FONT></P>
540 <TD WIDTH=5% BGCOLOR="#4d4d4d">
541 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>20</I></FONT></FONT></FONT></P>
543 <TD WIDTH=64% BGCOLOR="#ffffff">
544 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}</I></FONT></FONT></FONT></P>
546 <TD WIDTH=31% BGCOLOR="#cccccc">
552 <TD WIDTH=5% BGCOLOR="#4d4d4d">
553 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>21</I></FONT></FONT></FONT></P>
555 <TD WIDTH=64% BGCOLOR="#ffffff">
556 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>};</I></FONT></FONT></FONT></P>
558 <TD WIDTH=31% BGCOLOR="#cccccc">
564 <TD WIDTH=5% BGCOLOR="#4d4d4d">
565 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>22</I></FONT></FONT></FONT></P>
567 <TD WIDTH=64% BGCOLOR="#ffffff">
568 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>//</I></FONT></FONT></FONT></P>
570 <TD WIDTH=31% BGCOLOR="#cccccc">
576 <TD WIDTH=5% BGCOLOR="#4d4d4d">
577 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>23</I></FONT></FONT></FONT></P>
579 <TD WIDTH=64% BGCOLOR="#ffffff">
580 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>PARAVIS_Base_ptr
581 vtkSMProxyManager_i::GetProxy_0 (const char *temp0, const char
582 *temp1) {</I></FONT></FONT></FONT></P>
584 <TD WIDTH=31% BGCOLOR="#cccccc">
585 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Implementation
586 of servant method</I></FONT></FONT></FONT></P>
590 <TD WIDTH=5% BGCOLOR="#4d4d4d">
591 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>24</I></FONT></FONT></FONT></P>
593 <TD WIDTH=64% BGCOLOR="#ffffff">
594 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>try
595 {</I></FONT></FONT></FONT></P>
597 <TD WIDTH=31% BGCOLOR="#cccccc">
603 <TD WIDTH=5% BGCOLOR="#4d4d4d">
604 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>25</I></FONT></FONT></FONT></P>
606 <TD WIDTH=64% BGCOLOR="#ffffff">
607 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>char
608 *c_temp0 = CORBA::string_dup(temp0);</I></FONT></FONT></FONT></P>
610 <TD WIDTH=31% BGCOLOR="#cccccc">
611 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Getting
612 parameters</I></FONT></FONT></FONT></P>
616 <TD WIDTH=5% BGCOLOR="#4d4d4d">
617 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>26</I></FONT></FONT></FONT></P>
619 <TD WIDTH=64% BGCOLOR="#ffffff">
620 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>char
621 *c_temp1 = CORBA::string_dup(temp1);</I></FONT></FONT></FONT></P>
623 <TD WIDTH=31% BGCOLOR="#cccccc">
629 <TD WIDTH=5% BGCOLOR="#4d4d4d">
630 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>27</I></FONT></FONT></FONT></P>
632 <TD WIDTH=64% BGCOLOR="#ffffff">
633 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>::vtkSMProxy*
634 avtkSMProxy = (getVTKObject() != NULL) ? ProcessEvent(new
635 CreateEventName(GetProxy_0)((::vtkSMProxyManager*)getVTKObject(),
636 c_temp0 , c_temp1)):NULL;</I></FONT></FONT></FONT></P>
638 <TD WIDTH=31% BGCOLOR="#cccccc">
639 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>If
640 wrapped object is defined then create event and launch it. Finally
641 it will return result.</I></FONT></FONT></FONT></P>
645 <TD WIDTH=5% BGCOLOR="#4d4d4d">
646 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>28</I></FONT></FONT></FONT></P>
648 <TD WIDTH=64% BGCOLOR="#ffffff">
652 <TD WIDTH=31% BGCOLOR="#cccccc">
658 <TD WIDTH=5% BGCOLOR="#4d4d4d">
659 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>29</I></FONT></FONT></FONT></P>
661 <TD WIDTH=64% BGCOLOR="#ffffff">
662 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>if(avtkSMProxy
663 == NULL) {</I></FONT></FONT></FONT></P>
665 <TD WIDTH=31% BGCOLOR="#cccccc">
671 <TD WIDTH=5% BGCOLOR="#4d4d4d">
672 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>30</I></FONT></FONT></FONT></P>
674 <TD WIDTH=64% BGCOLOR="#ffffff">
675 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
676 PARAVIS::vtkSMProxy::_nil();</I></FONT></FONT></FONT></P>
678 <TD WIDTH=31% BGCOLOR="#cccccc">
684 <TD WIDTH=5% BGCOLOR="#4d4d4d">
685 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>31</I></FONT></FONT></FONT></P>
687 <TD WIDTH=64% BGCOLOR="#ffffff">
688 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}</I></FONT></FONT></FONT></P>
690 <TD WIDTH=31% BGCOLOR="#cccccc">
696 <TD WIDTH=5% BGCOLOR="#4d4d4d">
697 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>32</I></FONT></FONT></FONT></P>
699 <TD WIDTH=64% BGCOLOR="#ffffff">
700 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>PARAVIS_Base_i*
701 aPtr = ::CreateInstance(<FONT COLOR="#000000"><SPAN STYLE="text-decoration: none"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><SPAN STYLE="font-weight: medium">avtkSMProxy</SPAN></FONT></FONT></SPAN></FONT>,
702 avtkSMProxy->GetClassName());</I></FONT></FONT></FONT></P>
704 <TD WIDTH=31% BGCOLOR="#cccccc">
705 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Create
706 a wrapper (servant) class according to class name of result object</I></FONT></FONT></FONT></P>
710 <TD WIDTH=5% BGCOLOR="#4d4d4d">
711 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>33</I></FONT></FONT></FONT></P>
713 <TD WIDTH=64% BGCOLOR="#ffffff">
714 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>aPtr->Init(avtkSMProxy);</I></FONT></FONT></FONT></P>
716 <TD WIDTH=31% BGCOLOR="#cccccc">
717 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Initialize
718 the internal pointer of wrapper class by result</I></FONT></FONT></FONT></P>
722 <TD WIDTH=5% BGCOLOR="#4d4d4d">
723 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>34</I></FONT></FONT></FONT></P>
725 <TD WIDTH=64% BGCOLOR="#ffffff">
726 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
727 aPtr->_this();</I></FONT></FONT></FONT></P>
729 <TD WIDTH=31% BGCOLOR="#cccccc">
730 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Return
731 wrapper instance as result</I></FONT></FONT></FONT></P>
735 <TD WIDTH=5% BGCOLOR="#4d4d4d">
736 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>35</I></FONT></FONT></FONT></P>
738 <TD WIDTH=64% BGCOLOR="#ffffff">
739 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}
740 catch(...) {</I></FONT></FONT></FONT></P>
742 <TD WIDTH=31% BGCOLOR="#cccccc">
748 <TD WIDTH=5% BGCOLOR="#4d4d4d">
749 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>36</I></FONT></FONT></FONT></P>
751 <TD WIDTH=64% BGCOLOR="#ffffff">
752 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>MESSAGE("GetProxy
753 - Unknown exception was occurred!!!");</I></FONT></FONT></FONT></P>
755 <TD WIDTH=31% BGCOLOR="#cccccc">
761 <TD WIDTH=5% BGCOLOR="#4d4d4d">
762 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>37</I></FONT></FONT></FONT></P>
764 <TD WIDTH=64% BGCOLOR="#ffffff">
765 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
766 PARAVIS::vtkSMProxy::_nil();</I></FONT></FONT></FONT></P>
768 <TD WIDTH=31% BGCOLOR="#cccccc">
774 <TD WIDTH=5% BGCOLOR="#4d4d4d">
775 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>38</I></FONT></FONT></FONT></P>
777 <TD WIDTH=64% BGCOLOR="#ffffff">
778 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}</I></FONT></FONT></FONT></P>
780 <TD WIDTH=31% BGCOLOR="#cccccc">
786 <TD WIDTH=5% BGCOLOR="#4d4d4d">
787 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#ffffff"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>39</I></FONT></FONT></FONT></P>
789 <TD WIDTH=64% BGCOLOR="#cccccc">
790 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}</I></FONT></FONT></FONT></P>
792 <TD WIDTH=31% BGCOLOR="#cccccc">
798 <P STYLE="margin-bottom: 0in"><BR>
800 <H2 CLASS="western">Overloaded methods definition</H2>
801 <P>Classes of ParaView server manager API have overloaded methods. As
802 it is mentioned above description of IDL interface prohibits using of
803 the same name for various methods even they have different
804 parameters. To avoid this limitation we have to add index to name in
805 each appearance of overloaded method. But at Python script level it
806 is necessary to avoid using of function names with indexes. It is
807 necessary to provide possibility to use methods as they was defined
808 in API of corresponded class.</P>
809 <P>For tis purposes we redefined standard IDL to Python wrapping in
810 order to add a function which has a name of overloaded method and
811 accepts any parameters. This function analyzes input parameters and
812 selects what function (with which index) it has to be called.</P>
814 <P>vtkObject class contains definition of overloaded functions:</P>
815 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void RemoveObservers
816 (unsigned long event);</I></FONT></P>
817 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void RemoveObservers
818 (const char *event);</I></FONT></P>
819 <P STYLE="margin-bottom: 0in"><BR>
821 <P STYLE="margin-bottom: 0in">In IDL interface these function will be
823 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void _RemoveObservers_0
824 (in long temp0);</I></FONT></P>
825 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void _RemoveObservers_1
826 (in string temp0);</I></FONT></P>
827 <P STYLE="margin-bottom: 0in"><BR>
829 <P STYLE="margin-bottom: 0in; font-style: normal">These functions
830 will be wrapped by standard IDL to Python wrapper as it is (with
831 indexes). But we need to call this function in Python as they were
832 defined in vtkObject definition – by name “RemoveObservers”.
833 For this purposes we modify IDL to Python wrapper in order to add the
834 following function:</P>
835 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>def
836 RemoveObservers(self, *args):</I></FONT></P>
837 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>if len(args) == 1 and
838 (type(args[0]) in [IntType, LongType]):</I></FONT></P>
839 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>return
840 self.RemoveObservers_0(*args)</I></FONT></P>
841 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>if len(args) == 1 and
842 (type(args[0]) in [StringType]):</I></FONT></P>
843 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>return
844 self.RemoveObservers_1(*args)</I></FONT></P>
845 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>print 'Warning: The
846 corresponding method of RemoveObservers group is not found for ' +
847 str(args)</I></FONT></P>
848 <P STYLE="margin-bottom: 0in"><BR>
850 <P STYLE="margin-bottom: 0in">After this we can use function
851 RemoveObserves in Python as it was defined without indexes.</P>
852 <H2 CLASS="western">Creation of objects in Python</H2>
853 <P>Creation of CORBA object on client side is not so trivial as
854 usually. When client requests a creation of object then it has to be
858 <LI><P>CORBA client object instance on client side,
860 <LI><P>CORBA servant instance on server side
862 <LI><P>and both of them are connected to each other across CORBA
866 <P STYLE="margin-bottom: 0.08in">More simplest way is to request an
867 object from PARAVIS server interface <B>PARAVIS_Gen</B>. For this
868 purposes a method <B>CreateClass</B> function in <B>PARAVIS_Gen
869 </B>interface is defined. Also there is a function <B>GetClassesList</B>
870 which returns list of names of extracted classes. Both these methods
871 let to define a set of functions which looks like an object
872 constructor for all extracted classes.
874 <P STYLE="margin-bottom: 0.08in">These definitions done in paravis.py
875 module with help of createConstructors function. Result of this
876 function is a set of functions which looks like vtkClassName(). These
877 functions return an object instance which wraps a pointer on
878 requested class vtkClassName instance with corresponded API.</P>
879 <P STYLE="margin-bottom: 0.08in">For example call in Python console</P>
880 <P STYLE="margin-bottom: 0.08in"><FONT SIZE=2><I>> a =
881 vtkSMProxyManager()</I></FONT></P>
882 <P STYLE="margin-bottom: 0.08in">returns an instance of
883 PARAVIS_Gen_vtkSMProxyManager object on client side which implements
884 all methods of vtkSMProxyManager class readdressing them to
885 incapsulated vtkSMProxyManager instance on server side.</P>
886 <H2 CLASS="western">servermanager.py and simple.py</H2>
887 <P STYLE="margin-bottom: 0.08in">In ParaView Python API is defined
888 with help of two modules servermanager.py and simple.py. PARAVIS has
889 corresponded modules paravisSM.py and pvsimple.py. Because of actions
890 described above we got a set of Python interfaces which is very close
891 to original Python API of ParaView. So, PARAVIS Python modules have
892 fiew modifications in comparison to original ones. These
893 modifications mainly related to:</P>
895 <LI><P STYLE="margin-bottom: 0.08in">Already mentioned problem with
896 “==” operation to wrapper classes.</P>
897 <LI><P STYLE="margin-bottom: 0.08in">Impossibility to use observers.</P>
898 <LI><P STYLE="margin-bottom: 0.08in">Reimplementation of hidden code
899 existing in ParaView which is called in Python console on its
901 <LI><P STYLE="margin-bottom: 0.08in">Providing access to Trace
904 <H1><A NAME="4.Trace functionality|outline"></A>Trace functionality</H1>
905 <P>Trace functionality in PARAVIS module is defined in GUI of module
906 using already existing Python functions in ParaView.</P>
907 <P>Because this trace functionality is used for “Dump Study”
908 functionality defined in SALOME then tracing is started automatically
909 on loading of PARAVIS module and registers all actions during whole
910 session. In case if there are no necessity tracing can be switched
911 off in preferences dialog box. But it is necessary to take into
912 account that dumping of study can't be done for PARAVIS module in
914 <P>To check the trace content there are two functions defined in
915 pvsimple.py module and accessible in SALOME Python console:</P>
917 <LI><P>PrintTrace() - this function prints trace directly to Python
919 <LI><P>SaveTrace(fileName) – this function outputs trace into disk
920 file according to given name.</P>
922 <H1>Connection with other SALOME modules</H1>
923 <P>According to SALOME general architecture each module independs
924 from other modules by default. In general case adding of module to
925 module dependency can be caused by necessity to transfer some data
926 from one module to another. In this case a module consumer has to
927 “know” about API of module supplier what is going to be used. If
928 this API is not defined on a general module level then we have to use
929 direct connection to module object instance what implements a
931 <P>In general algorithm of connected to a module-supplier API on a
932 module-consumer side looks like following:</P>
934 <LI><P>Find and load a module-supplier component CORBA object from
936 <LI><P>Get a module-supplier engine from the component.</P>
937 <LI><P>Using of the engine to get necessary data.</P>