Salome HOME
Starting doc
[modules/paravis.git] / doc / GeneralArchitecture.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML>
3 <HEAD>
4         <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
5         <TITLE></TITLE>
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">
10         <!--
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 }
15         -->
16         </STYLE>
17 </HEAD>
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>
47 <P><BR><BR>
48 </P>
49 <P><BR><BR>
50 </P>
51 <H1>Introduction</H1>
52 <P>This document describes development of ParaView server manager API
53 for PARAVIS module. The new API must provide following features:</P>
54 <OL>
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>
63 </OL>
64 <P>General architecture and development features of this task are
65 described below.</P>
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>
70 </P>
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
76 a one process.</P>
77 <P>On the diagram above following component are shown: 
78 </P>
79 <UL>
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
83         widgets.</P>
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>
95 </UL>
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>
100 <OL>
101         <LI><P><B>PARAVIS_Gen.idl</B> – defines main interfaces to PARAVIS
102         module.</P>
103         <LI><P><B>PARAVIS_Gen_Types.idl</B> – defines data collection
104         types.</P>
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>
116 </OL>
117 <P STYLE="font-weight: medium">In PARAVIS_SRC/src/PVGUI directory:</P>
118 <OL>
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>
127 </OL>
128 <P STYLE="font-weight: medium">In <SPAN STYLE="font-weight: medium">PARAVIS_SRC/src/PV_SWIG
129 directory:</SPAN></P>
130 <OL>
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
136         classes.</SPAN></P>
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>
144 </OL>
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>
149 <OL>
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>
158         <OL TYPE=a>
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>
167         </OL>
168         <LI><P>Call <B>make</B> command in build directory. This command
169         does following steps related to automatic generation:</P>
170         <OL TYPE=a>
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
181                 classes.</SPAN></P>
182                 <LI><P STYLE="font-weight: medium">Generation of servant classes
183                 with help of these executables and building the library.</P>
184         </OL>
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>
189 </OL>
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>
197 <OL>
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>
206 </OL>
207 <P>IDL interfaces extracted following to the next principals:</P>
208 <OL>
209         <LI><P>All interfaces are inherited from a common parent interface
210         Base. 
211         </P>
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
227         interface.</P>
228 </OL>
229 <H2 CLASS="western">Base interface and its implementation</H2>
230 <P>Base interface is defined in order to satisfy following points:</P>
231 <OL>
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
236         definitions.</P>
237         <LI><P>We need to have a base implementation for all servant
238         classes.</P>
239 </OL>
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>
264 <OL>
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>
270 </OL>
271 <P>For example:</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>
275         <COL WIDTH=12*>
276         <COL WIDTH=164*>
277         <COL WIDTH=80*>
278         <TR VALIGN=TOP>
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>
281                 </TD>
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>
284                 </TD>
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>
287                 </TD>
288         </TR>
289         <TR VALIGN=TOP>
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>
292                 </TD>
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>
296                 </TD>
297                 <TD WIDTH=31% BGCOLOR="#cccccc">
298                         <P ALIGN=LEFT><BR>
299                         </P>
300                 </TD>
301         </TR>
302         <TR VALIGN=TOP>
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>
305                 </TD>
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>
309                 </TD>
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>
313                 </TD>
314         </TR>
315         <TR VALIGN=TOP>
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>
318                 </TD>
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>
321                 </TD>
322                 <TD WIDTH=31% BGCOLOR="#cccccc">
323                         <P ALIGN=LEFT><BR>
324                         </P>
325                 </TD>
326         </TR>
327         <TR VALIGN=TOP>
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>
330                 </TD>
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>
334                 </TD>
335                 <TD WIDTH=31% BGCOLOR="#cccccc">
336                         <P ALIGN=LEFT><BR>
337                         </P>
338                 </TD>
339         </TR>
340         <TR VALIGN=TOP>
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>
343                 </TD>
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>
347                 </TD>
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>
351                 </TD>
352         </TR>
353         <TR VALIGN=TOP>
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>
356                 </TD>
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>
360                 </TD>
361                 <TD WIDTH=31% BGCOLOR="#cccccc">
362                         <P ALIGN=LEFT><BR>
363                         </P>
364                 </TD>
365         </TR>
366         <TR VALIGN=TOP>
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>
369                 </TD>
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>
373                 </TD>
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>
377                 </TD>
378         </TR>
379         <TR VALIGN=TOP>
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>
382                 </TD>
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>
386                 </TD>
387                 <TD WIDTH=31% BGCOLOR="#cccccc">
388                         <P ALIGN=LEFT><BR>
389                         </P>
390                 </TD>
391         </TR>
392         <TR VALIGN=TOP>
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>
395                 </TD>
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>
399                 </TD>
400                 <TD WIDTH=31% BGCOLOR="#cccccc">
401                         <P ALIGN=LEFT><BR>
402                         </P>
403                 </TD>
404         </TR>
405         <TR VALIGN=TOP>
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>
408                 </TD>
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>
412                 </TD>
413                 <TD WIDTH=31% BGCOLOR="#cccccc">
414                         <P ALIGN=LEFT><BR>
415                         </P>
416                 </TD>
417         </TR>
418         <TR VALIGN=TOP>
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>
421                 </TD>
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>
425                 </TD>
426                 <TD WIDTH=31% BGCOLOR="#cccccc">
427                         <P ALIGN=LEFT><BR>
428                         </P>
429                 </TD>
430         </TR>
431         <TR VALIGN=TOP>
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>
434                 </TD>
435                 <TD WIDTH=64% BGCOLOR="#ffffff">
436                         <P ALIGN=LEFT><BR>
437                         </P>
438                 </TD>
439                 <TD WIDTH=31% BGCOLOR="#cccccc">
440                         <P ALIGN=LEFT><BR>
441                         </P>
442                 </TD>
443         </TR>
444         <TR VALIGN=TOP>
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>
447                 </TD>
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>
451                 </TD>
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>
455                 </TD>
456         </TR>
457         <TR VALIGN=TOP>
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>
460                 </TD>
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>
464                 </TD>
465                 <TD WIDTH=31% BGCOLOR="#cccccc">
466                         <P ALIGN=LEFT><BR>
467                         </P>
468                 </TD>
469         </TR>
470         <TR VALIGN=TOP>
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>
473                 </TD>
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>
477                 </TD>
478                 <TD WIDTH=31% BGCOLOR="#cccccc">
479                         <P ALIGN=LEFT><BR>
480                         </P>
481                 </TD>
482         </TR>
483         <TR VALIGN=TOP>
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>
486                 </TD>
487                 <TD WIDTH=64% BGCOLOR="#ffffff">
488                         <P ALIGN=LEFT><BR>
489                         </P>
490                 </TD>
491                 <TD WIDTH=31% BGCOLOR="#cccccc">
492                         <P ALIGN=LEFT><BR>
493                         </P>
494                 </TD>
495         </TR>
496         <TR VALIGN=TOP>
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>
499                 </TD>
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>
503                 </TD>
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>
507                 </TD>
508         </TR>
509         <TR VALIGN=TOP>
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>
512                 </TD>
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>
515                 </TD>
516                 <TD WIDTH=31% BGCOLOR="#cccccc">
517                         <P ALIGN=LEFT><BR>
518                         </P>
519                 </TD>
520         </TR>
521         <TR VALIGN=TOP>
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>
524                 </TD>
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-&gt;GetProxy(myParam0, myParam1);</I></FONT></FONT></FONT></P>
528                 </TD>
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>
532                 </TD>
533         </TR>
534         <TR VALIGN=TOP>
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>
537                 </TD>
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>
540                 </TD>
541                 <TD WIDTH=31% BGCOLOR="#cccccc">
542                         <P ALIGN=LEFT><BR>
543                         </P>
544                 </TD>
545         </TR>
546         <TR VALIGN=TOP>
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>
549                 </TD>
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>
552                 </TD>
553                 <TD WIDTH=31% BGCOLOR="#cccccc">
554                         <P ALIGN=LEFT><BR>
555                         </P>
556                 </TD>
557         </TR>
558         <TR VALIGN=TOP>
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>
561                 </TD>
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>
564                 </TD>
565                 <TD WIDTH=31% BGCOLOR="#cccccc">
566                         <P ALIGN=LEFT><BR>
567                         </P>
568                 </TD>
569         </TR>
570         <TR VALIGN=TOP>
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>
573                 </TD>
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>
578                 </TD>
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>
582                 </TD>
583         </TR>
584         <TR VALIGN=TOP>
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>
587                 </TD>
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>
591                 </TD>
592                 <TD WIDTH=31% BGCOLOR="#cccccc">
593                         <P ALIGN=LEFT><BR>
594                         </P>
595                 </TD>
596         </TR>
597         <TR VALIGN=TOP>
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>
600                 </TD>
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>
604                 </TD>
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>
608                 </TD>
609         </TR>
610         <TR VALIGN=TOP>
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>
613                 </TD>
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>
617                 </TD>
618                 <TD WIDTH=31% BGCOLOR="#cccccc">
619                         <P ALIGN=LEFT><BR>
620                         </P>
621                 </TD>
622         </TR>
623         <TR VALIGN=TOP>
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>
626                 </TD>
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>
632                 </TD>
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>
637                 </TD>
638         </TR>
639         <TR VALIGN=TOP>
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>
642                 </TD>
643                 <TD WIDTH=64% BGCOLOR="#ffffff">
644                         <P ALIGN=LEFT><BR>
645                         </P>
646                 </TD>
647                 <TD WIDTH=31% BGCOLOR="#cccccc">
648                         <P ALIGN=LEFT><BR>
649                         </P>
650                 </TD>
651         </TR>
652         <TR VALIGN=TOP>
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>
655                 </TD>
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>
659                 </TD>
660                 <TD WIDTH=31% BGCOLOR="#cccccc">
661                         <P ALIGN=LEFT><BR>
662                         </P>
663                 </TD>
664         </TR>
665         <TR VALIGN=TOP>
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>
668                 </TD>
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>
672                 </TD>
673                 <TD WIDTH=31% BGCOLOR="#cccccc">
674                         <P ALIGN=LEFT><BR>
675                         </P>
676                 </TD>
677         </TR>
678         <TR VALIGN=TOP>
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>
681                 </TD>
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>
684                 </TD>
685                 <TD WIDTH=31% BGCOLOR="#cccccc">
686                         <P ALIGN=LEFT><BR>
687                         </P>
688                 </TD>
689         </TR>
690         <TR VALIGN=TOP>
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>
693                 </TD>
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-&gt;GetClassName());</I></FONT></FONT></FONT></P>
698                 </TD>
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>
702                 </TD>
703         </TR>
704         <TR VALIGN=TOP>
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>
707                 </TD>
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-&gt;Init(avtkSMProxy);</I></FONT></FONT></FONT></P>
710                 </TD>
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>
714                 </TD>
715         </TR>
716         <TR VALIGN=TOP>
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>
719                 </TD>
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-&gt;_this();</I></FONT></FONT></FONT></P>
723                 </TD>
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>
727                 </TD>
728         </TR>
729         <TR VALIGN=TOP>
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>
732                 </TD>
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>
736                 </TD>
737                 <TD WIDTH=31% BGCOLOR="#cccccc">
738                         <P ALIGN=LEFT><BR>
739                         </P>
740                 </TD>
741         </TR>
742         <TR VALIGN=TOP>
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>
745                 </TD>
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(&quot;GetProxy
748                         - Unknown exception was occurred!!!&quot;);</I></FONT></FONT></FONT></P>
749                 </TD>
750                 <TD WIDTH=31% BGCOLOR="#cccccc">
751                         <P ALIGN=LEFT><BR>
752                         </P>
753                 </TD>
754         </TR>
755         <TR VALIGN=TOP>
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>
758                 </TD>
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>
762                 </TD>
763                 <TD WIDTH=31% BGCOLOR="#cccccc">
764                         <P ALIGN=LEFT><BR>
765                         </P>
766                 </TD>
767         </TR>
768         <TR VALIGN=TOP>
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>
771                 </TD>
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>
774                 </TD>
775                 <TD WIDTH=31% BGCOLOR="#cccccc">
776                         <P ALIGN=LEFT><BR>
777                         </P>
778                 </TD>
779         </TR>
780         <TR VALIGN=TOP>
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>
783                 </TD>
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>
786                 </TD>
787                 <TD WIDTH=31% BGCOLOR="#cccccc">
788                         <P ALIGN=LEFT><BR>
789                         </P>
790                 </TD>
791         </TR>
792 </TABLE>
793 <P STYLE="margin-bottom: 0in"><BR>
794 </P>
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>
808 <P>For example:</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>
815 </P>
816 <P STYLE="margin-bottom: 0in">In IDL interface these function will be
817 defined as:</P>
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>
823 </P>
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>
844 </P>
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
850 created: 
851 </P>
852 <UL>
853         <LI><P>CORBA client object instance on client side, 
854         </P>
855         <LI><P>CORBA servant instance on server side 
856         </P>
857         <LI><P>and both of them are connected to each other across CORBA
858         interface. 
859         </P>
860 </UL>
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. 
868 </P>
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>&gt; 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>
889 <OL>
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
895         creation.</P>
896         <LI><P STYLE="margin-bottom: 0.08in">Providing access to Trace
897         functionality.</P>
898 </OL>
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
908 this case.</P>
909 <P>To check the trace content there are two functions defined in
910 pvsimple.py module and accessible in SALOME Python console:</P>
911 <UL>
912         <LI><P>PrintTrace() - this function prints trace directly to Python
913         console</P>
914         <LI><P>SaveTrace(fileName) – this function outputs trace into disk
915         file according to given name.</P>
916 </UL>
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
925 necessary API.</P>
926 <P>In general algorithm of connected to a module-supplier API on a
927 module-consumer side looks like following:</P>
928 <OL>
929         <LI><P>Find and load a module-supplier component CORBA object from
930         active study.</P>
931         <LI><P>Get a module-supplier engine from the component.</P>
932         <LI><P>Using of the engine to get necessary data.</P>
933 </OL>
934 </BODY>
935 </HTML>