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>Execute <B>cmake</B> command from a build directory.
151 During performing of this command it performs some standard steps
152 of SALOME module building and calls a Python command file
153 <B>getwrapclasses.py</B> is called. This procedure creates a list
154 of ParaView and VTK class names what has to be extracted.
155 This list includes all <B>vtkSM*</B> classes and <B>vtk*</B> classes
156 what are referred by previous group of classes. Results
157 of build_configure step are:</P>
159 <LI><P>idl/wrap.cmake – defines variables what lists all interfaces
160 (*.idl and *.cc files) what will be generated.</P>
161 <LI><P>idl/vtkWrapIDL.c – defines a list of extracted classes in
162 form of char* array.</P>
163 <LI><P>src/PVGUI/PARAVIS_CreateClass.cxx is a C++ file what
164 contains a one function CreateInstance. This function creates a
165 servant class which corresponds to a given name of original
166 ParaView/VTK class.</P>
168 <LI><P>Call <B>make</B> command in build directory. This command
169 does following steps related to automatic generation:</P>
171 <LI><P>Builds <B>vtkWrapIDL</B> executable in <B>idl</B> directory
172 what is responsible for generation of IDL files using names of
173 classes to wrap. This executable analyzes related header files for
174 classes from vtkWrapIDL.h and defines corresponded IDL file.</P>
175 <LI><P>Defines all IDL files with help of this executable and
176 launches standard SALOME compilation for <B>idl</B> directory.</P>
177 <LI><P>Compiles <B>vtkWrapIDL_CC </B><SPAN STYLE="font-weight: medium">and
178 </SPAN><B>vtkWrapIDL_HH</B> <SPAN STYLE="font-weight: medium">executables
179 in src/PVGUI directory what are responsible for generation of
180 header files (*.hh) and implementation files (*.cc) for servants
182 <LI><P STYLE="font-weight: medium">Generation of servant classes
183 with help of these executables and building the library.</P>
185 <LI><P><SPAN STYLE="font-weight: medium">Call </SPAN><B>make install</B>
186 <SPAN STYLE="font-weight: medium">command in build directory. This
187 will finalize building of libraries and generate Python files for
188 IDL interfaces.</SPAN></P>
190 <P STYLE="font-weight: medium"><SPAN STYLE="background: transparent">Note:</SPAN></P>
191 <P STYLE="font-weight: medium"><SPAN STYLE="background: transparent">make
192 command can not be used with -j key because extraction of parent
193 classes should be done before extraction of child classes.</SPAN></P>
194 <H2 CLASS="western">Definition of IDL interfaces</H2>
195 <P>Process of IDL interfaces generation has to respect following
196 restrictions of IDL format:</P>
198 <LI><P>IDL does not support several functions with the same name
199 within a one interface definition. Even they have different
200 parameters (overloading of methods as in C++). Also this is not
201 supported between parent and its ancestors.</P>
202 <LI><P>In context of PARAVIS it is difficult to extract methods what
203 accept or return “void*” data type. In IDL it can be described
204 as “ANY” data type, but in context of ParaView it is not clear
205 to what type it has to be casted.</P>
207 <P>IDL interfaces extracted following to the next principals:</P>
209 <LI><P>All interfaces are inherited from a common parent interface
212 <LI><P>Each interface includes all extracted methods of its
213 prototype class including all its parents.</P>
214 <LI><P>If the prototype class contains overloaded methods (methods
215 with the same name) then each appearance of this method name is
216 supplied with index.</P>
217 <LI><P>If prototype class contains methods which return or accept
218 void* then these methods are ignored.</P>
219 <LI><P>If prototype class contains methods which return array (int*,
220 double*, ...) which size is not defined in “hints” or
221 “hints_paravis” files then these methods are ignored.</P>
222 <LI><P><SPAN STYLE="background: transparent">If prototype class
223 contains methods which get a pointer to function then these methods
224 are ignored.</SPAN></P>
225 <LI><P>If a method of prototype class returns/accepts a pointer on
226 ParaView/VTK class instance then interface will return/accept Base
229 <H2 CLASS="western">Base interface and its implementation</H2>
230 <P>Base interface is defined in order to satisfy following points:</P>
232 <LI><P>Sometimes we need to have a possibility to use a servant as a
233 pointer on a common interface.</P>
234 <LI><P>We need to have possibility to define a common auxiliary
235 methods for all generated interfaces which out of ParaView/VTK
237 <LI><P>We need to have a base implementation for all servant
240 <P>Currently Base class implements smart pointer on a vtkObjectBase
241 instance and several methods to Get/Set this pointer. By default each
242 ancestor class initializes this pointer with help of New() method.
243 This useful for classes what contain static methods. But after this
244 pointer can be reinitialized from outside what is used when we need
245 to have access to certain instance.</P>
246 <P>Also Base interface introduces a method IsSame(Base theOther). We
247 need this method when it is necessary to compare two ParaView objects
248 in Python process. In fact if we will apply standard operation “==”
249 then we will compare two wrapper instances instead of ParaView
250 objects instances. So, method IsSame(Base theOther) checks if two
251 wrappers refer to the same ParaView instance or not.</P>
252 <H2 CLASS="western">GUI events queue</H2>
253 <P>Some calls of server manager API functions cause a modification of
254 GUI state: creation of new widgets, update of widgets state,
255 visualization of presentable objects in viewers. In our case we have
256 two different processes: Python console and PARAVIS GUI. At the same
257 moment the Python console “manages” PARAVIS GUI with help of
258 server manager API functions calls. So, for correct performance of
259 Python scripts the calls of Python commands have to be synchronized
260 with PARAVIS GUI events queue.</P>
261 <P>For this purposes all calls to server manager API from servant are
262 additionally wrapped by event classes. Therefore implementation of
263 servants methods accords to following general template:</P>
265 <LI><P>Get an encapsulated pointer on VTK object instance.</P>
266 <LI><P>Create a special event instance for target function call.</P>
267 <LI><P>Launch event and wait while it returns.</P>
268 <LI><P>Get result from event (if result is supposed).</P>
269 <LI><P>Return this result as result of servant method.</P>
272 <P>Class vtkSMProxyManager has a method GetProxy. This method
273 implemented in corresponded servant class as following:</P>
274 <TABLE WIDTH=100% BORDER=1 BORDERCOLOR="#000000" CELLPADDING=3 CELLSPACING=0>
279 <TD WIDTH=5% BGCOLOR="#000080">
280 <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>
282 <TD WIDTH=64% BGCOLOR="#000080">
283 <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>
285 <TD WIDTH=31% BGCOLOR="#000080">
286 <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>
290 <TD WIDTH=5% BGCOLOR="#4d4d4d">
291 <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>
293 <TD WIDTH=64% BGCOLOR="#ffffff">
294 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>//C++:
295 vtkSMProxy *GetProxy (const char *groupname, const char *name);</I></FONT></FONT></FONT></P>
297 <TD WIDTH=31% BGCOLOR="#cccccc">
303 <TD WIDTH=5% BGCOLOR="#4d4d4d">
304 <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>
306 <TD WIDTH=64% BGCOLOR="#ffffff">
307 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>struct
308 CreateEventName(GetProxy_0): public SALOME_Event</I></FONT></FONT></FONT></P>
310 <TD WIDTH=31% BGCOLOR="#cccccc">
311 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Generation
312 of unique event class name with help of a special macros</I></FONT></FONT></FONT></P>
316 <TD WIDTH=5% BGCOLOR="#4d4d4d">
317 <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>
319 <TD WIDTH=64% BGCOLOR="#ffffff">
320 <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>
322 <TD WIDTH=31% BGCOLOR="#cccccc">
328 <TD WIDTH=5% BGCOLOR="#4d4d4d">
329 <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>
331 <TD WIDTH=64% BGCOLOR="#ffffff">
332 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
333 ::vtkSMProxy* TResult;</I></FONT></FONT></FONT></P>
335 <TD WIDTH=31% BGCOLOR="#cccccc">
341 <TD WIDTH=5% BGCOLOR="#4d4d4d">
342 <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>
344 <TD WIDTH=64% BGCOLOR="#ffffff">
345 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TResult
346 myResult;</I></FONT></FONT></FONT></P>
348 <TD WIDTH=31% BGCOLOR="#cccccc">
349 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Definition
350 of the return type</I></FONT></FONT></FONT></P>
354 <TD WIDTH=5% BGCOLOR="#4d4d4d">
355 <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>
357 <TD WIDTH=64% BGCOLOR="#ffffff">
358 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
359 ::vtkSMProxyManager* TObj;</I></FONT></FONT></FONT></P>
361 <TD WIDTH=31% BGCOLOR="#cccccc">
367 <TD WIDTH=5% BGCOLOR="#4d4d4d">
368 <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>
370 <TD WIDTH=64% BGCOLOR="#ffffff">
371 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TObj
372 myObj;</I></FONT></FONT></FONT></P>
374 <TD WIDTH=31% BGCOLOR="#cccccc">
375 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Definition
376 of parameters</I></FONT></FONT></FONT></P>
380 <TD WIDTH=5% BGCOLOR="#4d4d4d">
381 <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>
383 <TD WIDTH=64% BGCOLOR="#ffffff">
384 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
385 char* TParam0;</I></FONT></FONT></FONT></P>
387 <TD WIDTH=31% BGCOLOR="#cccccc">
393 <TD WIDTH=5% BGCOLOR="#4d4d4d">
394 <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>
396 <TD WIDTH=64% BGCOLOR="#ffffff">
397 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TParam0
398 myParam0;</I></FONT></FONT></FONT></P>
400 <TD WIDTH=31% BGCOLOR="#cccccc">
406 <TD WIDTH=5% BGCOLOR="#4d4d4d">
407 <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>
409 <TD WIDTH=64% BGCOLOR="#ffffff">
410 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>typedef
411 char* TParam1;</I></FONT></FONT></FONT></P>
413 <TD WIDTH=31% BGCOLOR="#cccccc">
419 <TD WIDTH=5% BGCOLOR="#4d4d4d">
420 <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>
422 <TD WIDTH=64% BGCOLOR="#ffffff">
423 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>TParam1
424 myParam1;</I></FONT></FONT></FONT></P>
426 <TD WIDTH=31% BGCOLOR="#cccccc">
432 <TD WIDTH=5% BGCOLOR="#4d4d4d">
433 <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>
435 <TD WIDTH=64% BGCOLOR="#ffffff">
439 <TD WIDTH=31% BGCOLOR="#cccccc">
445 <TD WIDTH=5% BGCOLOR="#4d4d4d">
446 <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>
448 <TD WIDTH=64% BGCOLOR="#ffffff">
449 <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
450 theObj, TParam0 theParam0, TParam1 theParam1):</I></FONT></FONT></FONT></P>
452 <TD WIDTH=31% BGCOLOR="#cccccc">
453 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Constructor
454 of event. Defines object instance and necessary parameters</I></FONT></FONT></FONT></P>
458 <TD WIDTH=5% BGCOLOR="#4d4d4d">
459 <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>
461 <TD WIDTH=64% BGCOLOR="#ffffff">
462 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>myObj(theObj),
463 myParam0(theParam0), myParam1(theParam1)</I></FONT></FONT></FONT></P>
465 <TD WIDTH=31% BGCOLOR="#cccccc">
471 <TD WIDTH=5% BGCOLOR="#4d4d4d">
472 <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>
474 <TD WIDTH=64% BGCOLOR="#ffffff">
475 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>{
476 }</I></FONT></FONT></FONT></P>
478 <TD WIDTH=31% BGCOLOR="#cccccc">
484 <TD WIDTH=5% BGCOLOR="#4d4d4d">
485 <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>
487 <TD WIDTH=64% BGCOLOR="#ffffff">
491 <TD WIDTH=31% BGCOLOR="#cccccc">
497 <TD WIDTH=5% BGCOLOR="#4d4d4d">
498 <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>
500 <TD WIDTH=64% BGCOLOR="#ffffff">
501 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>virtual
502 void Execute()</I></FONT></FONT></FONT></P>
504 <TD WIDTH=31% BGCOLOR="#cccccc">
505 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Execution
506 method.</I></FONT></FONT></FONT></P>
510 <TD WIDTH=5% BGCOLOR="#4d4d4d">
511 <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>
513 <TD WIDTH=64% BGCOLOR="#ffffff">
514 <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>
516 <TD WIDTH=31% BGCOLOR="#cccccc">
522 <TD WIDTH=5% BGCOLOR="#4d4d4d">
523 <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>
525 <TD WIDTH=64% BGCOLOR="#ffffff">
526 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>myResult
527 = myObj->GetProxy(myParam0, myParam1);</I></FONT></FONT></FONT></P>
529 <TD WIDTH=31% BGCOLOR="#cccccc">
530 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Call
531 of target method</I></FONT></FONT></FONT></P>
535 <TD WIDTH=5% BGCOLOR="#4d4d4d">
536 <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>
538 <TD WIDTH=64% BGCOLOR="#ffffff">
539 <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>
541 <TD WIDTH=31% BGCOLOR="#cccccc">
547 <TD WIDTH=5% BGCOLOR="#4d4d4d">
548 <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>
550 <TD WIDTH=64% BGCOLOR="#ffffff">
551 <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>
553 <TD WIDTH=31% BGCOLOR="#cccccc">
559 <TD WIDTH=5% BGCOLOR="#4d4d4d">
560 <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>
562 <TD WIDTH=64% BGCOLOR="#ffffff">
563 <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>
565 <TD WIDTH=31% BGCOLOR="#cccccc">
571 <TD WIDTH=5% BGCOLOR="#4d4d4d">
572 <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>
574 <TD WIDTH=64% BGCOLOR="#ffffff">
575 <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
576 vtkSMProxyManager_i::GetProxy_0 (const char *temp0, const char
577 *temp1) {</I></FONT></FONT></FONT></P>
579 <TD WIDTH=31% BGCOLOR="#cccccc">
580 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Implementation
581 of servant method</I></FONT></FONT></FONT></P>
585 <TD WIDTH=5% BGCOLOR="#4d4d4d">
586 <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>
588 <TD WIDTH=64% BGCOLOR="#ffffff">
589 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>try
590 {</I></FONT></FONT></FONT></P>
592 <TD WIDTH=31% BGCOLOR="#cccccc">
598 <TD WIDTH=5% BGCOLOR="#4d4d4d">
599 <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>
601 <TD WIDTH=64% BGCOLOR="#ffffff">
602 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>char
603 *c_temp0 = CORBA::string_dup(temp0);</I></FONT></FONT></FONT></P>
605 <TD WIDTH=31% BGCOLOR="#cccccc">
606 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Getting
607 parameters</I></FONT></FONT></FONT></P>
611 <TD WIDTH=5% BGCOLOR="#4d4d4d">
612 <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>
614 <TD WIDTH=64% BGCOLOR="#ffffff">
615 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>char
616 *c_temp1 = CORBA::string_dup(temp1);</I></FONT></FONT></FONT></P>
618 <TD WIDTH=31% BGCOLOR="#cccccc">
624 <TD WIDTH=5% BGCOLOR="#4d4d4d">
625 <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>
627 <TD WIDTH=64% BGCOLOR="#ffffff">
628 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>::vtkSMProxy*
629 avtkSMProxy = (getVTKObject() != NULL) ? ProcessEvent(new
630 CreateEventName(GetProxy_0)((::vtkSMProxyManager*)getVTKObject(),
631 c_temp0 , c_temp1)):NULL;</I></FONT></FONT></FONT></P>
633 <TD WIDTH=31% BGCOLOR="#cccccc">
634 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>If
635 wrapped object is defined then create event and launch it. Finally
636 it will return result.</I></FONT></FONT></FONT></P>
640 <TD WIDTH=5% BGCOLOR="#4d4d4d">
641 <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>
643 <TD WIDTH=64% BGCOLOR="#ffffff">
647 <TD WIDTH=31% BGCOLOR="#cccccc">
653 <TD WIDTH=5% BGCOLOR="#4d4d4d">
654 <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>
656 <TD WIDTH=64% BGCOLOR="#ffffff">
657 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>if(avtkSMProxy
658 == NULL) {</I></FONT></FONT></FONT></P>
660 <TD WIDTH=31% BGCOLOR="#cccccc">
666 <TD WIDTH=5% BGCOLOR="#4d4d4d">
667 <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>
669 <TD WIDTH=64% BGCOLOR="#ffffff">
670 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
671 PARAVIS::vtkSMProxy::_nil();</I></FONT></FONT></FONT></P>
673 <TD WIDTH=31% BGCOLOR="#cccccc">
679 <TD WIDTH=5% BGCOLOR="#4d4d4d">
680 <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>
682 <TD WIDTH=64% BGCOLOR="#ffffff">
683 <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>
685 <TD WIDTH=31% BGCOLOR="#cccccc">
691 <TD WIDTH=5% BGCOLOR="#4d4d4d">
692 <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>
694 <TD WIDTH=64% BGCOLOR="#ffffff">
695 <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*
696 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>,
697 avtkSMProxy->GetClassName());</I></FONT></FONT></FONT></P>
699 <TD WIDTH=31% BGCOLOR="#cccccc">
700 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Create
701 a wrapper (servant) class according to class name of result object</I></FONT></FONT></FONT></P>
705 <TD WIDTH=5% BGCOLOR="#4d4d4d">
706 <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>
708 <TD WIDTH=64% BGCOLOR="#ffffff">
709 <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>
711 <TD WIDTH=31% BGCOLOR="#cccccc">
712 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Initialize
713 the internal pointer of wrapper class by result</I></FONT></FONT></FONT></P>
717 <TD WIDTH=5% BGCOLOR="#4d4d4d">
718 <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>
720 <TD WIDTH=64% BGCOLOR="#ffffff">
721 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
722 aPtr->_this();</I></FONT></FONT></FONT></P>
724 <TD WIDTH=31% BGCOLOR="#cccccc">
725 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>Return
726 wrapper instance as result</I></FONT></FONT></FONT></P>
730 <TD WIDTH=5% BGCOLOR="#4d4d4d">
731 <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>
733 <TD WIDTH=64% BGCOLOR="#ffffff">
734 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>}
735 catch(...) {</I></FONT></FONT></FONT></P>
737 <TD WIDTH=31% BGCOLOR="#cccccc">
743 <TD WIDTH=5% BGCOLOR="#4d4d4d">
744 <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>
746 <TD WIDTH=64% BGCOLOR="#ffffff">
747 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>MESSAGE("GetProxy
748 - Unknown exception was occurred!!!");</I></FONT></FONT></FONT></P>
750 <TD WIDTH=31% BGCOLOR="#cccccc">
756 <TD WIDTH=5% BGCOLOR="#4d4d4d">
757 <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>
759 <TD WIDTH=64% BGCOLOR="#ffffff">
760 <P ALIGN=LEFT STYLE="font-weight: medium; text-decoration: none"><FONT COLOR="#000000"><FONT FACE="Liberation Serif, serif"><FONT SIZE=2><I>return
761 PARAVIS::vtkSMProxy::_nil();</I></FONT></FONT></FONT></P>
763 <TD WIDTH=31% BGCOLOR="#cccccc">
769 <TD WIDTH=5% BGCOLOR="#4d4d4d">
770 <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>
772 <TD WIDTH=64% BGCOLOR="#ffffff">
773 <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>
775 <TD WIDTH=31% BGCOLOR="#cccccc">
781 <TD WIDTH=5% BGCOLOR="#4d4d4d">
782 <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>
784 <TD WIDTH=64% BGCOLOR="#cccccc">
785 <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>
787 <TD WIDTH=31% BGCOLOR="#cccccc">
793 <P STYLE="margin-bottom: 0in"><BR>
795 <H2 CLASS="western">Overloaded methods definition</H2>
796 <P>Classes of ParaView server manager API have overloaded methods. As
797 it is mentioned above description of IDL interface prohibits using of
798 the same name for various methods even they have different
799 parameters. To avoid this limitation we have to add index to name in
800 each appearance of overloaded method. But at Python script level it
801 is necessary to avoid using of function names with indexes. It is
802 necessary to provide possibility to use methods as they was defined
803 in API of corresponded class.</P>
804 <P>For tis purposes we redefined standard IDL to Python wrapping in
805 order to add a function which has a name of overloaded method and
806 accepts any parameters. This function analyzes input parameters and
807 selects what function (with which index) it has to be called.</P>
809 <P>vtkObject class contains definition of overloaded functions:</P>
810 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void RemoveObservers
811 (unsigned long event);</I></FONT></P>
812 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void RemoveObservers
813 (const char *event);</I></FONT></P>
814 <P STYLE="margin-bottom: 0in"><BR>
816 <P STYLE="margin-bottom: 0in">In IDL interface these function will be
818 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void _RemoveObservers_0
819 (in long temp0);</I></FONT></P>
820 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>void _RemoveObservers_1
821 (in string temp0);</I></FONT></P>
822 <P STYLE="margin-bottom: 0in"><BR>
824 <P STYLE="margin-bottom: 0in; font-style: normal">These functions
825 will be wrapped by standard IDL to Python wrapper as it is (with
826 indexes). But we need to call this function in Python as they were
827 defined in vtkObject definition – by name “RemoveObservers”.
828 For this purposes we modify IDL to Python wrapper in order to add the
829 following function:</P>
830 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>def
831 RemoveObservers(self, *args):</I></FONT></P>
832 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>if len(args) == 1 and
833 (type(args[0]) in [IntType, LongType]):</I></FONT></P>
834 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>return
835 self.RemoveObservers_0(*args)</I></FONT></P>
836 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>if len(args) == 1 and
837 (type(args[0]) in [StringType]):</I></FONT></P>
838 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>return
839 self.RemoveObservers_1(*args)</I></FONT></P>
840 <P STYLE="margin-bottom: 0in"><FONT SIZE=2><I>print 'Warning: The
841 corresponding method of RemoveObservers group is not found for ' +
842 str(args)</I></FONT></P>
843 <P STYLE="margin-bottom: 0in"><BR>
845 <P STYLE="margin-bottom: 0in">After this we can use function
846 RemoveObserves in Python as it was defined without indexes.</P>
847 <H2 CLASS="western">Creation of objects in Python</H2>
848 <P>Creation of CORBA object on client side is not so trivial as
849 usually. When client requests a creation of object then it has to be
853 <LI><P>CORBA client object instance on client side,
855 <LI><P>CORBA servant instance on server side
857 <LI><P>and both of them are connected to each other across CORBA
861 <P STYLE="margin-bottom: 0.08in">More simplest way is to request an
862 object from PARAVIS server interface <B>PARAVIS_Gen</B>. For this
863 purposes a method <B>CreateClass</B> function in <B>PARAVIS_Gen
864 </B>interface is defined. Also there is a function <B>GetClassesList</B>
865 which returns list of names of extracted classes. Both these methods
866 let to define a set of functions which looks like an object
867 constructor for all extracted classes.
869 <P STYLE="margin-bottom: 0.08in">These definitions done in paravis.py
870 module with help of createConstructors function. Result of this
871 function is a set of functions which looks like vtkClassName(). These
872 functions return an object instance which wraps a pointer on
873 requested class vtkClassName instance with corresponded API.</P>
874 <P STYLE="margin-bottom: 0.08in">For example call in Python console</P>
875 <P STYLE="margin-bottom: 0.08in"><FONT SIZE=2><I>> a =
876 vtkSMProxyManager()</I></FONT></P>
877 <P STYLE="margin-bottom: 0.08in">returns an instance of
878 PARAVIS_Gen_vtkSMProxyManager object on client side which implements
879 all methods of vtkSMProxyManager class readdressing them to
880 incapsulated vtkSMProxyManager instance on server side.</P>
881 <H2 CLASS="western">servermanager.py and simple.py</H2>
882 <P STYLE="margin-bottom: 0.08in">In ParaView Python API is defined
883 with help of two modules servermanager.py and simple.py. PARAVIS has
884 corresponded modules paravisSM.py and pvsimple.py. Because of actions
885 described above we got a set of Python interfaces which is very close
886 to original Python API of ParaView. So, PARAVIS Python modules have
887 fiew modifications in comparison to original ones. These
888 modifications mainly related to:</P>
890 <LI><P STYLE="margin-bottom: 0.08in">Already mentioned problem with
891 “==” operation to wrapper classes.</P>
892 <LI><P STYLE="margin-bottom: 0.08in">Impossibility to use observers.</P>
893 <LI><P STYLE="margin-bottom: 0.08in">Reimplementation of hidden code
894 existing in ParaView which is called in Python console on its
896 <LI><P STYLE="margin-bottom: 0.08in">Providing access to Trace
899 <H1><A NAME="4.Trace functionality|outline"></A>Trace functionality</H1>
900 <P>Trace functionality in PARAVIS module is defined in GUI of module
901 using already existing Python functions in ParaView.</P>
902 <P>Because this trace functionality is used for “Dump Study”
903 functionality defined in SALOME then tracing is started automatically
904 on loading of PARAVIS module and registers all actions during whole
905 session. In case if there are no necessity tracing can be switched
906 off in preferences dialog box. But it is necessary to take into
907 account that dumping of study can't be done for PARAVIS module in
909 <P>To check the trace content there are two functions defined in
910 pvsimple.py module and accessible in SALOME Python console:</P>
912 <LI><P>PrintTrace() - this function prints trace directly to Python
914 <LI><P>SaveTrace(fileName) – this function outputs trace into disk
915 file according to given name.</P>
917 <H1>Connection with other SALOME modules</H1>
918 <P>According to SALOME general architecture each module independs
919 from other modules by default. In general case adding of module to
920 module dependency can be caused by necessity to transfer some data
921 from one module to another. In this case a module consumer has to
922 “know” about API of module supplier what is going to be used. If
923 this API is not defined on a general module level then we have to use
924 direct connection to module object instance what implements a
926 <P>In general algorithm of connected to a module-supplier API on a
927 module-consumer side looks like following:</P>
929 <LI><P>Find and load a module-supplier component CORBA object from
931 <LI><P>Get a module-supplier engine from the component.</P>
932 <LI><P>Using of the engine to get necessary data.</P>