<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2  (Linux)">
	<META NAME="CREATED" CONTENT="20100112;18335600">
	<META NAME="CHANGED" CONTENT="20100126;17235200">
	<STYLE TYPE="text/css">
	<!--
		H2 { margin-top: 0.33in; margin-bottom: 0.08in; color: #ff0000; text-align: left }
		H2.western { font-family: "Liberation Serif", serif; font-size: 14pt }
		H2.cjk { font-family: "DejaVu Sans"; font-size: 14pt }
		H2.ctl { font-family: "DejaVu Sans"; font-size: 14pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P ALIGN=CENTER><FONT SIZE=6><B>PARAVIS development</B></FONT></P>
<P ALIGN=CENTER><FONT SIZE=6><B>General architecture of PARAVIEW
extractor</B></FONT></P>
<H1 STYLE="page-break-before: always"><A NAME="1.Introduction|outline"></A>
<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>
<P><A HREF="#2.General architecture|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>2.General
architecture</B></FONT></FONT></A></P>
<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
generation of container classes</B></FONT></FONT></A></P>
<H1><A NAME="3.1. Source files related to PARAVIS server definition|outline"></A>
<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.
Source files related to PARAVIS server definition</B></FONT></FONT></A></H1>
<P><A HREF="#3.2. Process of generation|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.2.
Process of generation</B></FONT></FONT></A></P>
<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.
Definition of IDL interfaces</B></FONT></FONT></A></P>
<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.
Base interface and its implementation</B></FONT></FONT></A></P>
<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.
GUI events queue</B></FONT></FONT></A></H1>
<P><A HREF="#3.6. Overloaded methods definition|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.6.
Overloaded methods definition</B></FONT></FONT></A></P>
<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.
Creation of objects in Python</B></FONT></FONT></A></P>
<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.
servermanager.py and simple.py</B></FONT></FONT></A></P>
<P><A HREF="#4.Trace functionality|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>4.Trace
functionality</B></FONT></FONT></A></P>
<P><BR><BR>
</P>
<P><BR><BR>
</P>
<H1>Introduction</H1>
<P>This document describes development of ParaView server manager API
for PARAVIS module. The new API must provide following features:</P>
<OL>
	<LI><P>Define interaction between two different processes: Python
	console and PARAVIS GUI defined in SALOME desktop.</P>
	<LI><P>Make possible to manage PARAVIS GUI and ParaView server data
	from Python scripts in synchronized mode.</P>
	<LI><P>The new API must be similar as much as possible to the API
	provided by servermanager.py module from ParaView in order to make
	possible launching the same scripts as in ParaView as in PARAVIS
	without modifications.</P>
</OL>
<P>General architecture and development features of this task are
described below.</P>
<H1><A NAME="2.General architecture|outline"></A>General architecture</H1>
<P>Main components of PARAVIS architecture and their relations can be
represented as on the following picture:</P>
<P><IMG SRC="GeneralArchitecture_html_m4ed0a034.gif" NAME="graphics1" ALIGN=LEFT WIDTH=100% BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>The usual way to implement SALOME module is to develop a
Data/Algorithms engine unit as a CORBA server and module GUI as a
CORBA client. But in case if we need to use GUI and Algorithms from
Python console (what usually is an external process) in synchronized
mode then we have to implement them together as a CORBA server within
a one process.</P>
<P>On the diagram above following component are shown: 
</P>
<UL>
	<LI><P>PARAVIS module GUI which is responsible for creation of
	necessary widgets within SALOME Desktop, initialization of ParaView
	client objects, connection of ParaView GUI objects to created
	widgets.</P>
	<LI><P>ParaView client code is a set of ParaView objects what
	provides ParaView GUI.</P>
	<LI><P>ParaView server for PARAVIS module can be used as built-in
	(by default) as remote. For connection to remote server it is
	necessary to use corresponded menu commands connect/disconnect as it
	is used in standard ParaView GUI client.</P>
	<LI><P>ParaView server manager API is a set of classes provided by
	ParaView for definition of API for Python interpreter.</P>
	<LI><P>Container objects - implementation of CORBA servants for
	wrapping server manager object instances and redirection of CORBA
	interface calls to corresponded server manager object.</P>
</UL>
<H1><A NAME="3.Automatic generation of container classes|outline"></A>
Automatic generation of container classes</H1>
<H2 CLASS="western">Source files related to PARAVIS server definition</H2>
<P STYLE="margin-bottom: 0in">In PARAVIS_SRC/idl/ directory:</P>
<OL>
	<LI><P><B>PARAVIS_Gen.idl</B> – defines main interfaces to PARAVIS
	module.</P>
	<LI><P><B>PARAVIS_Gen_Types.idl</B> – defines data collection
	types.</P>
	<LI><P><B>hints_paravis</B> – defines sizes of arrays missed in
	standard VTK hints file. If some functions of VTK classes which
	return array data are not extracted then it is necessary to edit
	this file in order to describe missed functions.</P>
	<LI><P><B>pythonIDL.py</B> – command file which is used for
	extraction of IDL interfaces to Python files. This is modification
	of similar file from omniidl product what takes into account
	overloading of methods in class.</P>
	<LI><P><B>vtkWrapIDL.c</B> – source file for building extraction
	executables: <SPAN STYLE="font-weight: medium">vtkWrapIDL,
	vtkWrapIDL_CC, vtkWrapIDL_HH.</SPAN></P>
</OL>
<P STYLE="font-weight: medium">In PARAVIS_SRC/src/PVGUI directory:</P>
<OL>
	<LI><P><B>PARAVIS_Gen_i.cc</B> <SPAN STYLE="font-weight: medium">and
	</SPAN><B>PARAVIS_Gen_i.hh</B> – <SPAN STYLE="font-weight: medium">implementation
	of PARAVIS_Gen interface.</SPAN></P>
	<LI><P><B>PV_Events.h</B> – <SPAN STYLE="font-weight: medium">defines
	events for synchronization of CORBA client calls with main GUI
	events queue.</SPAN></P>
	<LI><P STYLE="font-weight: medium">Other files are related to GUI
	definition and auxiliary tools.</P>
</OL>
<P STYLE="font-weight: medium">In <SPAN STYLE="font-weight: medium">PARAVIS_SRC/src/PV_SWIG
directory:</SPAN></P>
<OL>
	<LI><P STYLE="font-weight: medium"><B>paravis.py</B> – <SPAN STYLE="font-weight: medium">general
	Python module for PARAVIS. It installs connection to PARAVIS CORBA
	server, defines a variable </SPAN><B>myParavis</B> <SPAN STYLE="font-weight: medium">in
	order to provide acces to </SPAN><B>PARAVIS_Gen</B> <SPAN STYLE="font-weight: medium">functions,
	creates a set of empty constructors for all extracted ParaView
	classes.</SPAN></P>
	<LI><P STYLE="font-weight: medium"><B>paravisSM.py</B> – <SPAN STYLE="font-weight: medium">modified
	copy of servermanager.py module from ParaView. Modification done
	according to conventions defined by paravis.py module and features
	of working with CORBA server.</SPAN></P>
	<LI><P STYLE="font-weight: medium"><B>pvsimple.py</B> – <SPAN STYLE="font-weight: medium">modified
	copy of simple.py module from ParaView. Modifications done because
	of the same reasons.</SPAN></P>
</OL>
<H2 CLASS="western">Process of generation</H2>
<P>CORBA servant classes for wrapping of server manager API classes
is generated automatically. The process of building PARAVIS module
with generation of wrappers is performed in the following way:</P>
<OL>
	<LI><P>Call <B>build_configure</B> script. During performing of this
	script it performs some standard steps of SALOME module building and
	calls a Python command file <B>getwrapclasses.py</B> is called. This
	procedure creates a list of ParaView and VTK class names what has to
	be extracted. This list includes all <B>vtkSM*</B> classes and <B>vtk*
	</B>classes what are referred by previous group of classes. Results
	of build_configure step are:</P>
	<OL TYPE=a>
		<LI><P>idl/wrap.am – defines variables what lists all interfaces
		(*.idl and *.cc files) what will be generated.</P>
		<LI><P>idl/vtkWrapIDL.h – defines a list of extracted classes in
		form of char* array.</P>
		<LI><P>src/PVGUI/wrap.am - defines variables what lists all servant
		classes (*.hh and *.cc files) what will be generated.</P>
		<LI><P>src/PVGUI/PARAVIS_CreateClass.cxx is a C++ file what
		contains a one function CreateInstance. This function creates a
		servant class which corresponds to a given name of original
		ParaView/VTK class.</P>
	</OL>
	<LI><P>Launch <B>configure</B> script from a build directory. This
	step is similar to the same steps in other SALOME modules and does
	not have any special related to automatic generation of CORBA
	interfaces.</P>
	<LI><P>Call <B>make</B> command in build directory. This command
	does following steps related to automatic generation:</P>
	<OL TYPE=a>
		<LI><P>Builds <B>vtkWrapIDL</B> executable in <B>idl</B> directory
		what is responsible for generation of IDL files using names of
		classes to wrap. This executable analyzes related header files for
		classes from vtkWrapIDL.h and defines corresponded IDL file.</P>
		<LI><P>Defines all IDL files with help of this executable and
		launches standard SALOME compilation for <B>idl</B> directory.</P>
		<LI><P>Compiles <B>vtkWrapIDL_CC </B><SPAN STYLE="font-weight: medium">and
		</SPAN><B>vtkWrapIDL_HH</B> <SPAN STYLE="font-weight: medium">executables
		in src/PVGUI directory what are responsible for generation of
		header files (*.hh) and implementation files (*.cc) for servants
		classes.</SPAN></P>
		<LI><P STYLE="font-weight: medium">Generation of servant classes
		with help of these executables and building the library.</P>
	</OL><commit_msg>CMake: - update documentation considering new CMake build system<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2  (Linux)">
	<META NAME="CREATED" CONTENT="20100112;18335600">
	<META NAME="CHANGED" CONTENT="20100126;17235200">
	<STYLE TYPE="text/css">
	<!--
		H2 { margin-top: 0.33in; margin-bottom: 0.08in; color: #ff0000; text-align: left }
		H2.western { font-family: "Liberation Serif", serif; font-size: 14pt }
		H2.cjk { font-family: "DejaVu Sans"; font-size: 14pt }
		H2.ctl { font-family: "DejaVu Sans"; font-size: 14pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P ALIGN=CENTER><FONT SIZE=6><B>PARAVIS development</B></FONT></P>
<P ALIGN=CENTER><FONT SIZE=6><B>General architecture of PARAVIEW
extractor</B></FONT></P>
<H1 STYLE="page-break-before: always"><A NAME="1.Introduction|outline"></A>
<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>
<P><A HREF="#2.General architecture|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>2.General
architecture</B></FONT></FONT></A></P>
<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
generation of container classes</B></FONT></FONT></A></P>
<H1><A NAME="3.1. Source files related to PARAVIS server definition|outline"></A>
<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.
Source files related to PARAVIS server definition</B></FONT></FONT></A></H1>
<P><A HREF="#3.2. Process of generation|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.2.
Process of generation</B></FONT></FONT></A></P>
<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.
Definition of IDL interfaces</B></FONT></FONT></A></P>
<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.
Base interface and its implementation</B></FONT></FONT></A></P>
<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.
GUI events queue</B></FONT></FONT></A></H1>
<P><A HREF="#3.6. Overloaded methods definition|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>3.6.
Overloaded methods definition</B></FONT></FONT></A></P>
<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.
Creation of objects in Python</B></FONT></FONT></A></P>
<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.
servermanager.py and simple.py</B></FONT></FONT></A></P>
<P><A HREF="#4.Trace functionality|outline"><FONT FACE="Liberation Serif, serif"><FONT SIZE=4 STYLE="font-size: 15pt"><B>4.Trace
functionality</B></FONT></FONT></A></P>
<P><BR><BR>
</P>
<P><BR><BR>
</P>
<H1>Introduction</H1>
<P>This document describes development of ParaView server manager API
for PARAVIS module. The new API must provide following features:</P>
<OL>
	<LI><P>Define interaction between two different processes: Python
	console and PARAVIS GUI defined in SALOME desktop.</P>
	<LI><P>Make possible to manage PARAVIS GUI and ParaView server data
	from Python scripts in synchronized mode.</P>
	<LI><P>The new API must be similar as much as possible to the API
	provided by servermanager.py module from ParaView in order to make
	possible launching the same scripts as in ParaView as in PARAVIS
	without modifications.</P>
</OL>
<P>General architecture and development features of this task are
described below.</P>
<H1><A NAME="2.General architecture|outline"></A>General architecture</H1>
<P>Main components of PARAVIS architecture and their relations can be
represented as on the following picture:</P>
<P><IMG SRC="GeneralArchitecture_html_m4ed0a034.gif" NAME="graphics1" ALIGN=LEFT WIDTH=100% BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>The usual way to implement SALOME module is to develop a
Data/Algorithms engine unit as a CORBA server and module GUI as a
CORBA client. But in case if we need to use GUI and Algorithms from
Python console (what usually is an external process) in synchronized
mode then we have to implement them together as a CORBA server within
a one process.</P>
<P>On the diagram above following component are shown: 
</P>
<UL>
	<LI><P>PARAVIS module GUI which is responsible for creation of
	necessary widgets within SALOME Desktop, initialization of ParaView
	client objects, connection of ParaView GUI objects to created
	widgets.</P>
	<LI><P>ParaView client code is a set of ParaView objects what
	provides ParaView GUI.</P>
	<LI><P>ParaView server for PARAVIS module can be used as built-in
	(by default) as remote. For connection to remote server it is
	necessary to use corresponded menu commands connect/disconnect as it
	is used in standard ParaView GUI client.</P>
	<LI><P>ParaView server manager API is a set of classes provided by
	ParaView for definition of API for Python interpreter.</P>
	<LI><P>Container objects - implementation of CORBA servants for
	wrapping server manager object instances and redirection of CORBA
	interface calls to corresponded server manager object.</P>
</UL>
<H1><A NAME="3.Automatic generation of container classes|outline"></A>
Automatic generation of container classes</H1>
<H2 CLASS="western">Source files related to PARAVIS server definition</H2>
<P STYLE="margin-bottom: 0in">In PARAVIS_SRC/idl/ directory:</P>
<OL>
	<LI><P><B>PARAVIS_Gen.idl</B> – defines main interfaces to PARAVIS
	module.</P>
	<LI><P><B>PARAVIS_Gen_Types.idl</B> – defines data collection
	types.</P>
	<LI><P><B>hints_paravis</B> – defines sizes of arrays missed in
	standard VTK hints file. If some functions of VTK classes which
	return array data are not extracted then it is necessary to edit
	this file in order to describe missed functions.</P>
	<LI><P><B>pythonIDL.py</B> – command file which is used for
	extraction of IDL interfaces to Python files. This is modification
	of similar file from omniidl product what takes into account
	overloading of methods in class.</P>
	<LI><P><B>vtkWrapIDL.c</B> – source file for building extraction
	executables: <SPAN STYLE="font-weight: medium">vtkWrapIDL,
	vtkWrapIDL_CC, vtkWrapIDL_HH.</SPAN></P>
</OL>
<P STYLE="font-weight: medium">In PARAVIS_SRC/src/PVGUI directory:</P>
<OL>
	<LI><P><B>PARAVIS_Gen_i.cc</B> <SPAN STYLE="font-weight: medium">and
	</SPAN><B>PARAVIS_Gen_i.hh</B> – <SPAN STYLE="font-weight: medium">implementation
	of PARAVIS_Gen interface.</SPAN></P>
	<LI><P><B>PV_Events.h</B> – <SPAN STYLE="font-weight: medium">defines
	events for synchronization of CORBA client calls with main GUI
	events queue.</SPAN></P>
	<LI><P STYLE="font-weight: medium">Other files are related to GUI
	definition and auxiliary tools.</P>
</OL>
<P STYLE="font-weight: medium">In <SPAN STYLE="font-weight: medium">PARAVIS_SRC/src/PV_SWIG
directory:</SPAN></P>
<OL>
	<LI><P STYLE="font-weight: medium"><B>paravis.py</B> – <SPAN STYLE="font-weight: medium">general
	Python module for PARAVIS. It installs connection to PARAVIS CORBA
	server, defines a variable </SPAN><B>myParavis</B> <SPAN STYLE="font-weight: medium">in
	order to provide acces to </SPAN><B>PARAVIS_Gen</B> <SPAN STYLE="font-weight: medium">functions,
	creates a set of empty constructors for all extracted ParaView
	classes.</SPAN></P>
	<LI><P STYLE="font-weight: medium"><B>paravisSM.py</B> – <SPAN STYLE="font-weight: medium">modified
	copy of servermanager.py module from ParaView. Modification done
	according to conventions defined by paravis.py module and features
	of working with CORBA server.</SPAN></P>
	<LI><P STYLE="font-weight: medium"><B>pvsimple.py</B> – <SPAN STYLE="font-weight: medium">modified
	copy of simple.py module from ParaView. Modifications done because
	of the same reasons.</SPAN></P>
</OL>
<H2 CLASS="western">Process of generation</H2>
<P>CORBA servant classes for wrapping of server manager API classes
is generated automatically. The process of building PARAVIS module
with generation of wrappers is performed in the following way:</P>
<OL>
	<LI><P>Execute <B>cmake</B> command from a build directory. 
	During performing of this command it performs some standard steps 
	of SALOME module building and calls a Python command file 
	<B>getwrapclasses.py</B> is called. This procedure creates a list 
	of ParaView and VTK class names what has to be extracted. 
	This list includes all <B>vtkSM*</B> classes and <B>vtk*</B> classes 
	what are referred by previous group of classes. Results
	of build_configure step are:</P>
	<OL TYPE=a>
		<LI><P>idl/wrap.cmake – defines variables what lists all interfaces
		(*.idl and *.cc files) what will be generated.</P>
		<LI><P>idl/vtkWrapIDL.c – defines a list of extracted classes in
		form of char* array.</P>
		<LI><P>src/PVGUI/PARAVIS_CreateClass.cxx is a C++ file what
		contains a one function CreateInstance. This function creates a
		servant class which corresponds to a given name of original
		ParaView/VTK class.</P>
	</OL>
	<LI><P>Call <B>make</B> command in build directory. This command
	does following steps related to automatic generation:</P>
	<OL TYPE=a>
		<LI><P>Builds <B>vtkWrapIDL</B> executable in <B>idl</B> directory
		what is responsible for generation of IDL files using names of
		classes to wrap. This executable analyzes related header files for
		classes from vtkWrapIDL.h and defines corresponded IDL file.</P>
		<LI><P>Defines all IDL files with help of this executable and
		launches standard SALOME compilation for <B>idl</B> directory.</P>
		<LI><P>Compiles <B>vtkWrapIDL_CC </B><SPAN STYLE="font-weight: medium">and
		</SPAN><B>vtkWrapIDL_HH</B> <SPAN STYLE="font-weight: medium">executables
		in src/PVGUI directory what are responsible for generation of
		header files (*.hh) and implementation files (*.cc) for servants
		classes.</SPAN></P>
		<LI><P STYLE="font-weight: medium">Generation of servant classes
		with help of these executables and building the library.</P>
	</OL>
{'fraction_non_alphanumeric': 0.14318340713120484, 'fraction_numerical': 0.015847121883010955, 'mean_word_length': 5.366765578635015, 'pattern_counts': {'":': 0, '<': 745, '<?xml version=': 0, '>': 745, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6316642', 'n_tokens_mistral': 7650, 'n_tokens_neox': 7001, 'n_words': 2324}