From: barate Date: Wed, 4 Mar 2009 16:44:17 +0000 (+0000) Subject: included V5_1_main 04mar09 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=54cf67377ce2b0c4d7ebf8cf87e3b574a958fa0c;p=modules%2Fkernel.git included V5_1_main 04mar09 --- diff --git a/bin/appli_gen.py b/bin/appli_gen.py index c57f4c25d..e6d035518 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -20,9 +20,9 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -"""Create a virtual Salome installation - -""" +## \file appli_gen.py +# Create a %SALOME application (virtual Salome installation) +# usage="""usage: %prog [options] Typical use is: python appli_gen.py diff --git a/bin/killSalome.py b/bin/killSalome.py index 582152ceb..381f3f710 100755 --- a/bin/killSalome.py +++ b/bin/killSalome.py @@ -20,6 +20,10 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file killSalome.py +# Stop all %SALOME servers from all sessions by killing them +# + import os, sys, re, signal from killSalomeWithPort import killMyPort, getPiDict diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 4403a8bc2..fcdea4ec4 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -20,6 +20,14 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file killSalomeWithPort.py +# Stop all %SALOME servers from given sessions by killing them +# +# The sessions are indicated by their ports on the command line as in : +# +# killSalomeWithPort.py 2811 2815 +# + import os, sys, pickle, signal, commands,glob from launchConfigureParser import verbose import Utils_Identity diff --git a/bin/nameserver.py b/bin/nameserver.py index 329310fba..46986f897 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -95,7 +95,7 @@ class NamingServer(Server): #print "port=", aPort if sys.platform == "win32": #print "start omniNames -start " + aPort + " -logdir " + upath - self.CMD=['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"', ' -errlog', upath+'/omniNameErrors.log'] + self.CMD=['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"', ' -errlog', '\"' + upath+'/omniNameErrors.log' + '\"'] #os.system("start omniNames -start " + aPort + " -logdir " + upath) else: #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] diff --git a/bin/orbmodule.py b/bin/orbmodule.py index ae4744432..d9aa08d7a 100755 --- a/bin/orbmodule.py +++ b/bin/orbmodule.py @@ -19,6 +19,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## @package orbmodule +# \brief Module that provides a client for %SALOME +# +# + import sys,os,time import string from nameserver import * @@ -32,6 +37,7 @@ import CosNaming # ----------------------------------------------------------------------------- class client: + """Client for SALOME""" def __init__(self,args=None): #set GIOP message size for bug 10560: impossible to get field values in TUI mode @@ -93,7 +99,7 @@ class client: # -------------------------------------------------------------------------- def showNS(self): - """ Show the content of NS""" + """ Show the content of SALOME naming service """ self.showNScontext(self.rootContext) # -------------------------------------------------------------------------- diff --git a/bin/runSalome.py b/bin/runSalome.py index fe97b68ff..bf9cfc5fe 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -20,6 +20,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## @package runSalome +# \brief Module that provides services to launch SALOME +# +# + import sys, os, string, glob, time, pickle, re import orbmodule import setenv diff --git a/bin/salome_session.py b/bin/salome_session.py index 9c648214d..be227c89f 100644 --- a/bin/salome_session.py +++ b/bin/salome_session.py @@ -19,6 +19,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## @package salome_session +# \brief Module that provides the SalomeSession object that helps to launch +# a SALOME script session +# +# + import os import sys import string @@ -99,6 +105,7 @@ def searchFreePort(): class SalomeSession(object): + """Salome session launcher""" import runSalome import killSalomeWithPort import killSalome diff --git a/bin/salome_utils.py b/bin/salome_utils.py index ab9c0669c..cf22daf17 100644 --- a/bin/salome_utils.py +++ b/bin/salome_utils.py @@ -24,9 +24,10 @@ # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) # --- # -""" -Set of utility functions used by SALOME python scripts. -""" +## @package salome_utils +# \brief Set of utility functions used by SALOME python scripts. +# +# # # Exported functions diff --git a/bin/showNS.py b/bin/showNS.py index 48783acd8..7f4a0ba01 100755 --- a/bin/showNS.py +++ b/bin/showNS.py @@ -20,6 +20,10 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file showNS.py +# \brief display the contents of %SALOME naming service +# + import orbmodule clt=orbmodule.client() diff --git a/bin/shutdownSalome.py b/bin/shutdownSalome.py index f4d54ea9c..3746788e9 100755 --- a/bin/shutdownSalome.py +++ b/bin/shutdownSalome.py @@ -20,6 +20,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file shutdownSalome.py +# shutdown all %SALOME servers and naming service +# +# + import time import salome salome.salome_init() diff --git a/bin/waitContainers.py b/bin/waitContainers.py index dd8ba9b3b..ebc94e097 100755 --- a/bin/waitContainers.py +++ b/bin/waitContainers.py @@ -20,6 +20,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file waitContainers.py +# \brief command to wait until containers are launched +# +# the container names (in naming service) are passed on the command line as in : +# waitContainers.py FactoryServer + import sys import time import orbmodule diff --git a/bin/waitNS.py b/bin/waitNS.py index 03ea33f23..576df3c79 100755 --- a/bin/waitNS.py +++ b/bin/waitNS.py @@ -20,6 +20,9 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## \file waitNS.py +# \brief command to wait until module catalog server is launched +# import orbmodule clt=orbmodule.client() clt.waitNS("/Kernel/ModulCatalog") diff --git a/configure.ac b/configure.ac index 740153160..844d28f58 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ # ================================================================ #AC_PREREQ(2.59) # -AC_INIT([Salome2 Project], [5.1.0], [paul.rascle@edf.fr], [SalomeKERNEL]) +AC_INIT([Salome2 Project], [5.1.1], [paul.rascle@edf.fr], [SalomeKERNEL]) # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary # scripts such as config.guess, install-sh, ... @@ -89,8 +89,8 @@ AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue) # ---- option to build only launcher, resources manager and batch classes AC_ARG_WITH(onlylauncher, --with-onlylauncher, - WITHONLYLAUNCHER="yes",WITHONLYLAUNCHER="no") -AM_CONDITIONAL(WITHONLYLAUNCHER, test x$WITHONLYLAUNCHER = xyes) + [],[with_onlylauncher="no"]) +AM_CONDITIONAL(WITHONLYLAUNCHER, test x$with_onlylauncher = xyes) # ---------------------------------------------------------------------------- @@ -206,7 +206,7 @@ echo CHECK_LIBXML -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then echo echo --------------------------------------------- echo testing HDF5 @@ -439,7 +439,7 @@ function check_fatal_error { # -------------------------------------- -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then if test x$corba_gen = xtrue; then basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok libxml_ok" else @@ -454,7 +454,7 @@ summary $basic_mandatory_products check_fatal_error $basic_mandatory_products echo -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok" if test x$corba_gen = xtrue; then echo --- CORBA mandatory products - default configuration: @@ -491,7 +491,7 @@ echo --- Html documentation products: only required for doc production summary $htmldoc_products echo -if test x$WITHONLYLAUNCHER = xno; then +if test x$with_onlylauncher = xno; then echo echo "Default ORB : $DEFAULT_ORB" echo @@ -537,9 +537,9 @@ AC_OUTPUT([ \ ./doc/Makefile \ ./doc/salome/Makefile \ ./doc/salome/tui/Makefile \ - ./doc/salome/tui/INPUT/doxyuser:./doc/salome/tui/KERNEL/doxyuser.in \ - ./doc/salome/tui/INPUT/doxydev:./doc/salome/tui/KERNEL/doxydev.in \ - ./doc/salome/tui/INPUT/sources/static/tree.js:./doc/salome/tui/KERNEL/sources/static/tree.js.in \ + ./doc/salome/tui/doxyfile \ + ./doc/salome/gui/Makefile \ + ./doc/salome/gui/doxyfile \ ./idl/Makefile \ ./resources/Makefile \ ./resources/KERNELCatalog.xml \ diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt deleted file mode 100644 index 7c01e348c..000000000 --- a/doc/INSTALL.txt +++ /dev/null @@ -1,394 +0,0 @@ -================================================================= -Installation instructions, up to date for 3.0 version -================================================================= - -*html version of this document is produced with docutils*:: - - rst2html < doc.txt > doc.html - -*This document corresponds to SALOME2 2.2.9.* -*IT IS NOT UP TO DATE with 3.2.0* - -.. contents:: -.. sectnum:: - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -You'll find here generic instructions for installing the SALOME2 platform. - -Summary -------- - -`1. Quick Overview`_ - -`2. System configuration`_ - -`3. Third-party dependencies`_ - -`4. Preparing the shell environment`_ - -`5. Installing the KERNEL component`_ - -`6. Installing the SALOME components`_ - -`7. Runtime`_ - -`8. Suggestions and advices`_ - - -1. Quick Overview ------------------ - -First of all, you have to check (or install if needed) the dependant -software programs on your system. These programs are: - -- common development tools as gcc, automake, autoconf and libtools. -- third party softwares used in SALOME building or runtime process - (python, OCC, VTK, ...) - -Further details can be found in sections [2] and [3]. - -If the dependencies are installed on your system, then you have to set -your shell environment to get access to the software components -(cf. [4]. "Preparing the shell environment"). - -The next step is to install the KERNEL (cf. [5] "Installing KERNEL"): - -:: - -$ mkdir -$ mkdir -$ cd -$ ./build_configure -$ cd -$ /configure --prefix= -$ make -$ make install - -Then, the SALOME components GEOM, MED, VISU, ... can be installed -with a similar procedure (cf. [6]). - -Eventually, the platform can be run by executing the shell script -runSalome (cf. [7]). Here, somme additionnal variables have to be set -to describe the SALOME runtime configuration (_ROOT_DIR, -OMNIORB_CONFIG) - -The following provides you with specific instructions for each step. - - -2. System configuration ------------------------ - -SALOME is compiled and tested on differents platforms with native packages: -- Debian sarge -- Mandrake 10.1 -- ... - -If you have another platform, we suggest the following configuration -for building process: - -- gcc-3.3.x or 3.4.x -- automake-1.7 or more (only aclocal is used) -- autoconf-2.59 -- libtool-1.5.6 - -remarks: - -- This is the minimum level of automake, autoconf and libtool, if you need - to compile all the third party softwares (included OpenCascade 5.2.x). - -3. Third-party dependencies ---------------------------- - -The SALOME platform relies on a set of third-party softwares. The -current version depends on the following list -(versions given here are from Debian Sarge, except OpenCascade, VTK and MED, -which are not Debian packages): - -CAS-5.2.4 OpenCascade (try binaries,a source patch is needed) -VTK-4.2.6 VTK 3D-viewer -PyQt-3.13 Python-Qt Wrapper -Python-2.3.5 Python interpreter -SWIG-1.3.24 SWIG library -boost-1_32_0 C++ library (only include templates are used) -hdf5-1.6.2 Files Database library -med-2.2.2 MED Data Format support for file records -omniORB-4.0.5 ORB used in SALOME -qt-x11-free-3.3.3 Qt library -qwt-4.2 Graph components for Qt -sip4-4.1.1 langage binding software - -And, in order to build the documentation: - -doxygen-1.4.2 -graphviz-2.2.1 - - -Additionnal software may be installed for optional features: - -netgen4.3 + patch -tix8.1.4 -openpbs-2.3.16 -lsf-??? - - - -3.1 To Do -~~~~~~~~~ -- Instructions for installing these software programs can be found in a - special note doc/configuration_examples/install-prerequis. -- Installation shell scripts are also provided. - These scripts have to be adapted to your own configuration. - -- See doc/configuration_examples/* - -In the following, we assume that all the third-party softwares are -installed in the same root directory, named /prerequis. -Then, your file system should probably look like:: - - /prerequis/Python-2.2.2 - /prerequis/omniORB-3.0.5 - /prerequis/qt-x11-free-3.0.5 - ... - - -4. Preparing the shell environment ----------------------------------- - -Some variables have to be set to get acces to third-party software -components (include files, executable, library, ...) during building -process and runtime. - -The shell file prerequis.sh, embedded in the KERNEL source package, -provides a template for setting those variables. In this example, all the -softwares are supposed to be installed in the same root directory, -named here INSTALLROOT. - -Copy the prerequis.sh in a working directory and adjust the settings -to your own configuration. To get the shell prepared, just -execute the following command in the building shell: - -$ source prerequis.sh - -(we assume here a ksh or bash mode) - - -5. Installing the KERNEL component ----------------------------------- - -We use here the notation to specify the source directory -of the KERNEL component. The shell environment is supposed to have -been set (cf. 4). - -Installing the KERNEL from a source package needs three directories: - -- the source directory, denoted here by . - -- the build directory, denoted by in the following. This - directory can't be the same directory as . - -- the install directory, denoted by in the following. This - directory can't be the same directory as or - . - -The installing process is: - -STEP 1: - preparing directories - - create the and the directories:: - - $ mkdir - $ mkdir - -STEP 2: - build configure script - - go to directory and generate the "configure" script:: - - $ cd - $ ./build_configure - - If it doesn't work, check your system automake tools as specified in - section [2]. - -STEP 3: - configure the building process - go to the build directory and execute the configuration process:: - - $ cd - $ /configure --prefix= - - Note that must be an absolute path. - - When the configure process is complete, check the status of - third-party softwares detection. You should have a status like:: - - --------------------------------------------- - Summary - --------------------------------------------- - Configure - cc : yes - boost : yes - lex_yacc : yes - python : yes - swig : yes - threads : yes - OpenGL : yes - qt : yes - vtk : yes - hdf5 : yes - med2 : yes - omniORB : yes - occ : yes - sip : yes - pyqt : yes - qwt : yes - doxygen : yes - graphviz : no - openpbs : no - lsf : no - Default ORB : omniORB - ---------------------------------------------- - -If a software get a status "no", then it's not "seen" in the system: - -- the software is not installed, or -- the shell environment is not set correctly. - -In this example, the software programs graphviz, openpbs and lsf are not -installed (optional for most usages). - - -STEP 4 : - Building the binary files - - Execute make in the directory:: - - $ make - - -STEP 5: - Installing binary files, scripts and documentation - - Execute install target in the directory:: - - $ make install - - -6. Installing the SALOME components ------------------------------------ - -TInstalling a component is done by following the same -instructions as given for the KERNEL, replacing KERNEL by - (build_configure, configure, make, make install). - -You just have to be aware of the dependencies between components: - -- MED depends on KERNEL -- GEOM depends on KERNEL -- SMESH depends on KERNEL, MED, GEOM -- VISU depends on KERNEL, MED -- SUPERV depends on KERNEL - -For example, installing the component SMESH needs the previous -installation of the KERNEL component, and then the GEOM and MED components. - -The building process uses the variables _ROOT_DIR to -localize the dependant components. The variables must be set to the -install path directory of the components (ex: -KERNEL_ROOT_DIR=). - -In the above example, the three variables KERNEL_ROOT_DIR, -GEOM_ROOT_DIR and MED_ROOT_DIR have to be set before configuring the -building process of the SMESH component (STEP 3). - - -7. Runtime ----------- - -See SALOME_Application_ to define your own configuration of SALOME and run it -on one or several computers. This is the recommended way of configuration. - -.. _SALOME_Application: ./SALOME_Application.html - -The following explains the general principles. - -To run the SALOME platform, the procedure is: - -- set the shell environment to get acces to third-party softwares:: - - $ source prerequis.sh - -- define the SALOME configuration by setting the whole set of - variables _ROOT_DIR. Here, you just have to set the - kernel and the components you need:: - - $ export KERNEL_ROOT_DIR= - $ export MED_ROOT_DIR= - $ ... - -- define the CORBA configuration file by setting the variable - OMNIORB_CONFIG. This variable must be set to a writable file - path. The file may be arbitrary chosen and doesn't need to exist - before running. We suggest:: - - $ export OMNIORB_CONFIG=$HOME/.omniORB.cfg - -- run the SALOME platform by executing the script runSalome:: - - $KERNEL_ROOT_DIR/bin/salome/runSalome - - -8. Suggestions and advices --------------------------- - -For convenience or customization, we suggest the following organisation: - -- chose and create a root directory for the SALOME platform, say - . - -- install the third-party softwares in a sub-directory "prerequis" - -- install the SALOME components in a sub-directory "SALOME2" - -- make personnal copies of the files prerequis.sh and runSalome in - :: - - $ cp /prerequis.sh /. - $ cp /bin/salome/runSalome /. - - Edit the file prerequis.sh and adjust it to your own configuration. - -- define the SALOME2 configuration - - This step consists in setting the KERNEL_ROOT_DIR, the whole set of - variables _ROOT_DIR you need, and the OMNIORB_CONFIG - variable. - - We suggest to create a shell file envSalome.sh containing those - settings. Then the configuration consists in loading envSalome.sh in - the runtime shell:: - - $ source envSalome.sh - -- When installed with this file organisation, running SALOME is done - with the following shell commands:: - - $ source /prerequis.sh - $ source /envSalome.sh - $ ./runSalome - - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/KERNEL_Services.txt b/doc/KERNEL_Services.txt deleted file mode 100644 index c848838ee..000000000 --- a/doc/KERNEL_Services.txt +++ /dev/null @@ -1,305 +0,0 @@ -================================================================= -KERNEL Services for end user (Python interface) -================================================================= - -*html version of this document is produced with docutils*:: - - rst2html < doc.txt > doc.html - -This document corresponds to SALOME2 3.2.0 - -.. contents:: -.. sectnum:: - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -In a SALOME application, distributed components, servers and clients use -the CORBA middleware for comunication. CORBA interfaces are defined via idl -files. All the different CORBA interfaces are available for users in Python, -see CORBA interfaces below. - -For some general purpose services, CORBA interfaces have been encapsulated -in order to provide a simple interface (encapsulation is generally done in -C++ classes, and a Python SWIG interface is also generated from C++, to -ensure a consistent behavior between C++ modules and Python modules or user -script). - -General purpose services -======================== - -SALOME services access from a Python shell ------------------------------------------- -See SALOME_Application_ for detailed instructions to launch a Python -interpreter with full acces to the SALOME environment and services. - -.. _SALOME_Application: ./SALOME_Application.txt - -You can use the embedded Python interpreter in Grahic User Interface, or an -external interpreter, with:: - - ./runSession - python - -In either cases, SALOME services access is done with:: - - import salome - salome.salome_init() - -In the embedded interpreter, it is already done, but there is no problem to -do it several times, so it is preferable to add these instructions -systematically in your scripts, to allow them to work in all configurations. - -Container and component instanciation -------------------------------------- - -See LifeCycleCORBA_ for the C++ interface (Python interface obtained with SWIG -is very similar). - -.. _LifeCycleCORBA: ./tui/KERNEL/classSALOME__LifeCycleCORBA.html - - -In the following example, a test component provided in KERNEL is launched -in the local container, "FactoryServer", created when SALOME starts:: - - import salome - salome.salome_init() - - import LifeCycleCORBA - lcc = LifeCycleCORBA.LifeCycleCORBA() - obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") - - import Engines - comp=obj._narrow(Engines.TestComponent) - - comp.Coucou(1) - -The answer is something like:: - - 'TestComponent_i : L = 1' - -The _narrow() instruction is not always mandatory in Python, but sometimes -useful to be sure you have got the right type of object. Here, Testcomponent_ -interface is defined in CORBA module Engines. With this example, it works also -without the _narrow() instruction:: - - obj.Coucou(1) - -.. _Testcomponent: ./tui/KERNEL/interfaceEngines_1_1TestComponent.html - - -In the next example, a component instance is created in a specific Container -defined by it's computer hostname and it's name. Here we use the local -computer. Note that in Utils_Identity_, getShortHostName() gives the short -hostname of the computer, without domain suffixes, which is used in SALOME. -The container process is created here if it does not exists, and a new -component instance is created:: - - import salome - salome.salome_init() - import LifeCycleCORBA - lcc = LifeCycleCORBA.LifeCycleCORBA() - - import Utils_Identity - host = Utils_Identity.getShortHostName() - - import Engines - params={} - params['hostname']=host - params['container_name']='myContainer' - comp=lcc.LoadComponent(params,'SalomeTestComponent') - comp.Coucou(1) - -.. _Utils_Identity: ./tui/KERNEL/namespaceUtils__Identity.html - -If you want to get a list of containers and component instances, client object -from orbmodule_ provides a list:: - - import orbmodule - clt=orbmodule.client() - clt.showNS() - -.. _orbmodule: ./tui/KERNEL/classorbmodule_1_1client.html - -The list looks like:: - - Logger. - ContainerManager.object - Containers.dir - cli70ac.dir - FactoryServerPy.object - SuperVisionContainer.object - FactoryServer.object - FactoryServer.dir - SalomeTestComponent_inst_1.object - myContainer.object - myContainer.dir - SalomeTestComponent_inst_1.object - SalomeTestComponent_inst_2.object - Registry.object - Kernel.dir - ModulCatalog.object - Session.object - Study.dir - Study2.object - extStudy_1.object - extStudy_2.object - extStudy_3.object - myStudyManager.object - SalomeAppEngine.object - - -File transfer service ---------------------- - -See FileTransferCORBA_ for the C++ interface (Python interface obtained with -SWIG is very similar). - -.. _FileTransferCORBA: ./tui/KERNEL/classSALOME__FileTransferCORBA.html - -The following example shows how to tranfer a file from a remote host to the -client computer. Remote hostname is 'cli76cc', we would like to copy -'tkcvs_8_0_3.tar.gz' from remote to local computer. A full pathname is -required. A container is created on remote computer if it does not exist, -to handle the file transfer:: - - import salome - salome.salome_init() - - import LifeCycleCORBA - remotefile="/home/prascle/tkcvs_8_0_3.tar.gz" - aFileTransfer=LifeCycleCORBA.SALOME_FileTransferCORBA('cli76cc',remotefile) - localFile=aFileTransfer.getLocalFile() - - -CORBA Naming service access ---------------------------- - -See SALOME_NamingService_ for the C++ interface. The Python interface -SALOME_NamingServicePy_ is not yet derived from the C++ interface and offers -only the most useful functions. - -.. _SALOME_NamingService: ./tui/KERNEL/classSALOME__NamingService.html -.. _SALOME_NamingServicePy: ./tui/KERNEL/classSALOME__NamingServicePy_1_1SALOME__NamingServicePy__i.html - -Batch services --------------- - -See Batch_ documentation (in french only). - -.. _Batch: ./Batch.html/index.html - -All IDL Interfaces -================== - -Containers and component life cycle, File transfer service ----------------------------------------------------------- - -+-----------------------------+-----------------------------------------------+ -| Engines_ | Engines CORBA module. | -+=============================+===============================================+ -| Component_ | Generic component interface. | -| | All SALOME components inherit this interface | -+-----------------------------+-----------------------------------------------+ -| Container_ | Container: host for C++ and Python components | -| | components instances | -+-----------------------------+-----------------------------------------------+ -| FileTransfer_ | Agent for file transfer created by a container| -| | copy a local file to a distent client | -+-----------------------------+-----------------------------------------------+ -| FileRef_ | Reference to a file, used by a container for | -| | file transfers | -+-----------------------------+-----------------------------------------------+ -| ContainerManager_ | Unique instance, in charge of container | -| | creation on remote computers | -+-----------------------------+-----------------------------------------------+ -| MPIContainer_ | An exemple of parallel implementation for | -| | containers and components | -+-----------------------------+-----------------------------------------------+ -| MPIObject_ | | -+-----------------------------+-----------------------------------------------+ - -Study management ----------------- - -+-----------------------------+-----------------------------------------------+ -| SALOMEDS_ | SALOMEDS CORBA module | -+=============================+===============================================+ -| SALOMEDSidl_ | | -+-----------------------------+-----------------------------------------------+ -| SALOMEDS_Attributes_ | | -+-----------------------------+-----------------------------------------------+ - -High speed transfer, object life cycle, exceptions, GUI interface... --------------------------------------------------------------------- - -+-----------------------------+-----------------------------------------------+ -| SALOME_ | SALOME CORBA module | -+=============================+===============================================+ -| SALOME_Comm_ | | -+-----------------------------+-----------------------------------------------+ -| SALOME_GenericObj_ | | -+-----------------------------+-----------------------------------------------+ -| SALOME_Exception_ | | -+-----------------------------+-----------------------------------------------+ -| SALOME_Session_ | | -+-----------------------------+-----------------------------------------------+ - -Miscelleanous -------------- -+-----------------------------+-----------------------------------------------+ -| | other CORBA modules | -+=============================+===============================================+ -| SALOME_ModuleCatalog_ | | -+-----------------------------+-----------------------------------------------+ -| SALOME_RessourcesCatalog_ | | -+-----------------------------+-----------------------------------------------+ -| SALOME_Registry_ | | -+-----------------------------+-----------------------------------------------+ -| Logger_ | | -+-----------------------------+-----------------------------------------------+ - -**Other idl for test purposes** -nstest.idl -SALOME_TestComponent.idl -SALOME_TestModuleCatalog.idl -SALOME_TestMPIComponent.idl -TestNotif.idl - -.. _Engines: ./tui/KERNEL/namespaceEngines.html -.. _Component: ./tui/KERNEL/interfaceEngines_1_1Component.html -.. _Container: ./tui/KERNEL/interfaceEngines_1_1Container.html -.. _fileTransfer: ./tui/KERNEL/interfaceEngines_1_1fileTransfer.html -.. _fileRef: ./tui/KERNEL/interfaceEngines_1_1fileRef.html -.. _ContainerManager: ./tui/KERNEL/interfaceEngines_1_1ContainerManager.html -.. _MPIContainer: ./tui/KERNEL/interfaceEngines_1_1MPIContainer.html -.. _MPIObject: ./tui/KERNEL/interfaceEngines_1_1MPIObject.html -.. _SALOME: ./tui/KERNEL/namespaceSALOME.html -.. _SALOMEDS: ./tui/KERNEL/namespaceSALOMEDS.html -.. _SALOME_Component: ./tui/KERNEL/SALOME__Component_8idl.html -.. _SALOME_ContainerManager: ./tui/KERNEL/SALOME__ContainerManager_8idl.html -.. _SALOMEDSidl: ./tui/KERNEL/SALOMEDS_8idl.html -.. _SALOMEDS_Attributes: ./tui/KERNEL/SALOMEDS__Attributes_8idl.html -.. _SALOME_ModuleCatalog: ./tui/KERNEL/SALOME__ModuleCatalog_8idl.html -.. _SALOME_RessourcesCatalog: ./tui/KERNEL/SALOME__RessourcesCatalog_8idl.html -.. _SALOME_Registry: ./tui/KERNEL/SALOME__Registry_8idl.html -.. _Logger: ./tui/KERNEL/Logger_8idl.html -.. _SALOME_Comm: ./tui/KERNEL/SALOME__Comm_8idl.html -.. _SALOME_GenericObj: ./tui/KERNEL/SALOME__GenericObj_8idl.html -.. _SALOME_Exception: ./tui/KERNEL/SALOME__Exception_8idl.html -.. _SALOME_Session: ./tui/KERNEL/SALOME__Session_8idl.html -.. _SALOME_MPIContainer: ./tui/KERNEL/SALOME__MPIContainer_8idl.html -.. _SALOME_MPIObject: ./tui/KERNEL/SALOME__MPIObject_8idl.html - - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/Makefile.am b/doc/Makefile.am index d8d42009a..8bc7565fa 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -28,31 +28,14 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am SUBDIRS = salome -# if RST2HTML_IS_OK -# DOC_FILES = \ -# index.html \ -# UnitTests.html \ -# SALOME_Application.html \ -# INSTALL.html \ -# kernel_resources.html \ -# KERNEL_Services.html -# CSS_FILE = rst.css -# endif - -nodist_doc_DATA = $(DOC_FILES) - -EXTRA_DIST=$(DOC_FILES:%.html=%.txt) $(CSS_FILE) - -# Building html from restructured text files -STYLESHEET=$(CSS_FILE) -RST2HTML=@RST2HTML@ -RSTOPTS=--output-encoding=latin1 --stylesheet=$(STYLESHEET) - -%.html: %.txt - $(RST2HTML) $(RSTOPTS) $< $@ +docs: usr_docs usr_docs: (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) dev_docs: (cd salome && $(MAKE) $(AM_MAKEFLAGS) dev_docs) + +dist-hook: + cp -Rp $(srcdir)/configuration_examples $(distdir) + rm -rf $(distdir)/configuration_examples/CVS diff --git a/doc/SALOME_Application.txt b/doc/SALOME_Application.txt deleted file mode 100644 index 0abcaed1e..000000000 --- a/doc/SALOME_Application.txt +++ /dev/null @@ -1,353 +0,0 @@ -====================================================================== -SALOME Application Concept. Configuration for one or more computers -====================================================================== - -*html version of this document is produced with docutils*:: - - rst2html doc.txt > doc.html - -This document corresponds to SALOME2 3.2.0 - -.. contents:: -.. sectnum:: - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -The following explains how to configure your own application with your list of -modules, how to define and run this application on one or more computers. - -General principles ------------------- - -A SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). - -A SALOME User can define several SALOME Applications. These applications are -runnable from the same user account. These applications may share the same -KERNEL and modules. Thus, the application configuration is independant of -KERNEL and must not be put in KERNEL_ROOT_DIR. - -Furthermore, prerequisites may not be the same on all the applications. - -A SALOME Session can run on a several computers. - -Binary modules and prerequisites are installed on the different computers. -There is no need to have all the modules on each computer (the minimum is -KERNEL). - -There is no need of standardization or centralised information on the details -of configuration on each computer (PATH, LD_LIBRARY_PATH, environment -variables) provided the application modules are version - compatible. Details -of configuration stay private to the computer, and are held by scripts on each -computer. - -There is no hierarchy between the computers (for example only one master -computer used to launch application). - -The SALOME user has an account on all the computers. Access between -account@computer is via rsh or ssh and must be configured for use without -password (key exchange for ssh). Account may be different on each -computer. - -Application Directory ---------------------- - -Two ways for creation of an application directory -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First way - references to different module directories -'''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an -application directory with the given path in parameter. ${APPLI} is a path -relative to ${HOME}. - -The directory is only a skeleton, the user has to edit several files to -configure his own application. These files are described after, the list is: - -- env.d/atFirst.sh -- env.d/envProducts.sh -- env.d/envSalome.sh -- CatalogResources.xml -- SalomeApp.xml - -Second and easiest way - one single virtual install directory -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The user must create a SALOME application configuration file by modifying a -copy of ${KERNEL_ROOT_DIR}/bin/salome/config_appli.xml. -The file describes the list of SALOME modules used in the application, with -their respective installation path. The configuration file also defines the -path of an existing script which sets the SALOME prerequisites, -and optionnaly, the path of samples directory (SAMPLES_SRC). -The following command:: - - python /bin/salome/appli_gen.py --prefix= --config= - -creates a virtual installation of SALOME in the application directory ${APPLI} -(bin, lib, doc, share...), with, for each file (executable, script, data, -library, resources...), symbolic links to the actual file. - -Providing an existing an existing script for SALOME prerequisites (the same one -used for modules compilation, or given with the modules installation), the -installation works without further modification for a single computer (unless -some modules needs a special environment not defined in the above script). -For a distributed application (several computers), one must copy and adapt -CatalogResources.xml from ${KERNEL_ROOT_DIR}/bin/salome/appliskel (see below). - -General rules -------------- - -Directory ${APPLI} must be created on each computer of the application. -The easiest way is to use the same relative path (to ${HOME}) on each computer. -(Sometimes it is not possible to use the same path everywhere, for instance -when ${HOME} is shared with NFS, so it is possible to define different path -following the computers). - -The ${APPLI} directory contains scripts for environment and runs. Environment -scripts must be configured (by the user) on each computer. All the environment -scripts are in the ${APPLI}/env.d directory. - -The script ${APPLI}/envd sources **all** the files (\*.sh) in ${APPLI}/env.d -in alphanumeric order (after edition, think to remove backup files). the envd -script is used by run scripts. - - -env.d scripts -~~~~~~~~~~~~~ -With the first way of installation, each user **must define** his own -configuration for these scripts, following the above rules. -With the virtual installation (second way, above), env.d -scripts are built automatically. - - **The following is only an example proposed by createAppli.sh, (first way of installation) not working as it is**. - -atFirst.sh - Sets the computer configuration not directly related to SALOME, - like useful tools, default PATH. - -envProducts.sh - Sets the SALOME prerequisites. - -envSALOME.sh - Sets all the MODULE_ROOT_DIR that can be used in the SALOME application. - - SalomeAppConfig is also defined by:: - - export SalomeAppConfig=${HOME}/${APPLI} - - where SalomeAppConfig designates the directory containing SalomeApp.xml. - Note that ${APPLI} is already defined by the calling scripts when - env.d/envSalome.sh is sourced. - -User run scripts -~~~~~~~~~~~~~~~~ - -The SALOME user can use 4 scripts: - -runAppli - Launches a SALOME Session - (similar to ${KERNEL_ROOT_DIR}/bin/salome/runSalome but with a different - name to avoid confusions). - -runSession - Launches a shell script in the SALOME application environment, with access - to the current (last launched) SALOME session (naming service), if any. - Without arguments, the script is interactive. With arguments, the script - executes the command in the SALOME application environment. - -runConsole - Gives a python console connected to the current SALOME Session. - It is also possible to use runSession, then python. - -runTests - Similar to runSession, used for unit testing. runSession tries to use an - already existing naming service definition from a running session (hostname - and port number), runTests defines a new configuration for naming service - (new port number). - -SALOME internal run scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -envd - Sets SALOME application environment, envd is sourced by other scripts. - -For remote calls, SALOME uses one script. - -runRemote.sh - This script is mainly used to launch containers. The first 2 arguments - define the hostname and port userd for naming service, the remaining - arguments define the command to execute. - -Other configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~ - -SalomeApp.xml - This file is similar to the default given - in ${GUI_ROOT_DIR}/share/salome/resources/gui - - -CatalogRessources.xml - This files describes all the computers the application can use. The given - example is minimal and suppose ${APPLI} is the same relative path - to ${HOME}, on all the computers. A different directory can be set on a - particular computer with a line:: - - appliPath="my/specific/path/on/this/computer" - - -Examples of use ---------------- - -Launch a SALOME session with a GUI interface -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Launch is done with a command like:: - - ./runAppli --logger - -The --logger option means here : collect all the traces from the all the -distributed process, via CORBA, in a single file : logger.log. - -There are a lot of options, a complete list is given by:: - - ./runAppli --help - -Note that, without argument, runAppli is a non interactive Python application, -and, with arguments, runAppli is an interactive Python interpreter. - -Several options are already defined by default in SalomeApp.xml files. Optional -arguments given in the command override the SalomeApp.xml configuration. - -Several sessions can run simultaneously, each session use a different port for -CORBA naming service, so the sessions are totally separated from each other. - -When the GUI is closed, the different SALOME servers are still running. - -Close a SALOME session, kill all the servers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Inside the interactive python interpreter you get when you use runAppli -with arguments, you can kill all the servers of your session with:: - - >>> killLocalPort() - -or the servers of all the sessions with:: - - >>> killAllPorts() - -If you have no active Python interpreter connected to your session, you can -kill all the SALOME servers of **all the sessions** on a given computer:: - - ./runSession killSalome.py - -Remember! it's the same idea in *Windows (R) operating system* [#]_ : -use the start menu to stop... - -When you use only one session at a time, you don't need more. - -To kill a given session (when several session are running), one needs -the naming service port number:: - - ./runSession killSalomeWithPort 2810 - -Note that the port number of the last launched session can be found on Linux, -in the prompt, within a runSession shell (see below). - -It is also possible to get the Naming Service host and port number of -the last launched session with:: - - ./runSession NSparam.py - -.. [#] Microsoft and Windows are either registered trademarks or trademarks of - Microsoft Corporation in the United States and/or other countries. - -Launch a SALOME session without GUI interface -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This is used to launch a SALOME Python script without GUI -(no GUI server = SALOME_session_server) - -Example of script (test_session_geom.py):: - - import salome_session - salome_session.startSession(modules=["GEOM"]) - import GEOM_usinggeom - raw_input("Press a key and the servers will be killed ...") - -This script is run in a non interactive way with:: - - ./runSession python test_session_geom.py - -All the process are automatically killed when Python is closed -(with salome_session delete). - -Add an external Python interpretor to a running session -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -It's often easier to develop and try Python scripts outside the GUI embedded -Python interpreter. Imagine, for instance, you are writing a script involving -geometry and mesh modules. -first, launch a SALOME session with gui, then, on another terminal:: - - ./runSession - python - -Import salome module. salome_init() without arguments creates a new study -in the running session (note: salome_init(n) attachs to a running session whose -studyId is n):: - - import salome - salome.salome_init() - -An example of script given with SMESH:: - - import ex01_cube2build - -It is possible to connect the GUI interface to the study created in the above -script with the file/connect menu, then browse study and display objects. -Further modifications on study can be done either with GUI or external script -(use refresh popup in GUI object browser to see study modifications generated -by the external script). **AVOID modifications with GUI when a Python script -is running**. Not all the modules are protected against concurrent actions... - - -Different uses of the runSession shell interpreter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -runSession invoked without arguments gives an interactive shell with the full -environment of SALOME (PATH, LD_LIBRARY_PATH, PYTHONPATH, other variables). -If there are running sessions of the same SALOME application, runSession -connects to the last launched session (i.e. gets the naming service references -of the session: hostname and port) - -On Linux, the shell prompt (bash) gives information on naming service -references, hostname and port:: - - [NS=cli76cc:2811]prascle@cli76cc:~/SALOME2/Run/Virtual$ - -If there is no running session, prompt looks like:: - - [NS=:]prascle@cli76cc:~/SALOME2/Run/Virtual$ - -runSession is useful to launch any script or program which needs the complete -SALOME environment, with or without a session already running. -For instance, to launch the ddd debugger interface on the gui server, first -launch a SALOME session with gui, then, on another terminal:: - - ./runSession ddd - -Then attach to the running SALOME_Session_Server process. - - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/UnitTests.txt b/doc/UnitTests.txt deleted file mode 100644 index 987db0ec1..000000000 --- a/doc/UnitTests.txt +++ /dev/null @@ -1,217 +0,0 @@ -================================================================= -Source code structuration and Unit Tests -================================================================= - -*html version of this document is produced with docutils*:: - - rst2html < doc.txt > doc.html - -*This document corresponds to SALOME2 3.2.0* - -.. contents:: -.. sectnum:: - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -You will find here general information on code directories structure, -unit tests associated to the different kind of classes, and how to run -the unit tests. - -SALOME KERNEL source code structuration -======================================= - -General structure of KERNEL_SRC -------------------------------- - -KERNEL_SRC - Some README files and configuration tools for build - -KERNEL_SRC/adm_local - Part of the configuration files, other modules have a directory with the - same name. Not used in KERNEL. - -KERNEL_SRC/bin - Python and shell scripts used at run time. - Kit to install a SALOME Application. - -KERNEL_SRC/doc - Kit for KERNEL end user documentation production: - public interfaces, Python, CORBA. - Integrator and Developper documentation. - -KERNEL_SRC/idl - All CORBA interfaces from KERNEL are regrouped here. - -KERNEL_SRC/resources - Configuration files for servers (examples). - Interfaces definitions for KERNEL test components. - -KERNEL_SRC/salome_adm - Configuration files used by autotools (M4 macros & co.) - -KERNEL_SRC/src - The source code (C++ and Python) - - -Directory src: C++ and Python source code ------------------------------------------ - -Basic services non related to CORBA -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Basics - A set of general purpose C++ services, not related to CORBA. - Some general purpose services that are in Utils directory (CORBA related), - are progressivley moved here, as they are not related to CORBA. - - -SALOMELocalTrace - A multithread trace system that allows message tracing on standard error - or a file. - -CASCatch - Exceptions and signal handler. - -HDFPersist - A C++ interface to HDF. - -Basic CORBA services -~~~~~~~~~~~~~~~~~~~~ - -Logger - A CORBA server that collects the trace messages from differents CORBA - process. - -SALOMETraceCollector - A multithread trace system derived from SALOMELocalTrace, that sends messages - to Logger server via CORBA. - -Utils - A set of general purpose services related to CORBA, such as basic CORBA - exception system. See also Basics directory above. - -NamingService - C++ and Python interfaces to name, store and retrieve CORBA objects - -GenericObj - A generic CORBA interface for CORBA objects, to count distributed references, - and to allow destruction by client. - -Miscellaneous CORBA servers -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Registry - Implements SALOME_registry.idl. - Provides a CORBA server library and a separate server program. - -ModuleCatalog - Implements SALOME_moduleCatalog.idl. - Provide a CORBA server library and separate server and client programs. - -ModuleGenerator - Tool to generate a module catalog from CORBA idl - -ResourcesManager - library included in container server - -Notification - library included in differents servers (container) - -NOTIFICATION_SWIG - - -CORBA Containers for SALOME Modules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Container - -TestContainer - -LifeCycleCORBA - -LifeCycleCORBA_SWIG - -STUDY server and related interfaces and tools -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -SALOMEDSClient - -TOOLSDS - -SALOMEDSImpl - -SALOMEDS - -Python interface to SALOME -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -KERNEL_PY - -Efficient CORBA transfer services -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Communication - -Communication_SWIG - -A Parallel container with MPI -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MPIContainer - -TestMPIContainer - -Batch interface library -~~~~~~~~~~~~~~~~~~~~~~~ - -Batch - -Batch_SWIG - -Unit tests -~~~~~~~~~~ - -UnitTests - - -Tools and principles used for Unit testing -========================================== - -**TO BE COMPLETED** - -Unit Testing rely on cppunit package for C++ testing, and on unittest module -for Python. See these products for general principles of unit testing. - -The cppunit package is optional. When the prerequisite is detected, the unit -tests are compiled. - -Unit Tests sources are in directories Test under the src/directories -containing the classes to test. - -Test are ordered following the order of directories given above. - -Tests can be run as a whole, or for a particular directory. In this case, only -a partial test is run (the classes to test, and the classes used, i.e. the -preceding test directories). - - -Today, only some tests are written as an example. There are not yet python -scripts in KERNEL_SRC, but it's a matter of days, there are working scripts -to test LifeCycleCORBA_SWIG interface. - - - - - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/index.txt b/doc/index.txt deleted file mode 100644 index 0120b1d9c..000000000 --- a/doc/index.txt +++ /dev/null @@ -1,113 +0,0 @@ -================================================================= -KERNEL common Services -================================================================= - -*html version of this document is produced with docutils*:: - - rst2html < doc.txt > doc.html - -*This document corresponds to SALOME2 3.2.0* - -.. contents:: -.. sectnum:: - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -**General information, for users, integrators and developers** - -**Users, integrators and developers, which documentation ?** - -Following your kind of usage of SALOME, you will find some specific -introductory documentation, listed below. - -End user -======== - -How to configure a SALOME application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The end user may have to configure his own SALOME application by selection of a -subset of availables SALOME modules. He also may want to install his -application on several computers. - -See SALOME_Application_ to define your own configuration of SALOME and run it -on one or several computers. This is the recommended way of configuration. - -.. _SALOME_Application: ./SALOME_Application.html - - -How to launch SALOME in a SALOME application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See SALOME_Application_. - -How to use KERNEL services in Python scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The SALOME KERNEL offers offers a list of services available in Python. - -See KERNEL_Services_. - -.. _KERNEL_Services: ./KERNEL_Services.html - -Application Integrator -====================== - -Applications integrators are in charge of configuration and installation of -specific SALOME applications over a local network. Application Integrators -built SALOME modules binaries from sources tarballs. - -How to install SALOME -~~~~~~~~~~~~~~~~~~~~~ - -See INSTALL_ for general information on required configuration and -prerequisites, compilation procedure, setting environment principles. - -.. _INSTALL: ./INSTALL.html - -How to configure a SALOME application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See SALOME_Application_ to define your own configuration of SALOME and run it -on one or several computers. This is the recommended way of configuration. - -.. _SALOME_Application: ./SALOME_Application.html - - -Module maintainer -================= - -Module maintainers are in charge of the development and debug of the SALOME -modules. Each SALOME module is stored in a CVS base. CVS bases are organised -in separate branches for developments and debug. All official or development -releases are identified by a CVS tag. - -Source code structuration and Unit Tests -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See UnitTests_ for general information on code directories structure, -unit tests associated to the different kind of classes, and how to run -the unit tests. - -.. _UnitTests: ./UnitTests.html - -Some development utilities -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See kernel_resources_ for information on basic utilities for C++ and Python -development, like trace and debug, exceptions, singleton. - -.. _kernel_resources: ./kernel_resources.html - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/kernel_resources.txt b/doc/kernel_resources.txt deleted file mode 100644 index 0bc9700da..000000000 --- a/doc/kernel_resources.txt +++ /dev/null @@ -1,507 +0,0 @@ -====================================================================== -SALOME Kernel resources for developer -====================================================================== - -*html version of this document is produced with docutils*:: - - rst2html doc.txt > doc.html - -*This document corresponds to SALOME2 3.2.0* - -:Authors: - Antoine Yessayan, - Paul Rascle - -:Version: 0.3 - february 17, 2006 - -+-------------------------------------------+ -| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | -+-------------------------------------------+ - -------------------------------------------------------------------------------- - -**Abstract** - -This document describes the development environment for -C++ and Python. Makefiles generation and usage are -introduced in another document: "using the SALOME -configuration and building system environment". -Development environment is intended here as: trace and -debug macros usage; SALOME exceptions usage, in C++ and -Python; user CORBA exceptions usage, in C++ and Python, -with and without Graphical User Interface; some general -purpose services such as singleton, used for CORBA -connection and disconnection. - -.. contents:: -.. sectnum:: - -------------------------------------------------------------------------------- - -Trace and debug Utilities -========================= - -During the development process, an execution log is -useful to identify problems. This log contains -messages, variables values, source files names and line -numbers. It is recommended to verify assertions on -variables values and if necessary, to stop the -execution at debug time, in order to validate all parts -of code. - -Two modes: debug and release ----------------------------- - -The goal of debug mode is to check as many features as -possible during the early stages of the development -process. The purpose of the utilities provided in -SALOME is to help the developer to add detailed traces -and check variables values, without writing a lot of code. - -When the code is assumed to be valid, the release mode -optimizes execution, in terms of speed, memory, and -display only user level messages. - -But, some informations must always be displayed in both -modes: especially messages concerning environment or -internal errors, with version identification. When an -end user is confronted to such a message, he may refer -to a configuration documentation or send the message to -the people in charge of SALOME installation, or to the -development team, following the kind of error. - -C++ Macros for trace and debug ------------------------------- - -SALOME provides C++ macros for trace and debug. These -macros are in:: - - KERNEL_SRC/src/SALOMELocalTrace/utilities.h - -This file must be included in C++ source. Some -macros are activated only in debug mode, others are -always activated. To activate the debug mode, ``_DEBUG_`` -must be defined, which is the case when SALOME -Makefiles are generated from configure, without -options. When ``_DEBUG_`` is undefined (release mode: -``configure --disable-debug --enable-production``), the -debug mode macros are defined empty (they do nothing). -So, when switching from debug to release, it is -possible (and recommended) to let the macro calls -unchanged in the source. - -All the macros generate trace messages, stored in a -circular buffer pool. A separate thread reads the -messages in the buffer pool, and, depending on options -given at SALOME start, writes the messages on the -standard output, a file, or send them via CORBA, in -case of a multi machine configuration. - -Three informations are systematically added in front of -the information displayed: - -* the thread number from which the message come from; - -* the name of the source file in which the macros is set; - -* the line number of the source file at which the macro - is set. - -Macros defined in debug and release modes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**INFOS_COMPILATION** - The C++ macro INFOS_COMPILATION writes on the trace - buffer pool informations about the compiling process: - - * the name of the compiler : g++, KCC, CC, pgCC; - - * the date and the time of the compiling processing process. - - This macro INFOS_COMPILATION does not have any - argument. Moreover, it is defined in both compiling - mode : _DEBUG_ and _RELEASE_. - - Example:: - - #include "utilities.h" - int main(int argc , char **argv) - { - INFOS_COMPILATION; - ... - } - INFOS(str) - -**INFOS** - In both compiling mode _DEBUG_ and _RELEASE_, The C++ - macro INFOS writes on the trace buffer pool the string - which has been passed in argument by the user. - - Example:: - - #include "utilities.h" - int main(int argc , char **argv) - { - ... - INFOS("NORMAL END OF THE PROCESS"); - return 0; - } - - displays:: - - main.cxx [5] : NORMAL END OF THE PROCESS - - -**INTERRUPTION(str)** - In both compiling mode _DEBUG_ and _RELEASE_, The C++ - macro INTERRUPTION writes on the trace buffer pool the - string, with a special ABORT type. When the thread in - charge of collecting messages finds this message, it - terminates the application, after message treatment. - -**IMMEDIATE_ABORT(str)** - In both compiling mode _DEBUG_ and _RELEASE_, The C++ - macro IMMEDIATE_ABORT writes the message str immediately on - standard error and exits the application. Remaining - messages not treated by the message collector thread - are lost. - -Macros defined only in debug mode -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**MESSAGE(str)** - In _DEBUG_ compiling mode only, the C++ macro MESSAGE - writes on the trace buffer pool the string which has - been passed in argument by the user. In _RELEASE_ - compiling mode, this macro is blank. - - Example:: - - #include "utilities.h" - #include - - using namespace std; - - int main(int argc , char **argv) - { - ... - const char *str = "Salome"; - MESSAGE(str); - ... const string st; - st = "Aster"; - MESSAGE(c_str(st+" and CASTEM")); - return 0; - } - - displays:: - - - Trace main.cxx [8] : Salome - - Trace main.cxx [12] : Aster and CASTEM - -**BEGIN_OF(func_name)** - In _DEBUG_ compiling mode, The C++ macro BEGIN_OF - appends the string "Begin of " to the one passed in - argument by the user and displays the result on the - trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - - Example:: - - #include "utilities.h" - int main(int argc , char **argv) - { - BEGIN_OF(argv[0]); - return 0; - } - - displays:: - - - Trace main.cxx [3] : Begin of a.out - - -**END_OF(func_name)** - In _DEBUG_ compiling mode, The C++ macro END_OF appends - the string "Normal end of " to the one passed in - argument by the user and displays the result on the - trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - - Example:: - - #include "utilities.h" - int main(int argc , char **argv) - { - END_OF(argv[0]); - return 0; - } - - displays:: - - - Trace main.cxx [4] : Normal end of a.out - -**SCRUTE(var)** - In _DEBUG_ compiling mode, The C++ macro SCRUTE - displays its argument which is an application variable - followed by the value of the variable. In _RELEASE_ - compiling mode, this macro is blank. - - Example:: - - #include "utilities.h" - int main(int argc , char **argv) - { - const int i=999; - if( i > 0 ) SCRUTE(i) ; i=i+1; - return 0; - } - - displays:: - - - Trace main.cxx [5] : i=999 - -**ASSERT(condition)** - In _DEBUG_ compiling mode only, The C++ macro ASSERT - checks the expression passed in argument to be not - NULL. If it is NULL the condition is written with the - macro INTERRUPTION (see above). The process exits after - trace of this last message. In _RELEASE_ compiling - mode, this macro is blank. N.B. : if ASSERT is already - defined, this macro is ignored. - - Example:: - - #include "utilities.h" - ... - const char *ptrS = fonc(); - ASSERT(ptrS!=NULL); - cout << strlen(ptrS); - float table[10]; - int k; - ... - ASSERT(k<10); - cout << table[k]; - -Exceptions -========== - -C++ exceptions: class SALOME_Exception --------------------------------------- - -definition -~~~~~~~~~~ - -The class SALOME_Exception provides a generic method to -send a message, with optional source file name and line -number. This class is intended to serve as a base class -for all kinds of exceptions SALOME code. All the -exceptions derived from SALOME_Exception could be -handled in a single catch, in which the message -associated to the exception is displayed, or sent to a -log file. - -The class SALOME_Exception inherits its behavior from -the STL class exception. - -usage -~~~~~ - -The header SALOME/src/utils/utils_SALOME_Exception.hxx -must be included in the C++ source, when raised or trapped:: - - #include "utils_SALOME_Exception.hxx" - -The SALOME_Exception constructor is:: - - SALOME_Exception( const char *text, - const char *fileName=0, - const unsigned int lineNumber=0 ); - -The exception is raised like this:: - - throw SALOME_Exception("my pertinent message"); - -or like this:: - - throw SALOME_Exception(LOCALIZED("my pertinent message")); - -where LOCALIZED is a macro provided with -``utils_SALOME_Exception.hxx`` which gives file name and -line number. - -The exception is handled like this:: - - try - { - ... - } - catch (const SALOME_Exception &ex) - { - cerr << ex.what() <::Instance() ; - assert(ptrPoint!=NULL) ; - -No need to delete ptrPoint. Deletion is achieved -automatically at exit. If the user tries to create more -than one singleton by using the class method -SINGLETON_::Instance(), the pointer is returned -with the same value even if this is done in different -functions (threads ?):: - - POINT *p1=SINGLETON_::Instance() ; - ... - POINT *p2=SINGLETON_::Instance() ; - - assert(p1==p2) - -Design description -~~~~~~~~~~~~~~~~~~ - -Here are the principles features of the singleton -design: - -* the user creates an object of class TYPE by using the - class method ``SINGLETON_::Instance()`` which - returns a pointer to the single object ; - -* to create an object, ``SINGLETON_::Instance()`` - uses the default constructor of class TYPE ; - -* at the same time, this class method creates a - destructor object which is added to the generic list - of destructor objects to be executed at the end of - the application (atexit) ; - -* at the end of the application process all the - deletions are performed by the ``Nettoyage()`` C function - which executes the destruction objects end then - deletes the destructions objects themselves ; - -* the ``Nettoyage()`` C function using ``atexit()`` C function - is embedded in a static single object ``ATEXIT_()``. - - -------------------------------------------------------------------------------- - -+----------------------------------+------------------------------------------+ -| `General KERNEL documentation`_ | `End User KERNEL Doxygen documentation`_ | -+----------------------------------+------------------------------------------+ - -.. _`General KERNEL documentation`: ./index.html -.. _`End User KERNEL Doxygen documentation`: ./tui/KERNEL/index.html diff --git a/doc/rst.css b/doc/rst.css deleted file mode 100644 index 38bd7dcab..000000000 --- a/doc/rst.css +++ /dev/null @@ -1,288 +0,0 @@ -/* -:Authors: David Goodger, David Abrahams -:Contact: goodger@users.sourceforge.net, dave@boost-consulting.com -:date: $Date$ -:version: $Revision$ -:copyright: This stylesheet has been placed in the public domain. - -This stylesheet is for the use of ReStructuredText in a Boost context. -It is basically an agglomeration of boost.css and the default.css that -comes from docutils. - - */ - -.first { - margin-top: 0 } - -.last { - margin-bottom: 0 } - -a.toc-backref { - text-decoration: none ; - color: #00008B } - -dd { - margin-bottom: 0.5em } - -div.abstract { - margin: 2em 5em } - -div.abstract p.topic-title { - font-weight: bold ; - text-align: center } - -div.attention, div.caution, div.danger, div.error, div.hint, -div.important, div.note, div.tip, div.warning, div.admonition { - margin: 2em ; - border: medium outset ; - padding: 1em } - -div.attention p.admonition-title, div.caution p.admonition-title, -div.danger p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title { - color: red ; - font-weight: bold ; - font-family: sans-serif } - -div.hint p.admonition-title, div.important p.admonition-title, -div.note p.admonition-title, div.tip p.admonition-title, -div.admonition p.admonition-title { - font-weight: bold ; - font-family: sans-serif } - -div.dedication { - margin: 2em 5em ; - text-align: center ; - font-style: italic } - -div.dedication p.topic-title { - font-weight: bold ; - font-style: normal } - -div.figure { - margin-left: 2em } - -div.footer, div.header { - font-size: smaller } - -div.sidebar { - margin-left: 1em ; - border: medium outset ; - padding: 0em 1em ; - background-color: #ffffee ; - width: 40% ; - float: right ; - clear: right } - -div.sidebar p.rubric { - font-family: sans-serif ; - font-size: medium } - -div.system-messages { - margin: 5em } - -div.system-messages h1 { - color: red } - -div.system-message { - border: medium outset ; - padding: 1em } - -div.system-message p.system-message-title { - color: red ; - font-weight: bold } - -div.topic { - margin: 2em } - -H1.title -{ - FONT-SIZE: 150%; - COLOR: #00008B; - text-align: center -} -H1 -{ - FONT-SIZE: 125%; -} -H2 -{ - FONT-SIZE: 108%; -} -h2.subtitle { - text-align: center } -H3 -{ - FONT-SIZE: 100%; -} -BODY -{ - FONT-SIZE: 100%; - BACKGROUND-COLOR: #ffffff; -} -PRE -{ - MARGIN-LEFT: 2em; - FONT-FAMILY: Courier; -} -CODE -{ - FONT-FAMILY: Courier; - white-space: pre; -} -.pre -{ - FONT-FAMILY: Courier; - white-space: pre; -} -.index -{ - TEXT-ALIGN: left; -} -.page-index -{ - TEXT-ALIGN: left; -} -.definition -{ - TEXT-ALIGN: left; -} -.footnote -{ - FONT-SIZE: 66%; - VERTICAL-ALIGN: super; - TEXT-DECORATION: none; -} -.function-semantics -{ - CLEAR: left; -} - -hr { - width: 75% } - -ol.simple, ul.simple { - margin-bottom: 1em } - -ol.arabic { - list-style: decimal } - -ol.loweralpha { - list-style: lower-alpha } - -ol.upperalpha { - list-style: upper-alpha } - -ol.lowerroman { - list-style: lower-roman } - -ol.upperroman { - list-style: upper-roman } - -p.attribution { - text-align: right ; - margin-left: 50% } - -p.caption { - font-style: italic } - -p.credits { - font-style: italic ; - font-size: smaller } - -p.label { - white-space: nowrap } - -p.rubric { - font-weight: bold ; - font-size: larger ; - color: maroon ; - text-align: center } - -p.sidebar-title { - font-family: sans-serif ; - font-weight: bold ; - font-size: larger } - -p.sidebar-subtitle { - font-family: sans-serif ; - font-weight: bold } - -p.topic-title { - font-weight: bold } - -pre.address { - margin-bottom: 0 ; - margin-top: 0 ; - font-family: serif ; - font-size: 100% } - -pre.line-block { - font-family: serif ; - font-size: 100% } - -pre.literal-block, pre.doctest-block { - margin-left: 2em ; - margin-right: 2em ; - font-size: 80%; - border: solid thin gray ; - background-color: #eeeeee } - -span.classifier { - font-family: sans-serif ; - font-style: oblique } - -span.classifier-delimiter { - font-family: sans-serif ; - font-weight: bold } - -span.interpreted { - font-family: sans-serif } - -span.option { - white-space: nowrap } - -span.option-argument { - font-style: italic } - -span.pre { - white-space: pre } - -span.problematic { - color: red } - -table { - margin-top: 0.5em ; - margin-bottom: 0.5em } - -table.citation { - border-left: solid thin gray ; - padding-left: 0.5ex } - -table.docinfo { - margin: 2em 4em } - -table.footnote { - border-left: solid thin black ; - padding-left: 0.5ex } - -td, th { - padding-left: 0.5em ; - padding-right: 0.5em ; - vertical-align: top } - -th.docinfo-name, th.field-name { - font-weight: bold ; - text-align: left ; - white-space: nowrap } - -/* - dwa 2003/7/29 -- commented out so that it wouldn't override earlier - styles from boost.css - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - font-size: 100% } -*/ - -ul.auto-toc { - list-style-type: none } diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am index 81cbabb59..3c59afb8b 100644 --- a/doc/salome/Makefile.am +++ b/doc/salome/Makefile.am @@ -26,40 +26,19 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -SUBDIRS= tui -SUBDIRSGUI= tui -SUBDIRSTUI= tui +SUBDIRS= tui gui -index_html: - $(INSTALL) -d $(DESTDIR)$(docdir); +docs:usr_docs -usr_docs: index_html - list='$(SUBDIRSGUI)'; for subdir in $$list; do \ - echo "Making usr_docs in $$subdir"; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) usr_docs) \ - done; +usr_docs: + echo "Making usr_docs in gui"; \ + (cd gui && $(MAKE) $(AM_MAKEFLAGS) usr_docs) -dev_docs: index_html - list='$(SUBDIRSTUI)'; for subdir in $$list; do \ - echo "Making dev_docs in $$subdir"; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) dev_docs) \ - done; - - -# VSR: nullify these make targets to avoid 'make distcheck' failure -dvi: -pdf: -ps: - -info_TEXINFOS = Batch.texi - -install-data-local: html usr_docs - cp -rp $(top_builddir)/doc/salome/Batch.html $(DESTDIR)$(docdir) - -uninstall-local: - rm -rf $(DESTDIR)$(docdir)/Batch.html +dev_docs: + echo "Making dev_docs in tui"; \ + (cd tui && $(MAKE) $(AM_MAKEFLAGS) dev_docs) EXTRA_DIST= main.dox install.dox \ kernel_resources.dox kernel_services.dox \ salome_application.dox unittests.dox \ - salome_file.dox batch.dox + salome_file.dox diff --git a/doc/salome/batch.dox b/doc/salome/batch.dox deleted file mode 100644 index 7e0e4e29b..000000000 --- a/doc/salome/batch.dox +++ /dev/null @@ -1,10 +0,0 @@ -/*! - -\page batch_page Batch - - Batch documentation - -*/ - - - diff --git a/doc/salome/examples/example1 b/doc/salome/examples/example1 new file mode 100644 index 000000000..eae882cae --- /dev/null +++ b/doc/salome/examples/example1 @@ -0,0 +1,45 @@ + +# create AttributeReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# save / restore study +#================================= + +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +#file = "/tmp/ggg.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file) + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeReal +#================================= + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" diff --git a/doc/salome/examples/example10 b/doc/salome/examples/example10 new file mode 100644 index 000000000..756e4a3f1 --- /dev/null +++ b/doc/salome/examples/example10 @@ -0,0 +1,50 @@ + +# create AttributeExpandable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute( batchmode_geompy.father, "AttributeExpandable") +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" +A = A._narrow(SALOMEDS.AttributeExpandable) + +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" + +A.SetExpandable(1) + +if A.IsExpandable() == 0: + "Error: wrong value of AttributeExpandable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeExpandable +#============================================================ + +res,A=father.FindAttribute("AttributeExpandable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeExpandable" + +A = A._narrow(SALOMEDS.AttributeExpandable) + +if A == None : + raise RuntimeError, "Can't create AttributeExpandable attribute" + +if A.IsExpandable() == 0: + "Error: wrong value of AttributeExpandable" + diff --git a/doc/salome/examples/example11 b/doc/salome/examples/example11 new file mode 100644 index 000000000..4cfd732fd --- /dev/null +++ b/doc/salome/examples/example11 @@ -0,0 +1,49 @@ + +# create AttributeOpened +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeOpened") +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" +A = A._narrow(SALOMEDS.AttributeOpened) + +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" + +A.SetOpened(1) + +if A.IsOpened() == 0: + "Error: wrong value of AttributeOpened" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeOpened +#============================================================ + +res,A=father.FindAttribute("AttributeOpened") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeOpened" + +A = A._narrow(SALOMEDS.AttributeOpened) + +if A == None : + raise RuntimeError, "Can't create AttributeOpened attribute" + +if A.IsOpened() == 0: + "Error: wrong value of AttributeOpened" diff --git a/doc/salome/examples/example12 b/doc/salome/examples/example12 new file mode 100644 index 000000000..760587736 --- /dev/null +++ b/doc/salome/examples/example12 @@ -0,0 +1,57 @@ + +#-------------------------------------------------------------------------- +# create AttributeTextColor +#=========================================================== +import SALOMEDS_Attributes_idl +color = SALOMEDS_Attributes_idl._0_SALOMEDS.Color(234,345,231) + +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextColor") + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" +A = A._narrow(SALOMEDS.AttributeTextColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" + +A.SetTextColor(color) + +c = A.TextColor(); + +if c.R != 234 or c.G != 345 or c.B != 231: + print "Error: wrong value of AttributeTextColor" + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeTextColor +#============================================================ + +res,A=father.FindAttribute("AttributeTextColor") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTextColor" + +A = A._narrow(SALOMEDS.AttributeTextColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextColor attribute" + +c = A.TextColor(); +if c.R != 234 or c.G != 345 or c.B != 231: + print "Error: wrong value of AttributeTextColor" + diff --git a/doc/salome/examples/example13 b/doc/salome/examples/example13 new file mode 100644 index 000000000..c05aaff52 --- /dev/null +++ b/doc/salome/examples/example13 @@ -0,0 +1,60 @@ + +#-------------------------------------------------------------------------- +# create AttributeTextHighlightColor +#=========================================================== + +import SALOMEDS_Attributes_idl +highlightcolor=SALOMEDS_Attributes_idl._0_SALOMEDS.Color(256,256,256) + +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextHighlightColor") + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" +A = A._narrow(SALOMEDS.AttributeTextHighlightColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" + +A.SetTextHighlightColor(highlightcolor) + +c = A.TextHighlightColor(); +if c.R != 256 or c.G != 256 or c.B != 256: + print "Error: wrong value of AttributeTextHighlightColor" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeTextHighlightColor +#============================================================ + +res, A = father.FindAttribute("AttributeTextHighlightColor") +print res, A +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTextHighlightColor" + +A = A._narrow(SALOMEDS.AttributeTextHighlightColor) + +if A == None : + raise RuntimeError, "Can't create AttributeTextHighlightColor attribute" + +c = A.TextHighlightColor(); + +if c.R != 256 or c.G != 256 or c.B != 256: + print "Error: wrong value of AttributeTextTextHighlightColor" + diff --git a/doc/salome/examples/example14 b/doc/salome/examples/example14 new file mode 100644 index 000000000..a0acf346d --- /dev/null +++ b/doc/salome/examples/example14 @@ -0,0 +1,47 @@ + +#-------------------------------------------------------------------------- +# create AttributePixMap +#=============================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePixMap") +if A == None : + raise RuntimeError, "Can't create AttributePixMap attribute" +aPixmap = A._narrow(SALOMEDS.AttributePixMap); +aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" ); + +if aPixmap.GetPixMap() != "ICON_OBJBROWSER_Geometry": + print "Error: wrong value of AttributePixMap" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributePixMap +#============================================================ + +res,A=father.FindAttribute("AttributePixMap") +if res == 0 or A == None: + raise RuntimeError, "Error: AttributePixMap not found " + +A = A._narrow(SALOMEDS.AttributePixMap) + +if A == None : + raise RuntimeError, "Can't create AttributePixMap attribute" + +if A.GetPixMap() != "ICON_OBJBROWSER_Geometry": + print "Error: wrong value of AttributePixMap" + diff --git a/doc/salome/examples/example15 b/doc/salome/examples/example15 new file mode 100644 index 000000000..42493fe01 --- /dev/null +++ b/doc/salome/examples/example15 @@ -0,0 +1,43 @@ + +# create AttributeLocalID +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeLocalID") +if A == None : + raise RuntimeError, "Can't create AttributeLocalID attribute" +A = A._narrow(SALOMEDS.AttributeLocalID) + +A.SetValue(763242882) + +if A.Value() != 763242882: + print "Error: wrong value of AttributeLocalID" + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeLocalID +#================================= + +res,A=father.FindAttribute("AttributeLocalID") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeLocalID" + +A = A._narrow(SALOMEDS.AttributeLocalID) + +if A.Value() != 763242882: + print "Error: wrong value of AttributeLocalID" + diff --git a/doc/salome/examples/example16 b/doc/salome/examples/example16 new file mode 100644 index 000000000..3be50d9b6 --- /dev/null +++ b/doc/salome/examples/example16 @@ -0,0 +1,151 @@ + +dir= os.getenv("TmpDir") +if dir == None: + dir = "/tmp" + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +# 1st transaction ----------------------------------------- +batchmode_geompy.myBuilder.NewCommand() +# create AttributeSequenceOfInteger +#========================================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" + +A.Add(100) +A.Add(300) +A.Add(500) +A.Add(400) +A.Add(700) +print "First transaction goes on : HasOpenCommand() = ", batchmode_geompy.myBuilder.HasOpenCommand() +batchmode_geompy.myBuilder.CommitCommand() #-------------- + +# 2nd transaction ------------------------------------------ +batchmode_geompy.myBuilder.NewCommand() +A.Remove(3) +A.ChangeValue(4,500) +batchmode_geompy.myBuilder.CommitCommand() #-------------- + +if batchmode_geompy.myBuilder.GetAvailableUndos() == 0: + raise RuntimeError, "GetAvailableUndos() = 0 but must not !" + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger" + +file1 = dir + "/test1.hdf" +batchmode_geompy.myStudyManager.SaveAs(file1, batchmode_geompy.myStudy) + +# 1st Undo --------------------------------------- +batchmode_geompy.myBuilder.Undo() +res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A is None: + raise RuntimeError, "After first 'undo' can't find AttributeSequenceOfInteger" +if A.Length() != 5: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or A.Value(5) != 700: + print A.Value(1), A.Value(2), A.Value(3), A.Value(4), A.Value(5) + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger after the first 'undo'!" +# save +file2 = dir + "/test2.hdf" +batchmode_geompy.myStudyManager.SaveAs(file2, batchmode_geompy.myStudy) +#------------------------------------------------- +# 2nd Undo --------------------------------------- +batchmode_geompy.myBuilder.Undo() +res, attr = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if res !=0 or attr != None : + raise RuntimeError, "After the second 'undo' AttributeSequenceOfInteger exists but must not!" +file3 = dir + "/test3.hdf" +batchmode_geompy.myStudyManager.SaveAs(file3, batchmode_geompy.myStudy) +#------------------------------------------------- + +#make redo twice --------------------------------- +if batchmode_geompy.myBuilder.GetAvailableRedos() == 0: + raise RuntimeError, "GetAvailableRedos() = 0 but must not !" +batchmode_geompy.myBuilder.Redo() +batchmode_geompy.myBuilder.Redo() +res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if res ==0 or A== None : + raise RuntimeError, "AttributeSequenceOfInteger is not found but must be!" +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger" + + +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file1); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500: + print "Wrong value of AttributeSequenceOfInteger" +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file2); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 5: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or A.Value(5) != 700: + raise RuntimeError, "Wrong value of AttributeSequenceOfInteger after the first 'undo'!" + +#---------------------------------------------------------------------- +openedStudy=batchmode_geompy.myStudyManager.Open(file3); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") + +if res!=0 or A != None: + raise RuntimeError, " AttributeSequenceOfInteger is found but must not!" + diff --git a/doc/salome/examples/example17 b/doc/salome/examples/example17 new file mode 100644 index 000000000..2c3e6b819 --- /dev/null +++ b/doc/salome/examples/example17 @@ -0,0 +1,154 @@ + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +batchmode_geompy.myBuilder.NewCommand() +child = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() +#========================================================== +# create AttributeSequenceOfReal +#========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSequenceOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfReal attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +if A == None : + raise RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer" + +A.Add(0.0293) +A.Add(522) +A.Add(98234) +A.Add(83.287) +batchmode_geompy.myBuilder.CommitCommand() + + +batchmode_geompy.myBuilder.NewCommand() +#========================================================== +# create AttributeInteger +#========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeInteger") +if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" +A = A._narrow(SALOMEDS.AttributeInteger) +A.SetValue(1000000) + +if A.Value() != 1000000: + raise RuntimeError, "Error : wrong value of AttributeInteger" + +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeName +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A.SetValue("AttributesTesting") + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeComment +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeComment") +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +A.SetValue("GEOM") + +batchmode_geompy.myBuilder.AbortCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributePersistentRef +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributePersistentRef") +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +A.SetValue("/tmp/test;1") +batchmode_geompy.myBuilder.CommitCommand() + +batchmode_geompy.myBuilder.NewCommand() #=================================== +# create AttributeDrawable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeDrawable") +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +A.SetDrawable(1) + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" +batchmode_geompy.myBuilder.CommitCommand() + + + +batchmode_geompy.myBuilder.NewCommand() #=================== +# create AttributeSelectable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSelectable") +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +A.SetSelectable(1) + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" +batchmode_geompy.myBuilder.CommitCommand() + + +batchmode_geompy.myBuilder.NewCommand() #=================== +#=========================================================== +batchmode_geompy.myBuilder.RemoveAttribute(child,"AttributeSelectable") +batchmode_geompy.myBuilder.CommitCommand() + +# Control the attributes +#=========================================================== + +res, A = batchmode_geompy.myBuilder.FindAttribute(child, "AttributeComment") +print "res = ", res +if A != None : + print " AttributeComment was found" +else: + print " AttributeComment is not found. It's correct" + +attributes=[] + +attributes = child.GetAllAttributes() + +length = len(attributes) + +print "Attributes number = ", length +print attributes +for i in range(0, length) : + attr = attributes[i] + if attr is None : + print i,"None item of object attributes list" + +if length != 5 : + raise RuntimeError, "Wrong number of attributes" + diff --git a/doc/salome/examples/example18 b/doc/salome/examples/example18 new file mode 100644 index 000000000..477f8b2b6 --- /dev/null +++ b/doc/salome/examples/example18 @@ -0,0 +1,163 @@ + +child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N1") +N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, "AttributeTreeNode") +if N1 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N2") +N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, "AttributeTreeNode") +if N2 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N3") +N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, "AttributeTreeNode") +if N3 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + +child11 = batchmode_geompy.myBuilder.NewObject(child1) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N11") + +N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, "AttributeTreeNode") + +if N11 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child111 = batchmode_geompy.myBuilder.NewObject(child11) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N111") + +N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeTreeNode") + +if N111 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + +child31 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N31") + +N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, "AttributeTreeNode") +if N31 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child32 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N32") + +N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, "AttributeTreeNode") +if N32 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child321 = batchmode_geompy.myBuilder.NewObject(child32) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N321") + +N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, "AttributeTreeNode") +if N321 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child33 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N33") + +N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, "AttributeTreeNode") +if N33 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + +child34 = batchmode_geompy.myBuilder.NewObject(child3) +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,"AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) +A.SetValue("N34") + +N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, "AttributeTreeNode") +if N34 == None : + raise RuntimeError, "Can't create AttributeTreeNode attribute" + + + +#Create links between tree nodes. +# -| root +# --N1 __ +# | N11__ +# | N111 +# --N2 +# | +# --N3__ +# N31 +# N32__ +# N321 +# N33 +# N34 + +N11.SetFather(N1) +N11.Append(N111) +N3.SetPrevious(N1) +N3.Prepend(N2) + +N32.SetFather(N3) +N32.Prepend(N31) +N33.InsertAfter(N32) +N33.Append(N34) +print "------------- ", N1, " ------------- " +print "N1.Label() = ", N1.Label() , "IsRoot() = ", N1.IsRoot(), "Depth() = ", N1.Depth() +print "N11.Label() = ", N11.Label() , "IsRoot() = ", N11.IsRoot(), "Depth() = ", N11.Depth() +print "N111.Label() = ", N111.Label() , "IsRoot() = ", N111.IsRoot(), "Depth() = ", N111.Depth() +print "N2.Label() = ", N2.Label() , "IsRoot() = ", N2.IsRoot(), "Depth() = ", N2.Depth() +print "N3.Label() = ", N3.Label() , "IsRoot() = ", N3.IsRoot(), "Depth() = ", N3.Depth() +print "N31.Label() = ", N31.Label() , "IsRoot() = ", N31.IsRoot(), "Depth() = ", N31.Depth() +print "N32.Label() = ", N32.Label() , "IsRoot() = ", N32.IsRoot(), "Depth() = ", N32.Depth() +print "N321.Label() = ", N321.Label() , "IsRoot() = ", N321.IsRoot(), "Depth() = ", N321.Depth() +print "N33.Label() = ", N33.Label() , "IsRoot() = ", N33.IsRoot(), "Depth() = ", N33.Depth() +print "N34.Label() = ", N34.Label() , "IsRoot() = ", N34.IsRoot(), "Depth() = ", N34.Depth() +print "N1.IsRoot()=", N1.IsRoot() + +print "N1.HasNext() = ",N1.HasNext() +if N1.HasNext(): + print N1.Next().Label() + +print "N32.HasPrevious() = ",N32.HasPrevious() +if N32.HasPrevious(): + print N32.GetPrevious().Label() + +print "N111.HasFirst()=",N111.HasFirst() +print "N111.HasFather()=",N111.HasFather() +if N111.HasFather() : + print "N111.GetFather().Label()=",N111.GetFather().Label() + diff --git a/doc/salome/examples/example19 b/doc/salome/examples/example19 new file mode 100644 index 000000000..4cf37eb34 --- /dev/null +++ b/doc/salome/examples/example19 @@ -0,0 +1,540 @@ + +#====================================================================== +#1. Create Study and add some components to it +#====================================================================== + +#================================= +# create AttributeReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# === Geometry ================================================== + +import batchmode_geompy + +#=================================== +# define a box +#=================================== + +box = batchmode_geompy.MakeBox(0., 0., 0., 100., 200., 300.) +idbox = batchmode_geompy.addToStudy(box,"box") + + +geom = batchmode_geompy.geom +import SMESH +import batchmode_smesh +ShapeType = batchmode_smesh.ShapeType + +# ---- add first face of box in study + +subShapeList = batchmode_geompy.SubShapeAll(box,ShapeType["Face"]) +face=subShapeList[0] +name = "box_face" +print name +idface= batchmode_geompy.addToStudyInFather(box,face,name) + +# ---- add shell from box in study + +subShellList= batchmode_geompy.SubShapeAll(box,ShapeType["Shell"]) +shell = subShellList[0] +name = "box_shell" +print name +idshell= batchmode_geompy.addToStudyInFather(box,shell,name) + +# ---- add first edge of face in study + +edgeList = batchmode_geompy.SubShapeAll(face,ShapeType["Edge"]) +edge=edgeList[0]; +name = "face_edge" +print name +idedge= batchmode_geompy.addToStudyInFather(face,edge,name) + +# ---- launch SMESH, init a Mesh with the box + +smesh = batchmode_smesh.smesh +# -- Init -- +shape = batchmode_geompy.IDToObject(idbox) +mesh=smesh.Init(geom, batchmode_geompy.myStudyId, shape) + +orb = batchmode_geompy.orb + +idmesh = batchmode_smesh.AddNewMesh( orb.object_to_string(mesh) ) +batchmode_smesh.SetName(idmesh, "Meshbox"); +batchmode_smesh.SetShape(idbox, idmesh); + +# ---- create Hypothesis + +print "-------------------------- create Hypothesis ----------------------" +print "-------------------------- LocalLength" +hyp1 = smesh.CreateHypothesis("LocalLength", batchmode_geompy.myStudyId ) +hypLen1 = hyp1._narrow(SMESH.SMESH_LocalLength) +hypLen1.SetLength(100) +print hypLen1.GetName() +print hypLen1.GetId() +print hypLen1.GetLength() + +idlength = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypLen1) ); +batchmode_smesh.SetName(idlength, "Local_Length_100"); + +print "-------------------------- NumberOfSegments" +hyp2 = smesh.CreateHypothesis("NumberOfSegments", batchmode_geompy.myStudyId ) +hypNbSeg1=hyp2._narrow(SMESH.SMESH_NumberOfSegments) +hypNbSeg1.SetNumberOfSegments(7) +print hypNbSeg1.GetName() +print hypNbSeg1.GetId() +print hypNbSeg1.GetNumberOfSegments() + +idseg = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypNbSeg1) ); +batchmode_smesh.SetName(idseg, "NumberOfSegments_7"); + +print "-------------------------- MaxElementArea" +hyp3 = smesh.CreateHypothesis("MaxElementArea", batchmode_geompy.myStudyId) +hypArea1=hyp3._narrow(SMESH.SMESH_MaxElementArea) +hypArea1.SetMaxElementArea(2500) +print hypArea1.GetName() +print hypArea1.GetId() +print hypArea1.GetMaxElementArea() + +idarea1 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea1) ); +batchmode_smesh.SetName(idarea1, "MaxElementArea_2500"); + +print "-------------------------- MaxElementArea" +hyp3 = smesh.CreateHypothesis("MaxElementArea", batchmode_geompy.myStudyId) +hypArea2 = hyp3._narrow(SMESH.SMESH_MaxElementArea) +hypArea2.SetMaxElementArea(500) +print hypArea2.GetName() +print hypArea2.GetId() +print hypArea2.GetMaxElementArea() + +idarea2 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea2) ); +batchmode_smesh.SetName(idarea2, "MaxElementArea_500"); + +print "-------------------------- Regular_1D" +alg1 = smesh.CreateHypothesis("Regular_1D", batchmode_geompy.myStudyId) +algo1 = alg1._narrow(SMESH.SMESH_Algo) +listHyp = algo1.GetCompatibleHypothesis() +for hyp in listHyp: + print hyp +algoReg=alg1._narrow(SMESH.SMESH_Regular_1D) +print algoReg.GetName() +print algoReg.GetId() + +idreg = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoReg) ); +batchmode_smesh.SetName(idreg, "Regular_1D"); + +print "-------------------------- MEFISTO_2D" +alg2 = smesh.CreateHypothesis("MEFISTO_2D", batchmode_geompy.myStudyId) +algo2 = alg2._narrow(SMESH.SMESH_Algo) +listHyp=algo2.GetCompatibleHypothesis() +for hyp in listHyp: + print hyp +algoMef=alg2._narrow(SMESH.SMESH_MEFISTO_2D) +print algoMef.GetName() +print algoMef.GetId() + +idmef = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoMef) ); +batchmode_smesh.SetName(idmef, "MEFISTO_2D"); + + +# ---- add hypothesis to edge + +print "-------------------------- add hypothesis to edge" +edge = batchmode_geompy.IDToObject(idedge) +submesh = mesh.GetElementsOnShape(edge) +ret = mesh.AddHypothesis(edge,algoReg) +print ret +ret=mesh.AddHypothesis(edge,hypLen1) +print ret + +idsm1 = batchmode_smesh.AddSubMeshOnShape( idmesh, + idedge, + orb.object_to_string(submesh), + ShapeType["Edge"] ) +batchmode_smesh.SetName(idsm1, "SubMeshEdge") +batchmode_smesh.SetAlgorithms( idsm1, idreg ); +batchmode_smesh.SetHypothesis( idsm1, idlength ); + +print "-------------------------- add hypothesis to face" +face=batchmode_geompy.IDToObject(idface) +submesh=mesh.GetElementsOnShape(face) +ret=mesh.AddHypothesis(face,hypArea2) +print ret + +idsm2 = batchmode_smesh.AddSubMeshOnShape( idmesh, + idface, + orb.object_to_string(submesh), + ShapeType["Face"] ) +batchmode_smesh.SetName(idsm2, "SubMeshFace") +batchmode_smesh.SetHypothesis( idsm2, idarea2 ); + +# ---- add hypothesis to box + +print "-------------------------- add hypothesis to box" +box=batchmode_geompy.IDToObject(idbox) +submesh=mesh.GetElementsOnShape(box) +ret=mesh.AddHypothesis(box,algoReg) +print ret +ret=mesh.AddHypothesis(box,hypNbSeg1) +print ret +ret=mesh.AddHypothesis(box,algoMef) +print ret +ret=mesh.AddHypothesis(box,hypArea1) +print ret + +batchmode_smesh.SetAlgorithms( idmesh, idreg ); +batchmode_smesh.SetHypothesis( idmesh, idseg ); +batchmode_smesh.SetAlgorithms( idmesh, idmef ); +batchmode_smesh.SetHypothesis( idmesh, idarea1 ); + +# ---- compute box + +print "-------------------------- compute box" +ret=smesh.Compute(mesh,box) +print ret +log=mesh.GetLog(0); # no erase trace +for linelog in log: + print linelog + + +#======================================================= +# add SuperVision component +#======================================================= + +from batchmode_SuperV import * +import os +dir= os.getenv("SUPERV_ROOT_DIR") +if dir == None: + raise RuntimeError, "SUPERV_ROOT_DIR is not defined" +xmlfile = dir +"/examples/GraphEssai.xml" +print "--------------\n"+xmlfile+"\n--------------\n" + +myGraph = Graph ( xmlfile ) + +# This DataFlow is "valid" : no loop, correct links between Nodes etc... +print myGraph.IsValid() + +# Get Nodes +myGraph.PrintNodes() +Add,Sub,Mul,Div = myGraph.Nodes() + +# Load Datas +Addx = Add.Input("x",3.) +Addy = Add.Input("y",4.5) +Subx = Sub.Input("x",1.5) + +# Get Output Port +Addz = Add.Port('z') +Subz = Sub.Port('z') +Mulz = Mul.Port('z') +Divz = Div.Port('z') + +# This DataFlow is "executable" : all pending Ports are defined with Datas +print myGraph.IsExecutable() + +# Starts only execution of that DataFlow and gets control immediatly +print myGraph.Run() + +# That DataFlow is running ==> 0 (false) +print myGraph.IsDone() + +# Events of execution : +aStatus,aNode,anEvent,aState = myGraph.Event() +while aStatus : + print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState + aStatus,aNode,anEvent,aState = myGraph.Event() +print myGraph.IsDone() + +# Wait for Completion (but it is already done after event loop ...) +print "Done : ",myGraph.DoneW() + +# Get result +print "Result : ",Divz.ToString() + +# Intermediate results : +print "Intermediate Result Add\z : ",Addz.ToString() +print "Intermediate Result Sub\z : ",Subz.ToString() +print "Intermediate Result Mul\z : ",Mulz.ToString() + +print " " +#print "Type : print myGraph.IsDone()" +#print " If execution is finished ==> 1 (true)" +res=myGraph.IsDone() +if res != 1: + raise RuntimeError, "myGraph.Run() is not done" + +print " " +print "Type : print Divz.ToString()" +print " You will get the result" +Divz.ToString() + +print " " +print "Type : myGraph.PrintPorts()" +print " to see input and output values of the graph" +myGraph.PrintPorts() + +print " " +print "Type : Add.PrintPorts()" +Add.PrintPorts() + +print "Type : Sub.PrintPorts()" +Sub.PrintPorts() + +print "Type : Mul.PrintPorts()" +Mul.PrintPorts() + +print "Type : Div.PrintPorts()" +print " to see input and output values of nodes" +Div.PrintPorts() + +# Export will create newsupervisionexample.xml and the corresponding .py file +tmpdir=os.getenv("TmpDir") +if tmpdir is None: + tmpdir="/tmp" +file = tmpdir + "/newsupervisionexample" +print "--------------\n"+file+"\n--------------\n" +myGraph.Export(file) + +ior = batchmode_geompy.orb.object_to_string(myGraph.G) +addStudy(ior) + +GraphName = myGraph.Name() +print "Befor save ", +nodes = myGraph.Nodes() +length_bs = len(nodes) +print "ListOfNodes length = ", length_bs +names=[] +for node in nodes: + names.append(node.Name()) +print names + + +#================================= +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + + +#================================================== +#1. SaveAs +#================================================== +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +batchmode_geompy.myStudyManager.Close(batchmode_geompy.myStudy) + +#rename the file and try to reread it again + +os.mkdir(str + "/test_dir") + +#2.================================================== +print " ------- We rename the file as " + str + "/test_dir/test_new.hdf" +os.rename(file, str+"/test_dir/test_new.hdf") + +#================================================== +#3. Open +#================================================== +print " ------- We try to open " + str + "/test_dir/test_new.hdf" + +try: + openedStudy=batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf") +except Exception: + raise RuntimeError, "Can't open saved study!" + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "GEOM component is not found! Wrong study is opened." + + +#================================= +# find AttributeReal +#================================= + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +#================================================== +# find box +#================================================== +box = openedStudy.FindObject("box") +if box is None : + raise RuntimeError, "box was not found! Wrong study is opened." + +edge=openedStudy.FindObject("face_edge") +if edge is None : + raise RuntimeError, "face_edge was not found! Wrong study is opened." + + +father = openedStudy.FindComponent("MESH") +if father is None: + raise RuntimeError, "MESH component is not found! Wrong study is opened." + +hp=openedStudy.FindObject("Meshbox") +if hp is None: + raise RuntimeError, "Meshbox object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Algorithms Definition") +if hp is None: + raise RuntimeError, "Algorithms Definition object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("MEFISTO_2D") +if hp is None: + raise RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Hypothesis Definition") +if hp is None: + raise RuntimeError, "Algoriths Definition was not found! Wrong study is opened." + +#================================================== +# Find Supervisor +#================================================== +father = openedStudy.FindComponent("SUPERV") +if father is None: + raise RuntimeError, "SUPERV component is not found! Wrong study is opened." + +SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") +Builder = openedStudy.NewBuilder() +Builder.LoadWith(father, SuperV) +import SALOMEDS + +aChildIterator = openedStudy.NewChildIterator(father) + +#while aChildIterator.More(): +anSObject = aChildIterator.Value() +#print "iterate: ", anSObject.GetID() +res, anAttr=anSObject.FindAttribute("AttributeIOR") +if res : + anAttr=anAttr._narrow(SALOMEDS.AttributeIOR) + ior = anAttr.Value() + Graph=SuperV.getGraph(ior) + ListOfNodes=Graph.Nodes() + length_as= len(ListOfNodes) + print "ListOfNodes length = ", length_as + if length_as != length_bs: + raise RuntimeErrror, "defferent length of nodes after study open" +#aChildIterator.Next() + +Names = [] +for node in ListOfNodes: + Names.append(node.Name()) +names.sort() +Names.sort() +if names != Names : + raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation" + +#================================================== +#4. Save +#================================================== +batchmode_geompy.myStudyManager.Save(openedStudy) +batchmode_geompy.myStudyManager.Close(openedStudy) +#================================================== +#5. Open +#================================================== +try: + openedStudy = batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf") +except Exception: + raise RuntimeError, "Can't open saved study!" + + + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +#find AttributeReal +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" +#================================================== +# find box +#================================================== +box = openedStudy.FindObject("box") +if box is None : + raise RuntimeError, "box was not found! Wrong study is opened." + +edge=openedStudy.FindObject("face_edge") +if edge is None : + raise RuntimeError, "face_edge was not found! Wrong study is opened." + + +father = openedStudy.FindComponent("MESH") +if father is None: + raise RuntimeError, "MESH component is not found! Wrong study is opened." + +hp=openedStudy.FindObject("Meshbox") +if hp is None: + raise RuntimeError, "Meshbox object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Algorithms Definition") +if hp is None: + raise RuntimeError, "Algorithms Definition object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("MEFISTO_2D") +if hp is None: + raise RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened." + +hp = openedStudy.FindObject("Hypothesis Definition") +if hp is None: + raise RuntimeError, "Algoriths Definition was not found! Wrong study is opened." + +#================================================== +# Find Supervisor +#================================================== +father = openedStudy.FindComponent("SUPERV") +if father is None: + raise RuntimeError, "SUPERV component is not found! Wrong study is opened." + +SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") +Builder = openedStudy.NewBuilder() +Builder.LoadWith(father, SuperV) +import SALOMEDS + +aChildIterator = openedStudy.NewChildIterator(father) + +#while aChildIterator.More(): +anSObject = aChildIterator.Value() + +res, anAttr=anSObject.FindAttribute("AttributeIOR") +if res : + anAttr=anAttr._narrow(SALOMEDS.AttributeIOR) + ior = anAttr.Value() + Graph=SuperV.getGraph(ior) + ListOfNodes=Graph.Nodes() + length_as= len(ListOfNodes) + print "ListOfNodes length = ", length_as + if length_as != length_bs: + raise RuntimeErrror, "defferent length of nodes after study open" +#aChildIterator.Next() + +Names = [] +for node in ListOfNodes: + Names.append(node.Name()) +names.sort() +Names.sort() +if names != Names : + raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation" + diff --git a/doc/salome/examples/example20 b/doc/salome/examples/example20 new file mode 100644 index 000000000..9326da115 --- /dev/null +++ b/doc/salome/examples/example20 @@ -0,0 +1,152 @@ + +batchmode_geompy.myBuilder._set_UndoLimit(20) + +#-------------------------------------------------------------------------- +# create AttributeReal +#=============================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal") +if A == None : + raise RuntimeError, "Can't create AttributeReal attribute" +A = A._narrow(SALOMEDS.AttributeReal) +A.SetValue(0.0001) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + +# create AttributeStudyProperties +#================================================ +A = batchmode_geompy.myStudy.GetProperties() +if A == None : + raise RuntimeError, "Can't create AttributeStudyProperties attribute" +A = A._narrow(SALOMEDS.AttributeStudyProperties) + +batchmode_geompy.myBuilder.NewCommand(); +print "A.GetUserName()= ", A.GetUserName() +res,mm,hh,dd,mnth,yy=A.GetCreationDate() +print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy +print "A.GetCreationMode() = ", A.GetCreationMode() +print "A.IsModified() = ", A.IsModified() +print "A.IsLocked() = ", A.IsLocked() +if A.IsLocked() == 0 : + A.SetUserName("tester"); print 'A.SetUserName("tester"), A.GetUserName() = ', A.GetUserName() + A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), A.GetCreationDate() =', A.GetCreationDate() + print "A.IsModified() = ", A.IsModified() +A.SetLocked(1) + +#check the transaction result +batchmode_geompy.myBuilder.CommitCommand() +if A.GetUserName() != "tester": + print 'Control after transaction close : A.GetUserName() = ', A.GetUserName() + raise RuntimeError, "Field 'UserName' was not modified but had to!" + +# try to make some changes wrapped by transaction +#================================================ +batchmode_geompy.myBuilder.NewCommand() +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger") + +if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" +A = A._narrow(SALOMEDS.AttributeInteger) +A.SetValue(1000000) + +exception_was = None +try : batchmode_geompy.myBuilder.CommitCommand() +except Exception: exception_was = 1 + +if exception_was is None: + raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !" + +# save / restore study + +#================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + + +#--------------------------------------------------------------------------# +#--------------------------- Open file ------------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy = batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +#1. find AttributeReal +#================================================ + +res,A=father.FindAttribute("AttributeReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeReal" + +A = A._narrow(SALOMEDS.AttributeReal) +if A.Value() != 0.0001: + raise RuntimeError, "Error : wrong value of AttributeReal" + + +#2. find AttributeStudyProperties +#================================================= +A=openedStudy.GetProperties() +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeStudyProperties" + +A = A._narrow(SALOMEDS.AttributeStudyProperties) +if A.IsLocked() == 0 : + raise RuntimeError, "Error : AttributeStudyProperties must have Locked flag but have no!" + +#get the builder +myBuilder = openedStudy.NewBuilder() + +#3. try to make some changes wrapped by transaction +#================================================== +exception_was = None +try : + myBuilder.NewCommand() + A = myBuilder.FindOrCreateAttribute(father, "AttributeInteger") + + if A == None : + raise RuntimeError, "Can't create AttributeInteger attribute" + A = A._narrow(SALOMEDS.AttributeInteger) + A.SetValue(1000000) + myBuilder.CommitCommand() +except Exception: exception_was = 1 + +if exception_was is None: + raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !" + + +myBuilder.NewCommand() +A=openedStudy.GetProperties() +A = A._narrow(SALOMEDS.AttributeStudyProperties) +A.SetLocked(0) +myBuilder.CommitCommand() + +#4. +myBuilder.NewCommand() +A.SetLocked(0); +print "A.GetUserName()= ", A.GetUserName() +print "A.GetCreationDate() = ", A.GetCreationDate() +print "A.GetCreationMode() = ", A.GetCreationMode() +print "A.IsModified() = ", A.IsModified() +myBuilder.CommitCommand() + +#5. +myBuilder.NewCommand() +A.SetUserName("tester1") +myBuilder.CommitCommand() +print "A.GetUserName()= ", A.GetUserName() + +#remove the document file +os.remove(file) + diff --git a/doc/salome/examples/example21 b/doc/salome/examples/example21 new file mode 100644 index 000000000..33526d956 --- /dev/null +++ b/doc/salome/examples/example21 @@ -0,0 +1,127 @@ + +# create AttributeReal +#======================================================================================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeTableOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeTableOfInteger) +a=[1,2] + +b=[3,4] + +# 2x2 +# --- rows --- +A.AddRow(a) +A.AddRow(b) +a=[34,14] +A.SetRow(1,a) + +# 3x3 +# +b=[54,56] +A.AddRow(b) + +# --- columns --- +a=[76,25,12] + +A.AddColumn(a) +a=[836,3425,342] +A.SetColumn(3,a) + +# change attribute values +print "A.GetValue(2,2) = ", A.GetValue(2,2) +print "A.PutValue(2,2,625323)" +A.PutValue(625323,2,2) +print "A.GetValue(2,2) = ", A.GetValue(2,2) + +#set Titles + +A.SetTitle("TEST") + +A.SetRowTitle(1,"FR") +A.SetRowTitle(2,"SR") +A.SetRowTitle(3,"TR") + +A.SetColumnTitle(1,"FC") +A.SetColumnTitle(2,"SC") +A.SetColumnTitle(3,"TC") + + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +# set titles +#titles=["11","12","13"] +#A.SetRowTitles(titles) +#titles=["21","22","23"] +#A.SetRowTitles(2,titles) +#titles=["31","32","33"] +#A.SetRowTitles(3,titles) + +#--------------------------------------------------------------------------# +# ----------------------- save the study ----------------------------------# +#--------------------------------------------------------------------------# +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + +#--------------------------------------------------------------------------# +#---------------------------- Open file -----------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy=batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + +# --- check attribute --- + +res,A=father.FindAttribute("AttributeTableOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTableOfInteger" + +A = A._narrow(SALOMEDS.AttributeTableOfInteger) + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +titles=["ff","ss","tt"] +A.SetRowTitles(titles) +print "Rows titles : ", A.GetRowTitles() + +titles=["ww","zz","cc"] +A.SetColumnTitles(titles) +print "Column titles : ", A.GetColumnTitles() + diff --git a/doc/salome/examples/example22 b/doc/salome/examples/example22 new file mode 100644 index 000000000..bba273be6 --- /dev/null +++ b/doc/salome/examples/example22 @@ -0,0 +1,128 @@ + +# create AttributeReal +#=============================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeTableOfReal attribute" +A = A._narrow(SALOMEDS.AttributeTableOfReal) +a=[1,2] + +b=[3,4] + +# 2x2 +# --- rows --- +A.AddRow(a) +A.AddRow(b) +a=[34,14] +A.SetRow(1,a) + +# 3x3 +# +b=[54,56] +A.AddRow(b) + +# --- columns --- +a=[76,25,12] + +A.AddColumn(a) +a=[836,3425,342] +A.SetColumn(3,a) + +# change attribute values +print "A.GetValue(2,2) = ", A.GetValue(2,2) +print "A.PutValue(2,2,625323)" +A.PutValue(625323,2,2) +print "A.GetValue(2,2) = ", A.GetValue(2,2) + +#set Titles + +A.SetTitle("TEST") + +A.SetRowTitle(1,"FR") +A.SetRowTitle(2,"SR") +A.SetRowTitle(3,"TR") + +A.SetColumnTitle(1,"FC") +A.SetColumnTitle(2,"SC") +A.SetColumnTitle(3,"TC") + + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() + 1 +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() + 1 +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +# set titles +#titles=["11","12","13"] +#A.SetRowTitles(titles) +#titles=["21","22","23"] +#A.SetRowTitles(2,titles) +#titles=["31","32","33"] +#A.SetRowTitles(3,titles) + +#--------------------------------------------------------------------------# +#------------------------ save the study ----------------------------------# +#--------------------------------------------------------------------------# +import os +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +print " ------- We will save to", file, "-----------" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) + +#--------------------------------------------------------------------------# +#---------------------------- Open file -----------------------------------# +#--------------------------------------------------------------------------# + +print" -------------- Open " + file + "-------------- " + +openedStudy = batchmode_geompy.myStudyManager.Open(file) +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + +# --- check attribute --- + +res,A=father.FindAttribute("AttributeTableOfReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeTableOfReal" + +A = A._narrow(SALOMEDS.AttributeTableOfReal) + +#check the table +print "Common title : ",A.GetTitle() +print "Rows titles : ", A.GetRowTitles() +rnb = A.GetNbRows() + 1 +for i in range(1, rnb): + b=A.GetRow(i) + print b + +cnb = A.GetNbColumns() + 1 +print "Columns title : ", A.GetColumnTitles() +for i in range(1, cnb): + b=A.GetColumn(i) + print b + +titles=["ff","ss","tt"] +A.SetRowTitles(titles) +print "Rows titles : ", A.GetRowTitles() + +titles=["ww","zz","cc"] +A.SetColumnTitles(titles) +print "Column titles : ", A.GetColumnTitles() + diff --git a/doc/salome/examples/example23 b/doc/salome/examples/example23 new file mode 100644 index 000000000..da60ce0e9 --- /dev/null +++ b/doc/salome/examples/example23 @@ -0,0 +1,30 @@ + +import batchmode_salome +#import SALOMEDS + +aStudy = batchmode_salome.myStudy + +#Add new component 'User data' +aBuilder = aStudy.NewBuilder() +aComponent = aBuilder.NewComponent("User data") +anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName") +anAttrName = anAttr._narrow(SALOMEDS.AttributeName) +anAttrName.SetValue("User data") + + +#Add a new case 'Case1' to the component 'User data' +aBuilder.AddDirectory("/User data/Case1") + +#Set a study context to '/User data/Case1' +aStudy.SetContext("/User data/Case1") + +#Print the current study context +print aStudy.GetContext() + +#Add a sub directory 'aSubCase' to 'Case1' (under the current context) +aBuilder.AddDirectory("aSubCase") + + +#Add a new case 'Case2' to component 'User data' +aBuilder.AddDirectory("/User data/Case2") + diff --git a/doc/salome/examples/example3 b/doc/salome/examples/example3 new file mode 100644 index 000000000..95e18e8e7 --- /dev/null +++ b/doc/salome/examples/example3 @@ -0,0 +1,60 @@ + +# create AttributeSequenceOfReal +#================================= +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfReal") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfReal attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +if A == None : + raise RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer" + +A.Add(0.0293) +A.Add(625.1e+2) +A.Add(0.928e+100) +A.Add(83.287) + +print "initial values ",A.Value(1), A.Value(2), A.Value(3), A.Value(4) +A.Remove(3) +print "after remove ", A.Value(1), A.Value(2), A.Value(3) +A.ChangeValue(2,76.265) +print "after second item change", A.Value(1), A.Value(2), A.Value(3) + +if A.Length() != 3: + print "Error : wrong length of SequenceOfReal" +if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287: + print "Error : wrong value of AttributeSequenceOfReal" + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfReal +#================================= + +res,A=father.FindAttribute("AttributeSequenceOfReal") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfReal" + +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) + +if A.Length() != 3: + print "Error : wrong length of SequenceOfReal" +if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287: + print "Error : wrong value of AttributeSequenceOfReal" +print "after restoring ", A.Value(1), A.Value(2), A.Value(3) + diff --git a/doc/salome/examples/example4 b/doc/salome/examples/example4 new file mode 100644 index 000000000..2dd1966db --- /dev/null +++ b/doc/salome/examples/example4 @@ -0,0 +1,58 @@ + +# create AttributeSequenceOfInteger +#========================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger") +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) +if A == None : + raise RuntimeError, "Can't create AttributeSequenceOfInteger attribute" + +A.Add(100) +A.Add(300) +A.Add(500) +A.Add(400) +A.Add(700) + +A.Remove(3) +A.ChangeValue(4,500) + + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700: + print "Wrong value of AttributeSequenceOfInteger" + + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSequenceOfInteger +#====================================== + +res,A=father.FindAttribute("AttributeSequenceOfInteger") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSequenceOfInteger" + +A = A._narrow(SALOMEDS.AttributeSequenceOfInteger) + +if A.Length() != 4: + print "Wrong length of SequenceOfInteger" +if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700: + print "Wrong value of AttributeSequenceOfInteger" + diff --git a/doc/salome/examples/example5 b/doc/salome/examples/example5 new file mode 100644 index 000000000..59e3bc6a0 --- /dev/null +++ b/doc/salome/examples/example5 @@ -0,0 +1,50 @@ + +# create AttributeName +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeName") +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" +A.SetValue("AttributesTesting") + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + + +# save / restore study +#================================= +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeName +#====================================== + +res,A=father.FindAttribute("AttributeName") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeName" + +A = A._narrow(SALOMEDS.AttributeName) + +if A == None : + raise RuntimeError, "Can't create AttributeName attribute" + +if A.Value() != "AttributesTesting": + print "Wrong value of AttributeName" + diff --git a/doc/salome/examples/example6 b/doc/salome/examples/example6 new file mode 100644 index 000000000..71a5859e7 --- /dev/null +++ b/doc/salome/examples/example6 @@ -0,0 +1,47 @@ + +# create AttributeComment +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeComment") +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +A.SetValue("GEOM") + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeComment +#============================================================ + +res,A=father.FindAttribute("AttributeComment") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeComment" + +A = A._narrow(SALOMEDS.AttributeComment) + +if A == None : + raise RuntimeError, "Can't create AttributeComment attribute" + +if A.Value() != "GEOM": + "Error: wrong value of AttributeComment" + diff --git a/doc/salome/examples/example7 b/doc/salome/examples/example7 new file mode 100644 index 000000000..8ddf8bb2b --- /dev/null +++ b/doc/salome/examples/example7 @@ -0,0 +1,45 @@ + +# create AttributePersistentRef +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePersistentRef") +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +A.SetValue("/tmp/test;1") + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributePersistentRef +#============================================================ + +res,A=father.FindAttribute("AttributePersistentRef") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributePersistentRef" + +A = A._narrow(SALOMEDS.AttributePersistentRef) + +if A == None : + raise RuntimeError, "Can't create AttributePersistentRef attribute" + +if A.Value() != "/tmp/test;1": + "Error: wrong value of AttributePersistentRef" diff --git a/doc/salome/examples/example8 b/doc/salome/examples/example8 new file mode 100644 index 000000000..eadb13feb --- /dev/null +++ b/doc/salome/examples/example8 @@ -0,0 +1,54 @@ + +from batchmode_geompy import * +import os + +#-------------------------------------------------------------------------- +# create AttributeDrawable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeDrawable") +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +A.SetDrawable(1) + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy=batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeDrawable +#============================================================ + +res,A=father.FindAttribute("AttributeDrawable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeDrawable" + +A = A._narrow(SALOMEDS.AttributeDrawable) + +if A == None : + raise RuntimeError, "Can't create AttributeDrawable attribute" + +if A.IsDrawable() == 0: + "Error: wrong value of AttributeDrawable" + diff --git a/doc/salome/examples/example9 b/doc/salome/examples/example9 new file mode 100644 index 000000000..d29c9bab7 --- /dev/null +++ b/doc/salome/examples/example9 @@ -0,0 +1,50 @@ + +# create AttributeSelectable +#=========================================================== +A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSelectable") +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +A.SetSelectable(1) + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" + + +# save / restore study +#============================================================ +str= os.getenv("TmpDir") +if str == None: + str = "/tmp" +file = str+"/test.hdf" + +batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) +openedStudy = batchmode_geompy.myStudyManager.Open(file); + +if openedStudy == None: + raise RuntimeError, "Can't open saved study!" + +father = openedStudy.FindComponent("GEOM") +if father is None: + raise RuntimeError, "Geom component is not found! Wrong study is opened." + + +# find AttributeSelectable +#============================================================ + +res,A=father.FindAttribute("AttributeSelectable") +if res == 0 or A == None: + raise RuntimeError, "Error: not found AttributeSelectable" + +A = A._narrow(SALOMEDS.AttributeSelectable) + +if A == None : + raise RuntimeError, "Can't create AttributeSelectable attribute" + +if A.IsSelectable() == 0: + "Error: wrong value of AttributeSelectable" + diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am new file mode 100644 index 000000000..6205e23b6 --- /dev/null +++ b/doc/salome/gui/Makefile.am @@ -0,0 +1,27 @@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +usr_docs: doxyfile ../Batch.html + echo "Running doxygen in directory: "`pwd`; \ + $(DOXYGEN) $< ; \ + cp -rf ../Batch.html KERNEL + +docs: usr_docs + +info_TEXINFOS = ../Batch.texi + +install-data-local: usr_docs + $(INSTALL) -d $(DESTDIR)$(docdir)/gui + cp -rp KERNEL $(DESTDIR)$(docdir)/gui + +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/gui/KERNEL + +clean-local: + -rm -fr KERNEL log.txt + +dist-hook: + cp -Rp $(srcdir)/images $(distdir) ; \ + rm -rf $(distdir)/images/CVS ; \ + cp -Rp $(srcdir)/static $(distdir) ; \ + rm -rf $(distdir)/static/CVS + diff --git a/doc/salome/gui/doxyfile.in b/doc/salome/gui/doxyfile.in new file mode 100644 index 000000000..b81ddc6ed --- /dev/null +++ b/doc/salome/gui/doxyfile.in @@ -0,0 +1,252 @@ +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "SALOME v.@VERSION@" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = KERNEL +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = @top_builddir@ @top_srcdir@ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = YES +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = NO +GENERATE_BUGLIST = NO +GENERATE_DEPRECATEDLIST= NO +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 25 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = log.txt + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = \ + @top_srcdir@/doc/salome \ + @top_srcdir@/bin \ + @top_srcdir@/idl \ + @top_srcdir@/src/Container \ + @top_srcdir@/src/LifeCycleCORBA \ + @top_srcdir@/src/NamingService \ + @top_srcdir@/src/Notification \ + @top_srcdir@/src/SALOMEDS/SALOME_DriverPy.py \ + @top_srcdir@/src/KERNEL_PY/salome.py \ + @top_srcdir@/src/KERNEL_PY/salome_iapp.py \ + @top_srcdir@/src/Utils \ + @top_srcdir@/src/DSC + +FILE_PATTERNS = *.dox *.idl *.hxx *.cxx *.py +RECURSIVE = YES +EXCLUDE = @top_srcdir@/doc/salome/batch.dox +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = @top_srcdir@/doc/salome/examples +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = @srcdir@/images +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = @srcdir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = NO +DOT_IMAGE_FORMAT = jpg +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = NO +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/doc/salome/gui/images/icon_about.png b/doc/salome/gui/images/icon_about.png new file mode 100755 index 000000000..bbbc7a931 Binary files /dev/null and b/doc/salome/gui/images/icon_about.png differ diff --git a/doc/salome/gui/static/footer.html b/doc/salome/gui/static/footer.html new file mode 100755 index 000000000..56d52a61a --- /dev/null +++ b/doc/salome/gui/static/footer.html @@ -0,0 +1,10 @@ + + + + + +
+
Copyright © 2003-2007 CEA, EDF
+
+ + diff --git a/doc/salome/gui/static/header.html b/doc/salome/gui/static/header.html new file mode 100755 index 000000000..bddc997ec --- /dev/null +++ b/doc/salome/gui/static/header.html @@ -0,0 +1,13 @@ + + + + + $title + + + +
+
+SALOME documentation central +
+
diff --git a/doc/salome/install.dox b/doc/salome/install.dox index 8090ff92f..f77b0a2e0 100644 --- a/doc/salome/install.dox +++ b/doc/salome/install.dox @@ -1,23 +1,20 @@ /*! \page INSTALL Installation instructions -NOT UP TO DATE %SALOME 4 -WORK in PROGRESS, INCOMPLETE DOCUMENT +NOT UP TO DATE AND INCOMPLETE DOCUMENT BUT CAN BE HELPFUL -You'll find here generic instructions for installing the SALOME2 platform. +You'll find here generic instructions for installing the SALOME platform. \section Summary -
    -
  1. \ref S1_install
  2. -
  3. \ref S2_install
  4. -
  5. \ref S3_install
  6. -
  7. \ref S4_install
  8. -
  9. \ref S5_install
  10. -
  11. \ref S6_install
  12. -
  13. \ref S7_install
  14. -
  15. \ref S8_install
  16. -
+-# \ref S1_install +-# \ref S2_install +-# \ref S3_install +-# \ref S4_install +-# \ref S5_install +-# \ref S6_install +-# \ref S7_install +-# \ref S8_install \section S1_install Quick Overview @@ -25,16 +22,16 @@ First of all, you have to check (or install if needed) the dependant software programs on your system. These programs are: - common development tools as gcc, automake, autoconf and libtools. -- third party softwares used in SALOME building or runtime process +- third party softwares used in %SALOME building or runtime process (python, OCC, VTK, ...) -Further details can be found in sections [2] and [3]. +Further details can be found in sections \ref S2_install and \ref S3_install. If the dependencies are installed on your system, then you have to set your shell environment to get access to the software components -(cf. [4]. "Preparing the shell environment"). +(cf. \ref S4_install). -The next step is to install the KERNEL (cf. [5] "Installing KERNEL"): +The next step is to install the KERNEL (cf. \ref S5_install): \code $ mkdir @@ -48,10 +45,10 @@ $ make install \endcode Then, the %SALOME components GEOM, MED, VISU, ... can be installed -with a similar procedure (cf. [6]). +with a similar procedure (cf. \ref S6_install). -Eventually, the platform ccodean be run by executing the shell script -runSalome (cf. [7]). Here, somme additionnal variables have to be set +Eventually, the platform can be run by executing the shell script +%runSalome (cf. \ref S7_install). Here, somme additionnal variables have to be set to describe the %SALOME runtime configuration (_ROOT_DIR, OMNIORB_CONFIG) @@ -122,7 +119,7 @@ Additionnal software may be installed for optional features: In the following, we assume that all the third-party softwares are installed in the same root directory, named /prerequis. -Then, your file system should probably look like:: +Then, your file system should probably look like: \code /prerequis/Python-2.2.2 @@ -133,7 +130,7 @@ Then, your file system should probably look like:: \section S4_install Preparing the shell environment -Some variables have to be set to get acces to third-party software +Some variables have to be set to get access to third-party software components (include files, executable, library, ...) during building process and runtime. @@ -157,7 +154,7 @@ $ source prerequis.sh We use here the notation to specify the source directory of the KERNEL component. The shell environment is supposed to have -been set (cf. 4). +been set (cf. \ref S4_install). Installing the KERNEL from a source package needs three directories: @@ -193,11 +190,11 @@ $ ./build_configure \endcode If it doesn't work, check your system automake tools as specified in - section [2]. + section \ref S2_install. STEP 3: configure the building process - go to the build directory and execute the configuration process:: + go to the build directory and execute the configuration process: \code $ cd @@ -207,7 +204,7 @@ $ /configure --prefix= Note that must be an absolute path. When the configure process is complete, check the status of - third-party softwares detection. You should have a status like:: + third-party softwares detection. You should have a status like: \code --------------------------------------------- @@ -250,7 +247,7 @@ installed (optional for most usages). STEP 4 : Building the binary files - Execute make in the directory:: + Execute make in the directory: \code $ make @@ -259,7 +256,7 @@ $ make STEP 5: Installing binary files, scripts and documentation - Execute install target in the directory:: + Execute install target in the directory: \code $ make install @@ -267,7 +264,7 @@ $ make install \section S6_install Installing the SALOME components -TInstalling a component is done by following the same +Installing a component is done by following the same instructions as given for the KERNEL, replacing KERNEL by (build_configure, configure, make, make install). @@ -277,7 +274,7 @@ You just have to be aware of the dependencies between components: - GEOM depends on KERNEL - SMESH depends on KERNEL, MED, GEOM - VISU depends on KERNEL, MED -- SUPERV depends on KERNEL +- YACS depends on KERNEL For example, installing the component SMESH needs the previous installation of the KERNEL component, and then the GEOM and MED components. @@ -294,23 +291,21 @@ building process of the SMESH component (STEP 3). \section S7_install Runtime -See SALOME_Application to define your own configuration of %SALOME and run it +See \ref SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. The following explains the general principles. To run the %SALOME platform, the procedure is: -- set the shell environment to get acces to third-party softwares: - -\code +- set the shell environment to get access to third-party softwares: + \code $ source prerequis.sh -\endcode + \endcode - define the %SALOME configuration by setting the whole set of variables _ROOT_DIR. Here, you just have to set the - kernel and the components you need:: - + kernel and the components you need: \code $ export KERNEL_ROOT_DIR= $ export MED_ROOT_DIR= @@ -320,14 +315,12 @@ $ ... - define the CORBA configuration file by setting the variable OMNIORB_CONFIG. This variable must be set to a writable file path. The file may be arbitrary chosen and doesn't need to exist - before running. We suggest:: - + before running. We suggest: \code $ export OMNIORB_CONFIG=$HOME/.omniORB.cfg \endcode -- run the %SALOME platform by executing the script runSalome: - +- run the %SALOME platform by executing the script %runSalome: \code $KERNEL_ROOT_DIR/bin/salome/runSalome \endcode @@ -336,43 +329,39 @@ $KERNEL_ROOT_DIR/bin/salome/runSalome For convenience or customization, we suggest the following organisation: -- chose and create a root directory for the %SALOME platform, say +- choose and create a root directory for the %SALOME platform, say . - install the third-party softwares in a sub-directory "prerequis" - install the %SALOME components in a sub-directory "SALOME2" -- make personnal copies of the files prerequis.sh and runSalome in +- make personnal copies of the files prerequis.sh and %runSalome in : - \code $ cp /prerequis.sh /. $ cp /bin/salome/runSalome /. \endcode - Edit the file prerequis.sh and adjust it to your own configuration. -- define the SALOME2 configuration - +- define the SALOME2 configuration\n This step consists in setting the KERNEL_ROOT_DIR, the whole set of variables _ROOT_DIR you need, and the OMNIORB_CONFIG variable. - + \n We suggest to create a shell file envSalome.sh containing those settings. Then the configuration consists in loading envSalome.sh in the runtime shell: - -\code + \code $ source envSalome.sh -\endcode + \endcode - When installed with this file organisation, running %SALOME is done - with the following shell commands:: - + with the following shell commands: \code $ source /prerequis.sh $ source /envSalome.sh $ ./runSalome \endcode + */ diff --git a/doc/salome/kernel_resources.dox b/doc/salome/kernel_resources.dox index 6401e942b..1bcbead6f 100644 --- a/doc/salome/kernel_resources.dox +++ b/doc/salome/kernel_resources.dox @@ -1,12 +1,9 @@ /*! -\page kernel_resources SALOME Kernel resources for developer +\page kernel_resources Salome Kernel resources for developer -WORK in PROGRESS, INCOMPLETE DOCUMENT -\section S1_kernel_res Abstract - This document describes the development environment for C++ and Python. Makefiles generation and usage are introduced in another document: "using the %SALOME @@ -28,9 +25,7 @@ variables values and if necessary, to stop the execution at debug time, in order to validate all parts of code. -
    -
  1. -Two modes: debug and release +\subsection subsection21 Two modes: debug and release The goal of debug mode is to check as many features as possible during the early stages of the development @@ -49,9 +44,8 @@ end user is confronted to such a message, he may refer to a configuration documentation or send the message to the people in charge of %SALOME installation, or to the development team, following the kind of error. -
  2. -
  3. -C++ Macros for trace and debug + +\subsection subsection22 C++ Macros for trace and debug %SALOME provides C++ macros for trace and debug. These macros are in: @@ -62,11 +56,11 @@ KERNEL_SRC/src/SALOMELocalTrace/utilities.h This file must be included in C++ source. Some macros are activated only in debug mode, others are -always activated. To activate the debug mode, ``_DEBUG_`` +always activated. To activate the debug mode, _DEBUG_ must be defined, which is the case when %SALOME Makefiles are generated from configure, without -options. When ``_DEBUG_`` is undefined (release mode: -``configure --disable-debug --enable-production``), the +options. When _DEBUG_ is undefined (release mode: +configure --disable-debug --enable-production), the debug mode macros are defined empty (they do nothing). So, when switching from debug to release, it is possible (and recommended) to let the macro calls @@ -81,33 +75,23 @@ case of a multi machine configuration. Three informations are systematically added in front of the information displayed: - - the %thread number from which the message come from; - - the name of the source file in which the macros is set; - - the line number of the source file at which the macro is set. -
      -
    1. -Macros defined in debug and release modes -\n -INFOS_COMPILATION +\subsection subsection23 Macros defined in debug and release modes +- INFOS_COMPILATION\n The C++ macro INFOS_COMPILATION writes on the trace buffer pool informations about the compiling process: - - the name of the compiler : g++, KCC, CC, pgCC; - - the date and the time of the compiling processing process. - + . This macro INFOS_COMPILATION does not have any argument. Moreover, it is defined in both compiling - mode : _DEBUG_ and _RELEASE_. - + mode : _DEBUG_ and _RELEASE_.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -115,17 +99,13 @@ int main(int argc , char **argv) INFOS_COMPILATION; ... } -INFOS(str) \endcode -\n -INFOS +- INFOS\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro INFOS writes on the trace buffer pool %the string - which has been passed in argument by the user. - + which has been passed in argument by the user.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -135,42 +115,33 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code main.cxx [5] : NORMAL END OF THE PROCESS \endcode -\n -INTERRUPTION(str) +- INTERRUPTION(str)\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro INTERRUPTION writes on the trace buffer pool the %string, with a special ABORT type. When the %thread in charge of collecting messages finds this message, it terminates the application, after message treatment. -IMMEDIATE_ABORT(str) - +- IMMEDIATE_ABORT(str)\n In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro IMMEDIATE_ABORT writes the message str immediately on standard error and exits the application. Remaining messages not treated by the message collector %thread are lost. -
    2. -
    3. -Macros defined only in debug mode -\n -MESSAGE(str) +\subsection subsection24 Macros defined only in debug mode +- MESSAGE(str)\n In _DEBUG_ compiling mode only, the C++ macro MESSAGE writes on the trace buffer pool the %string which has been passed in argument by the user. In _RELEASE_ - compiling mode, this macro is blank. - + compiling mode, this macro is blank.\n Example: - \code #include "utilities.h" #include @@ -189,25 +160,19 @@ int main(int argc , char **argv) } \endcode - Displays: - \code - Trace main.cxx [8] : Salome - Trace main.cxx [12] : Aster and CASTEM \endcode -\n -BEGIN_OF(func_name) - +- BEGIN_OF(func_name)\n In _DEBUG_ compiling mode, The C++ macro BEGIN_OF appends the %string "Begin of " to the one passed in argument by the user and displays the result on the trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - + macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -216,23 +181,18 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [3] : Begin of a.out \endcode -\n -END_OF(func_name) +- END_OF(func_name)\n In _DEBUG_ compiling mode, The C++ macro END_OF appends the %string "Normal end of " to the one passed in argument by the user and displays the result on the trace buffer pool. In _RELEASE_ compiling mode, this - macro is blank. - + macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -241,22 +201,17 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [4] : Normal end of a.out \endcode -\n -SCRUTE(var) +- SCRUTE(var)\n In _DEBUG_ compiling mode, The C++ macro SCRUTE displays its argument which is an application variable followed by the value of the variable. In _RELEASE_ - compiling mode, this macro is blank. - + compiling mode, this macro is blank.\n Example: - \code #include "utilities.h" int main(int argc , char **argv) @@ -266,25 +221,20 @@ int main(int argc , char **argv) return 0; } \endcode - Displays: - \code - Trace main.cxx [5] : i=999 \endcode -\n -ASSERT(condition) +- ASSERT(condition)\n In _DEBUG_ compiling mode only, The C++ macro ASSERT checks the expression passed in argument to be not NULL. If it is NULL the condition is written with the macro INTERRUPTION (see above). The process exits after trace of this last message. In _RELEASE_ compiling mode, this macro is blank. N.B. : if ASSERT is already - defined, this macro is ignored. - + defined, this macro is ignored.\n Example: - \code #include "utilities.h" ... @@ -298,20 +248,11 @@ ASSERT(k<10); cout << table[k]; \endcode -
    4. -
    -
  4. -
- \section S3_kernel_res Exceptions -
    -
  1. -C++ exceptions: class SALOME_Exception +\subsection subsection31 C++ exceptions: class SALOME_Exception -
      -
    1. -definition +\subsubsection subsubsection311 Definition The class SALOME_Exception provides a generic method to send a message, with optional source file name and line @@ -324,9 +265,8 @@ log file. The class SALOME_Exception inherits its behavior from the STL class exception. -
    2. -
    3. -usage + +\subsubsection subsubsection312 Usage The header %SALOME/src/utils/utils_SALOME_Exception.hxx must be included in the C++ source, when raised or trapped: @@ -356,7 +296,7 @@ throw SALOME_Exception(LOCALIZED("my pertinent message")); \endcode where LOCALIZED is a macro provided with -``utils_SALOME_Exception.hxx`` which gives file name and +utils_SALOME_Exception.hxx which gives file name and line number. The exception is handled like this: @@ -374,15 +314,10 @@ catch (const SALOME_Exception &ex) The what() method overrides the one defined in the STL exception class. -
    4. -
    -
  2. -
  3. -CORBA exceptions -
      -
    1. -definition +\subsection subsection32 CORBA exceptions + +\subsubsection subsubsection321 Definition The idl SALOME_Exception provides a generic CORBA exception for %SALOME, with an attribute that gives an @@ -407,16 +342,12 @@ CORBA system and user exceptions already defined in the packages used within %SALOME, such as OmniORB exceptions, must be handled separately. -
    2. -
    3. -usage -
        -
      1. +\subsubsection subsubsection322 Usage CORBA servant, C++ The CORBA Server header for SALOME_Exception and a macro to throw the exception are provided with the - header ``KERNEL_SRC/src/Utils/Utils_CorbaException.hxx``: + header KERNEL_SRC/src/Utils/Utils_CorbaException.hxx: \code #include "Utils_CorbaException.hxx" @@ -431,17 +362,13 @@ if (myStudyName.size() == 0) SALOME::BAD_PARAM); \endcode -
      2. -
      3. -CORBA Client, GUI Qt C++ - - NO MORE AVAILABLE in %SALOME 3.x +CORBA Client, GUI Qt C++ (NO MORE AVAILABLE in %SALOME 3.x and later) The CORBA Client header for SALOME_Exception and a Qt function header that displays a message box are provided in: - ``KERNEL_SRC/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.hxx`` + KERNEL_SRC/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.hxx \code #include "SALOMEGUI_QtCatchCorbaException.hxx" @@ -461,8 +388,6 @@ catch (const SALOME::SALOME_Exception & S_ex) } \endcode -
      4. -
      5. CORBA Client, C++, without GUI Nothing specific has been provided to the developer @@ -470,20 +395,10 @@ catch (const SALOME::SALOME_Exception & S_ex) SALOMEGUI_QtCatchCorbaException.hxx to see how to get the information given by the exception %object. -
      6. -
      -
    4. -
    -
- \section S4_kernel_res Miscellaneous tools -
    -
  1. -Singleton -
      -
    1. -Definition +\subsection subsection41 Singleton +\subsubsection subsubsection411 Definition %A singleton is an application data which is created and deleted only once at the end of the application @@ -491,14 +406,12 @@ process. The C++ compiler allows the user to create a static singleton data before the first executable statement. They are deleted after the last statement execution. -The ``SINGLETON_`` template class deals with dynamic +The SINGLETON_ template class deals with dynamic singleton. It is useful for functor objects. For example, an %object that connects the application to a system at creation and disconnects the application at deletion. -
    2. -
    3. -Usage +\subsubsection subsubsection412 Usage To create a single instance of a POINT %object: @@ -524,36 +437,25 @@ POINT *p2=SINGLETON_::Instance() ; assert(p1==p2) \endcode -
    4. -
    5. -Design description +\subsubsection subsubsection413 Design description Here are the principles features of the singleton design: - - the user creates an %object of class TYPE by using the - class method ``SINGLETON_::Instance()`` which + class method SINGLETON_::Instance() which returns a pointer to the single %object ; - -- to create an %object, ``SINGLETON_::Instance()`` +- to create an %object, SINGLETON_::Instance() uses the default constructor of class TYPE ; - - at the same time, this class method creates a destructor %object which is added to the generic list of destructor objects to be executed at the end of the application (atexit) ; - - at the end of the application process all the - deletions are performed by the ``Nettoyage()`` C function + deletions are performed by the Nettoyage() C function which executes the destruction objects end then deletes the destructions objects themselves ; +- the Nettoyage() C function using atexit() C function + is embedded in a static single %object ATEXIT_(). -- the ``Nettoyage()`` C function using ``atexit()`` C function - is embedded in a static single %object ``ATEXIT_()``. - -
    6. -
    -
  2. -
*/ diff --git a/doc/salome/kernel_services.dox b/doc/salome/kernel_services.dox index d363c84cf..241a82ff0 100644 --- a/doc/salome/kernel_services.dox +++ b/doc/salome/kernel_services.dox @@ -1,8 +1,6 @@ /*! \page KERNEL_Services KERNEL Services for end user (Python interface) -WORK in PROGRESS, INCOMPLETE DOCUMENT - In a %SALOME application, distributed components, servers and clients use the CORBA middleware for comunication. CORBA interfaces are defined via idl files. All the different CORBA interfaces are available for users in Python, @@ -16,14 +14,12 @@ script). \section S1_kernel_ser General purpose services -
    -
  1. -%SALOME services access from a Python shell +\subsection subsection11 SALOME services access from a Python shell -See \ref SALOME_Application for detailed instructions to launch a Python -interpreter with full acces to the %SALOME environment and services. +See \ref SALOME_Application for detailed instructions on how to launch a Python +interpreter with full access to the %SALOME environment and services. -You can use the embedded Python interpreter in Grahic User Interface, or an +You can use the embedded Python interpreter in Graphical User Interface, or an external interpreter, with: \code @@ -42,11 +38,9 @@ In the embedded interpreter, it is already done, but there is no problem to do it several times, so it is preferable to add these instructions systematically in your scripts, to allow them to work in all configurations. -
  2. -
  3. -Container and component instanciation +\subsection subsection12 Container and component instanciation -See LifeCycleCORBA for the C++ interface (Python interface obtained with SWIG +See SALOME_LifeCycleCORBA for the C++ interface (Python interface obtained with SWIG is very similar). In the following example, a test component provided in KERNEL is launched @@ -83,7 +77,7 @@ without the _narrow() instruction: In the next example, a component instance is created in a specific Container defined by it's computer hostname and it's name. Here we use the local -computer. Note that in Utils_Identity, getShortHostName() gives the short +computer. Note that in Utils_Identity, Utils_Identity::getShortHostName() gives the short hostname of the computer, without domain suffixes, which is used in %SALOME. The container process is created here if it does not exists, and a new component instance is created: @@ -143,9 +137,7 @@ myStudyManager.object SalomeAppEngine.object \endcode -
  4. -
  5. -File transfer service +\subsection subsection13 File transfer service See SALOME_FileTransferCORBA for the C++ interface (Python interface obtained with SWIG is very similar). @@ -166,71 +158,165 @@ aFileTransfer=LifeCycleCORBA.SALOME_FileTransferCORBA('cli76cc',remotefile) localFile=aFileTransfer.getLocalFile() \endcode -
  6. -
  7. -CORBA Naming service access +\subsection subsection14 CORBA Naming service access See SALOME_NamingService for the C++ interface. The Python interface -SALOME_NamingServicePy is not yet derived from the C++ interface and offers +SALOME_NamingServicePy::SALOME_NamingServicePy_i is not yet derived from the C++ interface and offers only the most useful functions. -
  8. -
  9. -Batch services - -See \ref batch_page documentation (in french only). +\subsection subsection5 Batch services -
  10. -
+See Batch documentation (in french only). \section S2_kernel_ser All IDL Interfaces -
    -
  1. -Containers and component life cycle, File transfer service - -- Engines : engines CORBA module. -- Engines::Component : generic component interface. All %SALOME components inherit this interface. -- Engines::Container : host for C++ and Python components components instances -- Engines::fileTransfer : agent for file transfer created by a container copy a local file to a distent client -- Engines::fileRef : reference to a file, used by a container for file transfers -- Engines::ContainerManager : unique instance, in charge of container creation on remote computers -- Engines::MPIContainer : an exemple of parallel implementation for containers and components -- Engines::MPIObject - -
  2. -
  3. -Study management - -- SALOMEDS : SALOMEDS CORBA module -- SALOMEDS.idl -- SALOMEDS_Attributes.idl - -
  4. -
  5. -High speed transfer, object life cycle, exceptions, GUI interface... - -- SALOME : %SALOME CORBA module -- SALOME_Comm.idl -- SALOME_GenericObj.idl -- SALOME_Exception -- SALOME_Session.idl - -
  6. -
  7. -Miscelleanous - -- SALOME_ModuleCatalog -- SALOME_RessourcesCatalog -- SALOME_Registry.idl -- Logger.idl - -Other idl for test purposes -\n -- nstest.idl -- SALOME_TestComponent.idl -- SALOME_TestModuleCatalog.idl -- SALOME_TestMPIComponent.idl -- TestNotif.idl +-# Containers and component life cycle, File transfer service + - Engines : engines CORBA module. + - Engines::Component : generic component interface. All %SALOME components inherit this interface. + - Engines::Container : host for C++ and Python components components instances + - Engines::fileTransfer : agent for file transfer created by a container copy a local file to a distent client + - Engines::fileRef : reference to a file, used by a container for file transfers + - Engines::ContainerManager : unique instance, in charge of container creation on remote computers + - Engines::MPIContainer : a parallel implementation for containers and components + - Engines::MPIObject + . +-# Study management + - SALOMEDS : SALOMEDS CORBA module + - SALOMEDS.idl : \copybrief SALOMEDS.idl + - SALOMEDS_Attributes.idl : \copybrief SALOMEDS_Attributes.idl + . +-# High speed transfer, object life cycle, exceptions, GUI interface... + - SALOME : \copybrief SALOME + - SALOME_Comm.idl : \copybrief SALOME_Comm.idl + - SALOME_GenericObj.idl : \copybrief SALOME_GenericObj.idl + - SALOME_Exception.idl : \copybrief SALOME_Exception.idl + - SALOME_Session.idl : \copybrief SALOME_Session.idl + . +-# Miscelleanous + - SALOME_ModuleCatalog : \copybrief SALOME_ModuleCatalog + - SALOME_RessourcesCatalog : \copybrief SALOME_RessourcesCatalog + - Registry : \copybrief Registry + - SALOME_Logger : \copybrief SALOME_Logger + . +-# Other idl for test purposes + - NSTEST : for naming service test + - SALOME_TestComponent.idl : for Component test + - SALOME_TestModuleCatalog : for SALOME_ModuleCatalog test + - SALOME_TestMPIComponent.idl : \copybrief SALOME_TestMPIComponent.idl + - TestNotif.idl : \copybrief TestNotif.idl + . +-# Some useful command scripts + - waitNS.py : \copybrief waitNS.py + - waitContainers.py : \copybrief waitContainers.py + - showNS.py : \copybrief showNS.py + - shutdownSalome.py : \copybrief shutdownSalome.py + - killSalome.py : \copybrief killSalome.py + - killSalomeWithPort.py : \copybrief killSalomeWithPort.py + - appli_gen.py : \copybrief appli_gen.py + . */ + +/** \example example1 +AttributeReal interface (creations/saving/restoring) +\n +Methods : FindOrCreateAttribute, Value, SaveAs, SetValue, FindComponent, FindAttribute, Open + */ +/** \example example3 +AttributeSequenceOfReal interface(creations/saving/restoring)\n +AttributeSequenceOfReal : ChangeValue, Add, Value, Remove, Length\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open + */ +/** \example example16 +Methods : GetAvailableUndos, ChangeValue, FindOrCreateAttribute, SaveAs, GetAvailableRedos, Undo, FindComponent, Redo, FindAttribute, Open, CommitCommand, NewCommand + */ +/** \example example17 +SALOMEDS methods : RemoveAttribute, FindOrCreateAttribute, NewStudy, GetAllAttributes, NewCommand, CommitCommand, AbortCommand, NewComponent + */ +/** \example example18 +AttributeTreeNode interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, NewObject\n +Attribute methods : HasFirst, HasFather, SetPrevious, Next, InsertAfter, GetFather, HasNext, SetValue, Append, NewStudy, Label, IsRoot, Prepend, SetFather, Depth, HasPrevious + */ +/** \example example19 + SALOMEDS methods : FindOrCreateAttribute, Save, SaveAs, Close, Open, FindComponent, FindAttribute, FindObject, LoadWith +\n + Attribute methods : Value, SetValue + */ +/** \example example20 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, NewCommand, GetProperties, Open, CommitCommand, NewBuilder\n +Attribute methods : SetLocked, IsLocked, GetCreationMode, SetCreationDate, IsModified, GetUserName, Value, SetUserName, SetValue, GetCreationDate + */ +/** \example example23 +Methods: + */ +/** \example example8 +AttributeDrawable interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetDrawable, IsDrawable + */ +/** \example example9 +AttributeSelectable interface(creations/saving/restoring)\n +SALOMEDS methods: FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods: SetSelectable, IsSelectable + */ +/** \example example10 +AttributeExpandable interface(creations/saving/restoring)\n +SALOMEDS methods : SaveAs FindComponent FindAttribute Open\n +Attribute methods : SetExpandable IsExpandable + */ +/** \example example11 +Test AttributeOpened (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetOpened, IsOpened + */ +/** \example example12 +AttributeTextColor interface (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetTextColor TextColor + */ +/** \example example13 +Test AttributeTextHighlightColor interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetTextHighlightColor TextHighlightColor + */ +/** \example example14 +AttributePixMap interface (creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : SetPixMap, GetPixMap + */ + +/** \example example21 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods: GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle + */ +/** \example example15 +AttributeLocalID interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : Value, SetValue +*/ +/** \example example22 +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open\n +Attribute methods : GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle +*/ +/** \example example4 +AttributeSequenceOfInteger interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute FindComponent FindAttribute Open Add SaveAs +AttributeSequenceOfInteger methods : Value, Remove, Length +*/ +/** \example example5 +AttributeName interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent FindAttribute Open\n +Attribute methods : SetValue, Value +*/ +/** \example example6 +AttributeComment interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs FindComponent FindAttribute Open\n +Attribute methods : Value, SetValue +*/ +/** \example example7 +AttributePersistentRef interface(creations/saving/restoring)\n +SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent FindAttribute Open\n +Attribute methods : SetValue, Value +*/ + diff --git a/doc/salome/main.dox b/doc/salome/main.dox index 7515c353c..03c610c0e 100644 --- a/doc/salome/main.dox +++ b/doc/salome/main.dox @@ -1,82 +1,60 @@ /*! \mainpage SALOME KERNEL Reference Documentation - \image html kernel_about_4.png - - \section S1_main Introduction + \image html icon_about.png Welcome to the %SALOME KERNEL documentation ! Following your kind of usage of %SALOME, you will find some specific introductory documentation, listed below. - \section S2_main End user +\section S2_main End user -
      -
    1. - How to configure a %SALOME application - \n The end user may have to configure his own %SALOME application by selection of a +-# How to configure a %SALOME application\n + The end user may have to configure his own %SALOME application by selection of a subset of availables %SALOME modules. He also may want to install his application on several computers. See \subpage SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. -
    2. -
    3. - How to launch %SALOME in a %SALOME application - \n See \ref SALOME_Application. -
    4. -
    5. - How to use KERNEL services in Python scripts - \n The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services. -
    6. -
    +-# How to launch %SALOME in a %SALOME application\n + See \ref SALOME_Application. +-# How to use KERNEL services in Python scripts\n + The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services. - \section S3_main Application Integrator +\section S3_main Application Integrator Applications integrators are in charge of configuration and installation of specific %SALOME applications over a local network. Application Integrators built %SALOME modules binaries from sources tarballs. -
      -
    1. - How to install %SALOME - \n See \subpage INSTALL for general information on required configuration and +-# How to install %SALOME\n + See \subpage INSTALL for general information on required configuration and prerequisites, compilation procedure, setting environment principles. -
    2. -
    3. - How to configure a %SALOME application - \n See \ref SALOME_Application to define your own configuration of %SALOME and run it +-# How to configure a %SALOME application\n + See \ref SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. -
    4. -
    - \section S4_main Module maintainer +\section S4_main Module maintainer Module maintainers are in charge of the development and debug of the %SALOME modules. Each %SALOME module is stored in a CVS base. CVS bases are organised in separate branches for developments and debug. All official or development releases are identified by a CVS tag. -
      -
    1. - Source code structuration and Unit Tests - \n See \subpage UnitTests for general information on code directories structure, +-# Source code structuration and Unit Tests\n + See \subpage UnitTests for general information on code directories structure, unit tests associated to the different kind of classes, and how to run the unit tests. -
    2. -
    3. - Some development utilities - \n See \subpage kernel_resources for information on basic utilities for C++ and Python +-# Some development utilities \n + See \subpage kernel_resources for information on basic utilities for C++ and Python development, like trace and debug, exceptions, singleton. -
    4. -
    - \section S5_main SALOME programming model +\section S5_main SALOME programming model You will find in the next pages informations about specific points of %SALOME Kernel : - \subpage dsc_page : DSC documentation page. - \subpage salome_file_page : Salome_file documentation page. - - \subpage batch_page : BATCH documentation page. + - Batch documentation */ diff --git a/doc/salome/salome_application.dox b/doc/salome/salome_application.dox index d970338a3..31961aa32 100644 --- a/doc/salome/salome_application.dox +++ b/doc/salome/salome_application.dox @@ -1,17 +1,17 @@ /*! - \page SALOME_Application SALOME Application Concept + \page SALOME_Application Salome Application Concept - Configuration for one or more computers - - - **WORK in PROGRESS, INCOMPLETE DOCUMENT** The following explains how to configure your own application with your list of modules, how to define and run this application on one or more computers. \section S1_sal_appl General principles -%A %SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). +%A %SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). %A %SALOME application +lives in an application directory. +%A %SALOME application is a virtual installation of %SALOME in the application directory +(bin, lib, doc, share...), with, for each file (executable, script, data, +library, resources...), symbolic links to the actual files. %A %SALOME User can define several %SALOME Applications. These applications are runnable from the same user account. These applications may share the same @@ -42,126 +42,76 @@ computer. \section S2_sal_appl Application Directory -There are two ways for creation of an application directory, the recommended way is -the second, easier to configure. - -
      -
    1. - First way - references to different module directories - -The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an -application directory with the given path in parameter. The path given, ${APPLI}, is -relative to ${HOME}. - -The directory is only a skeleton, the user has to edit several files to -configure his own application. These files are described after, the list is: - -- env.d/atFirst.sh -- env.d/envProducts.sh -- env.d/envSALOME.sh -- CatalogResources.xml -- SALOMEApp.xml - -
    2. -
    3. - Second and easiest way - one single virtual install directory - -The user must create a %SALOME application configuration file by modifying a +First, the user must create a %SALOME application configuration file by modifying a copy of ${KERNEL_ROOT_DIR}/bin/salome/config_appli.xml. The file describes the list of %SALOME modules used in the application, with their respective installation path. The configuration file also defines the path of an existing script which sets the %SALOME prerequisites, and optionnaly, the path of samples directory (SAMPLES_SRC). -The following command:: +The following command: \code python /bin/salome/appli_gen.py --prefix= --config= \endcode -creates a virtual installation of %SALOME in the application directory ${APPLI} -(bin, lib, doc, share...), with, for each file (executable, script, data, -library, resources...), symbolic links to the actual file. -Note: it is recommended to set the environment for %SALOME prerequisites -before invoking the above command, in order to use the same python as SALOME, -otherwise installation may be wrong +creates a %SALOME application in the application directory given by the prefix option (local directory +by default) with the configuration file given by the config option (config_appli.xml by default). Providing an existing script for %SALOME prerequisites (the same one used for modules compilation, or given with the modules installation), the installation works without further modification for a single computer (unless some modules needs a special environment not defined in the above script). + For a distributed application (several computers), one must copy and adapt CatalogResources.xml from ${KERNEL_ROOT_DIR}/bin/salome/appliskel (see below). -
    4. -
    \section S3_sal_appl General rules -Directory ${APPLI} must be created on each computer of the application. +The application directory must be created on each computer of the application. The easiest way is to use the same relative path (to ${HOME}) on each computer. (Sometimes it is not possible to use the same path everywhere, for instance when ${HOME} is shared with NFS, so it is possible to define different path following the computers). -The ${APPLI} directory contains scripts for environment and runs. Environment +The application directory contains scripts for environment and runs. Environment scripts must be configured (by the user) on each computer. All the environment -scripts are in the ${APPLI}/env.d directory. +scripts are in the env.d subdirectory. -The script ${APPLI}/envd sources **all** the files (\*.sh) in ${APPLI}/env.d -in alphanumeric order (after edition, think to remove backup files). the envd +The script envd sources \b all the files (*.sh) in subdirectory env.d +in alphanumeric order (after edition, think to remove backup files). The envd script is used by run scripts.
    1. env.d scripts -With the first way of installation, each user **must define** his own -configuration for these scripts, following the above rules. -With the virtual installation (second way, above), env.d -scripts are built automatically. - - **The following is only an example proposed by createAppli.sh, (first way of installation) not working as it is**. - -- atFirst.sh - Sets the computer configuration not directly related to %SALOME, - like useful tools, default PATH. - -- envProducts.sh - Sets the %SALOME prerequisites. - -- envSALOME.sh - Sets all the MODULE_ROOT_DIR that can be used in the %SALOME application. +env.d scripts are built automatically. - SALOMEAppConfig is also defined by: +You can add your own environment scripts in env.d subdirectory, they will be sourced as +the generated ones provided they have a .sh extension. -\code -export SALOMEAppConfig=${HOME}/${APPLI} -\endcode - - where SALOMEAppConfig designates the directory containing SALOMEApp.xml. - Note that ${APPLI} is already defined by the calling scripts when - env.d/envSALOME.sh is sourced.
    2. User run scripts The %SALOME user can use 4 scripts: -- runAppli +- runAppli\n Launches a %SALOME Session (similar to ${KERNEL_ROOT_DIR}/bin/salome/runSalome but with a different name to avoid confusions). See parameters below. -- runSession +- runSession\n Launches a shell script in the %SALOME application environment, with access to the current (last launched) %SALOME session (naming service), if any. Without arguments, the script is interactive. With arguments, the script executes the command in the %SALOME application environment. -- runConsole +- runConsole\n Gives a python console connected to the current %SALOME Session. It is also possible to use runSession, then python. -- runTests +- runTests\n Similar to runSession, used for unit testing, but runSession tries to use an already existing naming service definition from a running session (hostname and port number), and runTests defines a new configuration for naming service @@ -170,12 +120,12 @@ The %SALOME user can use 4 scripts:
    3. %SALOME internal run scripts -- envd +- envd\n Sets %SALOME application environment, envd is sourced by other scripts. For remote calls, %SALOME uses one script. -- runRemote.sh +- runRemote.sh\n This script is mainly used to launch containers. The first 3 arguments define the hostname and port userd for naming service, plus a working directory, the remaining arguments define the command to execute. @@ -183,20 +133,19 @@ For remote calls, %SALOME uses one script.
    4. Other configuration files -- SALOMEApp.xml +- SALOMEApp.xml\n This file is similar to the default given in ${GUI_ROOT_DIR}/share/SALOME/resources/gui -- CatalogRessources.xml - This files describes all the computers the application can use. The given - example is minimal and suppose ${APPLI} is the same relative path +- CatalogRessources.xml\n + This file describes all the computers the application can use. The given + example is minimal and suppose application directory is the same relative path to ${HOME}, on all the computers. %A different directory can be set on a particular computer with a line: - -\code + \code appliPath="my/specific/path/on/this/computer" -\endcode + \endcode
    @@ -207,7 +156,7 @@ appliPath="my/specific/path/on/this/computer"
  8. Launch a %SALOME session with a GUI interface -Launch is done with a command like:: +Launch is done with a command like: \code ./runAppli --logger @@ -216,7 +165,7 @@ Launch is done with a command like:: The --logger option means here : collect all the traces from the all the distributed process, via CORBA, in a single file : logger.log. -There are a lot of options, a complete list is given by:: +There are a lot of options, a complete list is given by: \code ./runAppli --help @@ -237,20 +186,20 @@ When the GUI is closed, the different %SALOME servers are still running. Close a %SALOME session, kill all the servers Inside the interactive python interpreter you get when you use runAppli -with arguments, you can kill all the servers of your session with:: +with arguments, you can kill all the servers of your session with: \code >>> killLocalPort() \endcode -or the servers of all the sessions with:: +or the servers of all the sessions with: \code >>> killAllPorts() \endcode If you have no active Python interpreter connected to your session, you can -kill all the %SALOME servers of **all the sessions** on a given computer:: +kill all the %SALOME servers of all the sessions on a given computer: \code ./runSession killSalome.py @@ -263,7 +212,7 @@ use the start menu to stop... When you use only one session at a time, you don't need more. To kill a given session (when several session are running), one needs -the naming service port number:: +the naming service port number: \code ./runSession killSalomeWithPort 2810 @@ -273,7 +222,7 @@ Note that the port number of the last launched session can be found on Linux, in the prompt, within a runSession shell (see below). It is also possible to get the Naming Service host and port number of -the last launched session with:: +the last launched session with: \code ./runSession NSparam.py @@ -295,7 +244,7 @@ import GEOM_usinggeom raw_input("Press a key and the servers will be killed ...") \endcode -This script is run in a non interactive way with:: +This script is run in a non interactive way with: \code ./runSession python test_session_geom.py @@ -310,23 +259,23 @@ All the process are automatically killed when Python is closed It's often easier to develop and try Python scripts outside the GUI embedded Python interpreter. Imagine, for instance, you are writing a script involving geometry and mesh modules. -first, launch a %SALOME session with gui, then, on another terminal:: +first, launch a %SALOME session with gui, then, on another terminal: \code ./runSession python \endcode -Import %SALOME module. salome_init() without arguments creates a new study -in the running session (note: SALOME_init(n) attachs to a running session whose -studyId is n):: +Import salome module. salome_init() without arguments creates a new study +in the running session (note: salome_init(n) attachs to a running session whose +studyId is n): \code import salome salome.salome_init() \endcode -An example of script given with SMESH:: +An example of script given with SMESH: \code import ex01_cube2build @@ -336,8 +285,8 @@ It is possible to connect the GUI interface to the study created in the above script with the file/connect menu, then browse study and display objects. Further modifications on study can be done either with GUI or external script (use refresh popup in GUI %object browser to see study modifications generated -by the external script). **AVOID modifications with GUI when a Python script -is running**. Not all the modules are protected against concurrent actions... +by the external script). AVOID modifications with GUI when a Python script +is running. Not all the modules are protected against concurrent actions...
  9. Different uses of the runSession shell interpreter @@ -349,13 +298,13 @@ connects to the last launched session (i.e. gets the naming service references of the session: hostname and port) On Linux, the shell prompt (bash) gives information on naming service -references, hostname and port:: +references, hostname and port: \code [NS=cli76cc:2811]prascle@cli76cc:~/SALOME2/Run/Virtual$ \endcode -If there is no running session, prompt looks like:: +If there is no running session, prompt looks like: \code [NS=:]prascle@cli76cc:~/SALOME2/Run/Virtual$ @@ -364,7 +313,7 @@ If there is no running session, prompt looks like:: runSession is useful to launch any script or program which needs the complete %SALOME environment, with or without a session already running. For instance, to launch the ddd debugger interface on the gui %server, first -launch a %SALOME session with gui, then, on another terminal:: +launch a %SALOME session with gui, then, on another terminal: \code ./runSession ddd diff --git a/doc/salome/salome_file.dox b/doc/salome/salome_file.dox index dffb378b9..2f29ea7d4 100644 --- a/doc/salome/salome_file.dox +++ b/doc/salome/salome_file.dox @@ -9,7 +9,7 @@ SALOME_FileTransfer. It extends it to enable a higher model for managing files i \section S1_Salome_file Principles Salome_file is a CORBA %object. It's role is to managed many system files. When a Salome_file -is created, no files are managed. Then, files are added using Salome_file interface. %A file is represented +is created, no files are managed. Then, files are added using Salome_file_i interface. %A file is represented by a name and a path. There is two different cases when a file is added : @@ -115,9 +115,4 @@ To avoid these cases, Salome_file API provides advanced methods : }; \endcode -\section S3_Salome_file Using Salome_file into %SALOME services - -Currently you can't use Salome_file into YACS schema. In the next version of %SALOME, -files ports will be available to connect output files to input files. - */ diff --git a/doc/salome/tui/KERNEL/HTML/Logger.html b/doc/salome/tui/KERNEL/HTML/Logger.html deleted file mode 100644 index 1a73901c0..000000000 --- a/doc/salome/tui/KERNEL/HTML/Logger.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface Logger
    IDL file
    Python
    void putMessage ( in string message )
    putMessage ( message )
    void ping ( )
    ping ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOMEDS.html b/doc/salome/tui/KERNEL/HTML/SALOMEDS.html deleted file mode 100644 index f9d2b559d..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOMEDS.html +++ /dev/null @@ -1,674 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Study
    IDL file
    Python
    PersistentReference GetPersistentReference ( )
    return_value = GetPersistentReference ( )
    SalomeReference GetTransientReference ( )
    return_value = GetTransientReference ( )
    boolean IsEmpty ( )
    return_value = IsEmpty ( )
    SComponent FindComponent ( in string aComponentName )
    return_value = FindComponent ( aComponentName )
    SComponent FindComponentID ( in ID aComponentID )
    return_value = FindComponentID ( aComponentID )
    SObject FindObject ( in string anObjectName )
    return_value = FindObject ( anObjectName )
    SObject FindObjectID ( in ID aObjectID )
    return_value = FindObjectID ( aObjectID )
    SObject CreateObjectID ( in ID aObjectID )
    return_value = CreateObjectID ( aObjectID )
    SObject FindObjectIOR ( in ID aObjectIOR )
    return_value = FindObjectIOR ( aObjectIOR )
    ListOfSObject FindObjectByName ( in string anObjectName, in string aComponentName )
    return_value = FindObjectByName ( anObjectName, aComponentName )
    SObject FindObjectByPath ( in string thePath )
    return_value = FindObjectByPath ( thePath )
    string GetObjectPath ( in Object theObject )
    return_value = GetObjectPath ( theObject )
    void SetContext ( in string thePath )
    SetContext ( thePath )
    string GetContext ( )
    return_value = GetContext ( )
    ListOfStrings GetObjectNames ( in string theContext )
    return_value = GetObjectNames ( theContext )
    ListOfStrings GetDirectoryNames ( in string theContext )
    return_value = GetDirectoryNames ( theContext )
    ListOfStrings GetFileNames ( in string theContext )
    return_value = GetFileNames ( theContext )
    ListOfStrings GetComponentNames ( in string theContext )
    return_value = GetComponentNames ( theContext )
    ChildIterator NewChildIterator ( in SObject aSO )
    return_value = NewChildIterator ( aSO )
    SComponentIterator NewComponentIterator ( )
    return_value = NewComponentIterator ( )
    StudyBuilder NewBuilder ( )
    return_value = NewBuilder ( )
    void UpdateIORLabelMap ( in string anIOR, in string anEntry )
    UpdateIORLabelMap ( anIOR, anEntry )
    AttributeStudyProperties GetProperties ( )
    return_value = GetProperties ( )
    boolean IsModified ( )
    return_value = IsModified ( )
    ListOfSObject FindDependances ( in SObject anObject )
    return_value = FindDependances ( anObject )
    string GetLastModificationDate ( )
    return_value = GetLastModificationDate ( )
    ListOfDates GetModificationsDate ( )
    return_value = GetModificationsDate ( )
    string ConvertObjectToIOR ( in Object theObject )
    return_value = ConvertObjectToIOR ( theObject )
    Object ConvertIORToObject ( in string theIOR )
    return_value = ConvertIORToObject ( theIOR )
    UseCaseBuilder GetUseCaseBuilder ( )
    return_value = GetUseCaseBuilder ( )
    void Close ( )
    Close ( )
    void EnableUseCaseAutoFilling ( in boolean isEnabled )
    EnableUseCaseAutoFilling ( isEnabled )
    void AddPostponed ( in string theIOR )
    AddPostponed ( theIOR )
    void AddCreatedPostponed ( in string theIOR )
    AddCreatedPostponed ( theIOR )
    void RemovePostponed ( in long theUndoLimit )
    RemovePostponed ( theUndoLimit )
    void UndoPostponed ( in long theWay )
    UndoPostponed ( theWay )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface StudyBuilder
    IDL file
    Python
    SComponent NewComponent ( in string ComponentDataType )
    return_value = NewComponent ( ComponentDataType )
    void DefineComponentInstance ( in SComponent aComponent, in Object ComponentIOR )
    DefineComponentInstance ( aComponent, ComponentIOR )
    void RemoveComponent ( in SComponent aComponent )
    RemoveComponent ( aComponent )
    SObject NewObject ( in SObject theFatherObject )
    return_value = NewObject ( theFatherObject )
    SObject NewObjectToTag ( in SObject theFatherObject, in long atag )
    return_value = NewObjectToTag ( theFatherObject, atag )
    void RemoveObject ( in SObject anObject )
    RemoveObject ( anObject )
    void RemoveObjectWithChildren ( in SObject anObject )
    RemoveObjectWithChildren ( anObject )
    void LoadWith ( in SComponent sco, in Driver Engine )
    LoadWith ( sco, Engine )
    void Load ( in SObject sco )
    Load ( sco )
    GenericAttribute FindOrCreateAttribute ( in SObject anObject, in string aTypeOfAttribute )
    return_value = FindOrCreateAttribute ( anObject, aTypeOfAttribute )
    boolean FindAttribute ( in SObject anObject, out GenericAttribute anAttribute, in string aTypeOfAttribute )
    [ return_value, anAttribute ] = FindAttribute ( anObject, aTypeOfAttribute )
    void RemoveAttribute ( in SObject anObject, in string aTypeOfAttribute )
    RemoveAttribute ( anObject, aTypeOfAttribute )
    void Addreference ( in SObject anObject, in SObject theReferencedObject )
    Addreference ( anObject, theReferencedObject )
    void RemoveReference ( in SObject anObject )
    RemoveReference ( anObject )
    void AddDirectory ( in string theName )
    AddDirectory ( theName )
    void SetGUID ( in SObject anObject, in string theGUID )
    SetGUID ( anObject, theGUID )
    boolean IsGUID ( in SObject anObject, in string theGUID )
    return_value = IsGUID ( anObject, theGUID )
    void NewCommand ( )
    NewCommand ( )
    void CommitCommand ( )
    CommitCommand ( )
    boolean HasOpenCommand ( )
    return_value = HasOpenCommand ( )
    void AbortCommand ( )
    AbortCommand ( )
    void Undo ( )
    Undo ( )
    void Redo ( )
    Redo ( )
    boolean GetAvailableUndos ( )
    return_value = GetAvailableUndos ( )
    boolean GetAvailableRedos ( )
    return_value = GetAvailableRedos ( )
    Callback SetOnAddSObject ( in Callback theCallback )
    return_value = SetOnAddSObject ( theCallback )
    Callback SetOnRemoveSObject ( in Callback theCallback )
    return_value = SetOnRemoveSObject ( theCallback )
    void SetName ( in SObject theSO, in string theValue )
    SetName ( theSO, theValue )
    void SetComment ( in SObject theSO, in string theValue )
    SetComment ( theSO, theValue )
    void SetIOR ( in SObject theSO, in string theValue )
    SetIOR ( theSO, theValue )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface StudyManager
    IDL file
    Python
    void ping ( )
    ping ( )
    Study NewStudy ( in string study_name )
    return_value = NewStudy ( study_name )
    Study Open ( in URL aStudyUrl )
    return_value = Open ( aStudyUrl )
    void Close ( in Study aStudy )
    Close ( aStudy )
    void Save ( in Study aStudy, in boolean theMultiFile )
    Save ( aStudy, theMultiFile )
    void SaveASCII ( in Study aStudy, in boolean theMultiFile )
    SaveASCII ( aStudy, theMultiFile )
    void SaveAs ( in URL aUrl, in Study aStudy, in boolean theMultiFile )
    SaveAs ( aUrl, aStudy, theMultiFile )
    void SaveAsASCII ( in URL aUrl, in Study aStudy, in boolean theMultiFile )
    SaveAsASCII ( aUrl, aStudy, theMultiFile )
    ListOfOpenStudies GetOpenStudies ( )
    return_value = GetOpenStudies ( )
    Study GetStudyByName ( in string aStudyName )
    return_value = GetStudyByName ( aStudyName )
    Study GetStudyByID ( in short aStudyID )
    return_value = GetStudyByID ( aStudyID )
    boolean CanCopy ( in SObject theObject )
    return_value = CanCopy ( theObject )
    boolean Copy ( in SObject theObject )
    return_value = Copy ( theObject )
    boolean CanPaste ( in SObject theObject )
    return_value = CanPaste ( theObject )
    SObject Paste ( in SObject theObject )
    return_value = Paste ( theObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface SObject
    IDL file
    Python
    ID GetID ( )
    return_value = GetID ( )
    SComponent GetFatherComponent ( )
    return_value = GetFatherComponent ( )
    SObject GetFather ( )
    return_value = GetFather ( )
    short Tag ( )
    return_value = Tag ( )
    short Depth ( )
    return_value = Depth ( )
    boolean FindSubObject ( in long atag, out SObject obj )
    [ return_value, obj ] = FindSubObject ( atag )
    boolean FindAttribute ( out GenericAttribute anAttribute, in string aTypeOfAttribute )
    [ return_value, anAttribute ] = FindAttribute ( aTypeOfAttribute )
    boolean ReferencedObject ( out SObject obj )
    [ return_value, obj ] = ReferencedObject ( )
    ListOfAttributes GetAllAttributes ( )
    return_value = GetAllAttributes ( )
    Study GetStudy ( )
    return_value = GetStudy ( )
    Object GetObject ( )
    return_value = GetObject ( )
    string GetName ( )
    return_value = GetName ( )
    string GetComment ( )
    return_value = GetComment ( )
    string GetIOR ( )
    return_value = GetIOR ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface GenericAttribute
    IDL file
    Python
    void CheckLocked ( )
    CheckLocked ( )
    string Store ( )
    return_value = Store ( )
    void Restore ( in string theData )
    Restore ( theData )
    string Type ( )
    return_value = Type ( )
    SObject GetSObject ( )
    return_value = GetSObject ( )

    - - - - - - - - - - - - - - - -
    interface SComponent
    IDL file
    Python
    string ComponentDataType ( )
    return_value = ComponentDataType ( )
    boolean ComponentIOR ( out ID theID )
    [ return_value, theID ] = ComponentIOR ( )

    - - - - - - - - - - - - - - - - - - - - - - - -
    interface SComponentIterator
    IDL file
    Python
    void Init ( )
    Init ( )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SComponent Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface ChildIterator
    IDL file
    Python
    void Init ( )
    Init ( )
    void InitEx ( in boolean allLevels )
    InitEx ( allLevels )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SObject Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - -
    interface UseCaseIterator
    IDL file
    Python
    void Init ( in boolean allLevels )
    Init ( allLevels )
    boolean More ( )
    return_value = More ( )
    void Next ( )
    Next ( )
    SObject Value ( )
    return_value = Value ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface UseCaseBuilder
    IDL file
    Python
    boolean Append ( in SObject theObject )
    return_value = Append ( theObject )
    boolean Remove ( in SObject theObject )
    return_value = Remove ( theObject )
    boolean AppendTo ( in SObject theFather, in SObject theObject )
    return_value = AppendTo ( theFather, theObject )
    boolean InsertBefore ( in SObject theFirst, in SObject theNext )
    return_value = InsertBefore ( theFirst, theNext )
    boolean SetCurrentObject ( in SObject theObject )
    return_value = SetCurrentObject ( theObject )
    boolean SetRootCurrent ( )
    return_value = SetRootCurrent ( )
    boolean HasChildren ( in SObject theObject )
    return_value = HasChildren ( theObject )
    boolean SetName ( in string theName )
    return_value = SetName ( theName )
    string GetName ( )
    return_value = GetName ( )
    boolean IsUseCase ( in SObject theObject )
    return_value = IsUseCase ( theObject )
    SObject GetCurrentObject ( )
    return_value = GetCurrentObject ( )
    SObject AddUseCase ( in string theName )
    return_value = AddUseCase ( theName )
    UseCaseIterator GetUseCaseIterator ( in SObject theObject )
    return_value = GetUseCaseIterator ( theObject )

    - - - - - - - - - - - - - - - -
    interface Callback
    IDL file
    Python
    void OnAddSObject ( in SObject theObject )
    OnAddSObject ( theObject )
    void OnRemoveSObject ( in SObject theObject )
    OnRemoveSObject ( theObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Driver
    IDL file
    Python
    TMPFile Save ( in SComponent theComponent, in string theURL, in boolean isMultiFile )
    return_value = Save ( theComponent, theURL, isMultiFile )
    TMPFile SaveASCII ( in SComponent theComponent, in string theURL, in boolean isMultiFile )
    return_value = SaveASCII ( theComponent, theURL, isMultiFile )
    boolean Load ( in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile )
    return_value = Load ( theComponent, theStream, theURL, isMultiFile )
    boolean LoadASCII ( in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile )
    return_value = LoadASCII ( theComponent, theStream, theURL, isMultiFile )
    void Close ( in SComponent aSComponent )
    Close ( aSComponent )
    string ComponentDataType ( )
    return_value = ComponentDataType ( )
    string IORToLocalPersistentID ( in SObject theSObject, in string IORString, in boolean isMultiFile, in boolean isASCII )
    return_value = IORToLocalPersistentID ( theSObject, IORString, isMultiFile, isASCII )
    string LocalPersistentIDToIOR ( in SObject theSObject, in string aLocalPersistentID, in boolean isMultiFile, in boolean isASCII )
    return_value = LocalPersistentIDToIOR ( theSObject, aLocalPersistentID, isMultiFile, isASCII )
    boolean CanPublishInStudy ( in Object theIOR )
    return_value = CanPublishInStudy ( theIOR )
    SObject PublishInStudy ( in Study theStudy, in SObject theSObject, in Object theObject, in string theName )
    return_value = PublishInStudy ( theStudy, theSObject, theObject, theName )
    boolean CanCopy ( in SObject theObject )
    return_value = CanCopy ( theObject )
    TMPFile CopyFrom ( in SObject theObject, out long theObjectID )
    [ return_value, theObjectID ] = CopyFrom ( theObject )
    boolean CanPaste ( in string theComponentName, in long theObjectID )
    return_value = CanPaste ( theComponentName, theObjectID )
    SObject PasteInto ( in TMPFile theStream, in long theObjectID, in SObject theObject )
    return_value = PasteInto ( theStream, theObjectID, theObject )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html b/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html deleted file mode 100644 index 49f848f73..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOMEDS_Attributes.html +++ /dev/null @@ -1,894 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface AttributeReal
    IDL file
    Python
    double Value ( )
    return_value = Value ( )
    void SetValue ( in double value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeInteger
    IDL file
    Python
    long Value ( )
    return_value = Value ( )
    void SetValue ( in long value )
    SetValue ( value )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeSequenceOfReal
    IDL file
    Python
    void Assign ( in DoubleSeq other )
    Assign ( other )
    DoubleSeq CorbaSequence ( )
    return_value = CorbaSequence ( )
    void Add ( in double value )
    Add ( value )
    void Remove ( in long index )
    Remove ( index )
    void ChangeValue ( in long index, in double value )
    ChangeValue ( index, value )
    double Value ( in short index )
    return_value = Value ( index )
    long Length ( )
    return_value = Length ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeSequenceOfInteger
    IDL file
    Python
    void Assign ( in LongSeq other )
    Assign ( other )
    LongSeq CorbaSequence ( )
    return_value = CorbaSequence ( )
    void Add ( in long value )
    Add ( value )
    void Remove ( in long index )
    Remove ( index )
    void ChangeValue ( in long index, in long value )
    ChangeValue ( index, value )
    long Value ( in short index )
    return_value = Value ( index )
    long Length ( )
    return_value = Length ( )

    - - - - - - - - - - - - - - - -
    interface AttributeName
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeComment
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeIOR
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributePersistentRef
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeExternalFileDef
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeFileType
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeDrawable
    IDL file
    Python
    boolean IsDrawable ( )
    return_value = IsDrawable ( )
    void SetDrawable ( in boolean value )
    SetDrawable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeSelectable
    IDL file
    Python
    boolean IsSelectable ( )
    return_value = IsSelectable ( )
    void SetSelectable ( in boolean value )
    SetSelectable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeExpandable
    IDL file
    Python
    boolean IsExpandable ( )
    return_value = IsExpandable ( )
    void SetExpandable ( in boolean value )
    SetExpandable ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeOpened
    IDL file
    Python
    boolean IsOpened ( )
    return_value = IsOpened ( )
    void SetOpened ( in boolean value )
    SetOpened ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeTextColor
    IDL file
    Python
    Color TextColor ( )
    return_value = TextColor ( )
    void SetTextColor ( in Color value )
    SetTextColor ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeTextHighlightColor
    IDL file
    Python
    Color TextHighlightColor ( )
    return_value = TextHighlightColor ( )
    void SetTextHighlightColor ( in Color value )
    SetTextHighlightColor ( value )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributePixMap
    IDL file
    Python
    boolean HasPixMap ( )
    return_value = HasPixMap ( )
    string GetPixMap ( )
    return_value = GetPixMap ( )
    void SetPixMap ( in string value )
    SetPixMap ( value )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTreeNode
    IDL file
    Python
    void SetFather ( in AttributeTreeNode value )
    SetFather ( value )
    boolean HasFather ( )
    return_value = HasFather ( )
    AttributeTreeNode GetFather ( )
    return_value = GetFather ( )
    void SetPrevious ( in AttributeTreeNode value )
    SetPrevious ( value )
    boolean HasPrevious ( )
    return_value = HasPrevious ( )
    AttributeTreeNode GetPrevious ( )
    return_value = GetPrevious ( )
    void SetNext ( in AttributeTreeNode value )
    SetNext ( value )
    boolean HasNext ( )
    return_value = HasNext ( )
    AttributeTreeNode GetNext ( )
    return_value = GetNext ( )
    void SetFirst ( in AttributeTreeNode value )
    SetFirst ( value )
    boolean HasFirst ( )
    return_value = HasFirst ( )
    AttributeTreeNode GetFirst ( )
    return_value = GetFirst ( )
    void SetTreeID ( in string value )
    SetTreeID ( value )
    string GetTreeID ( )
    return_value = GetTreeID ( )
    void Append ( in AttributeTreeNode value )
    Append ( value )
    void Prepend ( in AttributeTreeNode value )
    Prepend ( value )
    void InsertBefore ( in AttributeTreeNode value )
    InsertBefore ( value )
    void InsertAfter ( in AttributeTreeNode value )
    InsertAfter ( value )
    void Remove ( )
    Remove ( )
    long Depth ( )
    return_value = Depth ( )
    boolean IsRoot ( )
    return_value = IsRoot ( )
    boolean IsDescendant ( in AttributeTreeNode value )
    return_value = IsDescendant ( value )
    boolean IsFather ( in AttributeTreeNode value )
    return_value = IsFather ( value )
    boolean IsChild ( in AttributeTreeNode value )
    return_value = IsChild ( value )
    string Label ( )
    return_value = Label ( )

    - - - - - - - - - - - - - - - -
    interface AttributeLocalID
    IDL file
    Python
    long Value ( )
    return_value = Value ( )
    void SetValue ( in long value )
    SetValue ( value )

    - - - - - - - - - - - - - - - -
    interface AttributeUserID
    IDL file
    Python
    string Value ( )
    return_value = Value ( )
    void SetValue ( in string value )
    SetValue ( value )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributeTarget
    IDL file
    Python
    void Add ( in SObject anObject )
    Add ( anObject )
    ListOfSObject Get ( )
    return_value = Get ( )
    void Remove ( in SObject anObject )
    Remove ( anObject )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfInteger
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in LongSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in LongSeq theData )
    SetRow ( theRow, theData )
    LongSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in LongSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in LongSeq theData )
    SetColumn ( theColumn, theData )
    LongSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in long theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    long GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfReal
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in DoubleSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in DoubleSeq theData )
    SetRow ( theRow, theData )
    DoubleSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in DoubleSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in DoubleSeq theData )
    SetColumn ( theColumn, theData )
    DoubleSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in double theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    double GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeTableOfString
    IDL file
    Python
    void SetTitle ( in string theTitle )
    SetTitle ( theTitle )
    string GetTitle ( )
    return_value = GetTitle ( )
    void SetRowTitle ( in long theIndex, in string theTitle )
    SetRowTitle ( theIndex, theTitle )
    void SetRowTitles ( in StringSeq theTitles )
    SetRowTitles ( theTitles )
    StringSeq GetRowTitles ( )
    return_value = GetRowTitles ( )
    void SetColumnTitle ( in long theIndex, in string theTitle )
    SetColumnTitle ( theIndex, theTitle )
    void SetColumnTitles ( in StringSeq theTitles )
    SetColumnTitles ( theTitles )
    StringSeq GetColumnTitles ( )
    return_value = GetColumnTitles ( )
    void SetRowUnit ( in long theIndex, in string theUnit )
    SetRowUnit ( theIndex, theUnit )
    void SetRowUnits ( in StringSeq theUnits )
    SetRowUnits ( theUnits )
    StringSeq GetRowUnits ( )
    return_value = GetRowUnits ( )
    long GetNbRows ( )
    return_value = GetNbRows ( )
    long GetNbColumns ( )
    return_value = GetNbColumns ( )
    void AddRow ( in StringSeq theData )
    AddRow ( theData )
    void SetRow ( in long theRow, in StringSeq theData )
    SetRow ( theRow, theData )
    StringSeq GetRow ( in long theRow )
    return_value = GetRow ( theRow )
    void AddColumn ( in StringSeq theData )
    AddColumn ( theData )
    void SetColumn ( in long theColumn, in StringSeq theData )
    SetColumn ( theColumn, theData )
    StringSeq GetColumn ( in long theColumn )
    return_value = GetColumn ( theColumn )
    void PutValue ( in string theValue, in long theRow, in long theColumn )
    PutValue ( theValue, theRow, theColumn )
    boolean HasValue ( in long theRow, in long theColumn )
    return_value = HasValue ( theRow, theColumn )
    string GetValue ( in long theRow, in long theColumn )
    return_value = GetValue ( theRow, theColumn )
    void SetNbColumns ( in long theNbColumns )
    SetNbColumns ( theNbColumns )
    LongSeq GetRowSetIndices ( in long theRow )
    return_value = GetRowSetIndices ( theRow )
    boolean ReadFromFile ( in TMPFile theStream )
    return_value = ReadFromFile ( theStream )
    TMPFile SaveToFile ( )
    return_value = SaveToFile ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface AttributeStudyProperties
    IDL file
    Python
    void SetUserName ( in string theName )
    SetUserName ( theName )
    string GetUserName ( )
    return_value = GetUserName ( )
    void SetCreationDate ( in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear )
    SetCreationDate ( theMinute, theHour, theDay, theMonth, theYear )
    boolean GetCreationDate ( out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear )
    [ return_value, theMinute, theHour, theDay, theMonth, theYear ] = GetCreationDate ( )
    void SetCreationMode ( in string theMode )
    SetCreationMode ( theMode )
    string GetCreationMode ( )
    return_value = GetCreationMode ( )
    void SetModified ( in long theModified )
    SetModified ( theModified )
    boolean IsModified ( )
    return_value = IsModified ( )
    long GetModified ( )
    return_value = GetModified ( )
    void SetLocked ( in boolean theLocked )
    SetLocked ( theLocked )
    boolean IsLocked ( )
    return_value = IsLocked ( )
    void SetModification ( in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear )
    SetModification ( theName, theMinute, theHour, theDay, theMonth, theYear )
    void GetModificationsList ( out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator )
    [ theNames, theMinutes, theHours, theDays, theMonths, theYears ] = GetModificationsList ( theWithCreator )

    - - - - - - - - - - - - - - - - - - - -
    interface AttributePythonObject
    IDL file
    Python
    void SetObject ( in string theSequence, in boolean IsScript )
    SetObject ( theSequence, IsScript )
    string GetObject ( )
    return_value = GetObject ( )
    boolean IsScript ( )
    return_value = IsScript ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Component.html b/doc/salome/tui/KERNEL/HTML/SALOME_Component.html deleted file mode 100644 index 2d802860c..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Component.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Container
    IDL file
    Python
    Container start_impl ( in string ContainerName )
    return_value = start_impl ( ContainerName )
    Component load_impl ( in string nameToRegister, in string componentName )
    return_value = load_impl ( nameToRegister, componentName )
    void remove_impl ( in Component component_i )
    remove_impl ( component_i )
    void finalize_removal ( )
    finalize_removal ( )
    void ping ( )
    ping ( )
    boolean Kill_impl ( )
    return_value = Kill_impl ( )
    string getHostName ( )
    return_value = getHostName ( )
    long getPID ( )
    return_value = getPID ( )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Component
    IDL file
    Python
    void ping ( )
    ping ( )
    void destroy ( )
    destroy ( )
    Container GetContainerRef ( )
    return_value = GetContainerRef ( )
    void setProperties ( in FieldsDict dico )
    setProperties ( dico )
    FieldsDict getProperties ( )
    return_value = getProperties ( )
    void Names ( in string aGraphName, in string aNodeName )
    Names ( aGraphName, aNodeName )
    boolean Kill_impl ( )
    return_value = Kill_impl ( )
    boolean Stop_impl ( )
    return_value = Stop_impl ( )
    boolean Suspend_impl ( )
    return_value = Suspend_impl ( )
    boolean Resume_impl ( )
    return_value = Resume_impl ( )
    long CpuUsed_impl ( )
    return_value = CpuUsed_impl ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html deleted file mode 100644 index c73173ffd..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_DataTypeCatalog.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface DataCatalog
    IDL file
    Python
    ListOfDataTypeName GetDataTypeList ( )
    return_value = GetDataTypeList ( )
    boolean isDerivedFrom ( in string type_in, in string type_out )
    return_value = isDerivedFrom ( type_in, type_out )
    string GetDataInterfaceRead ( in string type )
    return_value = GetDataInterfaceRead ( type )
    string GetDataInterfaceWrite ( in string type )
    return_value = GetDataInterfaceWrite ( type )
    ListOfDataTypeName GetDataTypeParents ( in string type )
    return_value = GetDataTypeParents ( type )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html b/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html deleted file mode 100644 index 37c3107c9..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Exception.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html deleted file mode 100644 index 5f618eb1a..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_ModuleCatalog.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Acomponent
    IDL file
    Python
    ListOfInterfaces GetInterfaceList ( )
    return_value = GetInterfaceList ( )
    DefinitionInterface GetInterface ( in string interfacename )
    return_value = GetInterface ( interfacename )
    ListOfServices GetServiceList ( in string interfacename )
    return_value = GetServiceList ( interfacename )
    Service GetService ( in string interfacename, in string servicename )
    return_value = GetService ( interfacename, servicename )
    Service GetDefaultService ( in string interfacename )
    return_value = GetDefaultService ( interfacename )
    string GetPathPrefix ( in string machinename )
    return_value = GetPathPrefix ( machinename )

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface ModuleCatalog
    IDL file
    Python
    void ping ( )
    ping ( )
    ListOfComputers GetComputerList ( )
    return_value = GetComputerList ( )
    string GetPathPrefix ( in string machinename )
    return_value = GetPathPrefix ( machinename )
    ListOfComponents GetComponentList ( )
    return_value = GetComponentList ( )
    ListOfIAPP_Affich GetComponentIconeList ( )
    return_value = GetComponentIconeList ( )
    ListOfComponents GetTypedComponentList ( in ComponentType component_type )
    return_value = GetTypedComponentList ( component_type )
    Acomponent GetComponent ( in string componentname )
    return_value = GetComponent ( componentname )
    Component GetComponentInfo ( in string componentName )
    return_value = GetComponentInfo ( componentName )
    void ImportXmlCatalogFile ( in string filename )
    ImportXmlCatalogFile ( filename )
    void shutdown ( )
    shutdown ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html b/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html deleted file mode 100644 index fd319e119..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Registry.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Components
    IDL file
    Python
    void ping ( )
    ping ( )
    unsigned long add ( in Infos lesInfos )
    return_value = add ( lesInfos )
    void remove ( in unsigned long id )
    remove ( id )
    unsigned long size ( )
    return_value = size ( )
    AllInfos getall ( )
    return_value = getall ( )
    AllInfos history ( )
    return_value = history ( )
    void end ( )
    end ( )
    void hello ( in unsigned long id )
    hello ( id )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html b/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html deleted file mode 100644 index 787a6283e..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_RessourcesCatalog.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
    interface RessourcesCatalog
    IDL file
    Python
    ListOfComputer GetComputerList ( )
    return_value = GetComputerList ( )
    ListOfContainerType GetContainerTypeList ( in string computer )
    return_value = GetContainerTypeList ( computer )
    computer_info GetComputerInfo ( in string computer )
    return_value = GetComputerInfo ( computer )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_Session.html b/doc/salome/tui/KERNEL/HTML/SALOME_Session.html deleted file mode 100644 index 37b46747d..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_Session.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    interface Session
    IDL file
    Python
    void GetInterface ( )
    GetInterface ( )
    Component GetVisuComponent ( )
    return_value = GetVisuComponent ( )
    void StopSession ( )
    StopSession ( )
    StatSession GetStatSession ( )
    return_value = GetStatSession ( )
    void ping ( )
    ping ( )
    long GetActiveStudyId ( )
    return_value = GetActiveStudyId ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html b/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html deleted file mode 100644 index 56348f8a1..000000000 --- a/doc/salome/tui/KERNEL/HTML/SALOME_TestComponent.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
    interface TestComponent
    IDL file
    Python
    string Coucou ( in long L )
    return_value = Coucou ( L )
    void Setenv ( )
    Setenv ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/TestNotif.html b/doc/salome/tui/KERNEL/HTML/TestNotif.html deleted file mode 100644 index a181974d2..000000000 --- a/doc/salome/tui/KERNEL/HTML/TestNotif.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
    interface Solver
    IDL file
    Python
    boolean Connect ( )
    return_value = Connect ( )
    void Start ( )
    Start ( )
    void ReStart ( )
    ReStart ( )

    -
    diff --git a/doc/salome/tui/KERNEL/HTML/TypeData.html b/doc/salome/tui/KERNEL/HTML/TypeData.html deleted file mode 100644 index 37c3107c9..000000000 --- a/doc/salome/tui/KERNEL/HTML/TypeData.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/doc/salome/tui/KERNEL/doxydev.in b/doc/salome/tui/KERNEL/doxydev.in deleted file mode 100644 index 168d1c5ee..000000000 --- a/doc/salome/tui/KERNEL/doxydev.in +++ /dev/null @@ -1,241 +0,0 @@ -# Doxyfile 1.4.6 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../ -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = @top_builddir@ \ - @top_srcdir@ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 5 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = YES -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = NO -GENERATE_BUGLIST = NO -GENERATE_DEPRECATEDLIST= NO -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -SHOW_USED_FILES = NO -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = \ - @top_srcdir@ -FILE_PATTERNS = *.idl *.?xx *.h *.hh *.i *c *.cc python_extension_must_be_here -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = KERNEL -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = sources/footer.html -HTML_STYLESHEET = sources/doxygen.css -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = NO -UML_LOOK = YES -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = NO -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/doc/salome/tui/KERNEL/doxyfile.in b/doc/salome/tui/KERNEL/doxyfile.in deleted file mode 100755 index a4f54eba4..000000000 --- a/doc/salome/tui/KERNEL/doxyfile.in +++ /dev/null @@ -1,214 +0,0 @@ -# Doxyfile 1.3-rc1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" -PROJECT_NUMBER = id#1.1 -OUTPUT_DIRECTORY = ../ -OUTPUT_LANGUAGE = English -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../../../../share/salome/idl/SALOME_ModuleCatalog.idl \ - ../../../../share/salome/idl/SALOMEDS.idl \ - ../../../../share/salome/idl/SALOME_Exception.idl \ - ../../../../share/salome/idl/SALOMEDS_Attributes.idl \ - ../../../../share/salome/idl/SALOME_Component.idl \ - ../../../../share/salome/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx \ - ../../../../share/salome/src/NamingService/SALOME_NamingService.hxx \ - ../../../../share/salome/src/NamingService/SALOME_NamingService.cxx \ - ../../../../share/salome/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx \ - ../../../../build/salome/bin/salome \ - ../../../../build/salome/src/Batch_SWIG \ - ../../../../build/salome/src/Communication_SWIG \ - ../../../../build/salome/src/LifeCycleCORBA_SWIG \ - ../../../../build/salome/src/LifeCycleCORBA_SWIG \ - ../../../../build/salome/src/NOTIFICATION_SWIG -FILE_PATTERNS = *.idl *.hxx *.cxx python_extension_must_be_here -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = KERNEL -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/doc/salome/tui/KERNEL/doxyuser.in b/doc/salome/tui/KERNEL/doxyuser.in deleted file mode 100644 index d3387500b..000000000 --- a/doc/salome/tui/KERNEL/doxyuser.in +++ /dev/null @@ -1,249 +0,0 @@ -# Doxyfile 1.4.6 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME v.@VERSION@" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../ -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = @top_builddir@ \ - @top_srcdir@ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 5 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = YES -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = NO -GENERATE_BUGLIST = NO -GENERATE_DEPRECATEDLIST= NO -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = \ - @top_srcdir@/doc/salome \ - @top_srcdir@/bin \ - @top_srcdir@/idl \ - @top_srcdir@/src/Container \ - @top_srcdir@/src/LifeCycleCORBA \ - @top_srcdir@/src/NamingService \ - @top_srcdir@/src/Notification \ - @top_srcdir@/src/Utils \ - @top_srcdir@/src/DSC -FILE_PATTERNS = *.dox *.idl *.hxx *.cxx python_extension_must_be_here -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = YES -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = KERNEL -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = sources/footer.html -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = NO -UML_LOOK = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = NO -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/doc/salome/tui/KERNEL/exemple/Example1.html b/doc/salome/tui/KERNEL/exemple/Example1.html deleted file mode 100755 index 1ec12baf9..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example1.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Exemple - -
    #%AttributeReal interface (creations/saving/restoring)%
    -#%Methods : FindOrCreateAttribute, Value, SaveAs, SetValue, FindComponent, FindAttribute, Open%
    -
    -
    -#       create AttributeReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#      save / restore study      
    -#=================================
    -
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -#file = "/tmp/ggg.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example10.html b/doc/salome/tui/KERNEL/exemple/Example10.html deleted file mode 100755 index fde0125ea..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example10.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%AttributeExpandable interface(creations/saving/restoring)%
    -#%SALOMEDS methods : SaveAs FindComponent  FindAttribute Open%
    -#%Attribute methods : SetExpandable IsExpandable%
    -
    -#              create    AttributeExpandable
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute( batchmode_geompy.father, "AttributeExpandable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -A = A._narrow(SALOMEDS.AttributeExpandable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -
    -A.SetExpandable(1)
    -
    -if A.IsExpandable() == 0:
    -        "Error: wrong value of AttributeExpandable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file,  batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeExpandable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeExpandable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeExpandable"
    -
    -A = A._narrow(SALOMEDS.AttributeExpandable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeExpandable attribute"
    -
    -if A.IsExpandable() == 0:
    -        "Error: wrong value of AttributeExpandable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example11.html b/doc/salome/tui/KERNEL/exemple/Example11.html deleted file mode 100755 index 38218bddc..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example11.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%Test AttributeOpened (creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetOpened, IsOpened%
    -
    -#              create    AttributeOpened
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeOpened")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -A = A._narrow(SALOMEDS.AttributeOpened)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -
    -A.SetOpened(1)
    -
    -if A.IsOpened() == 0:
    -        "Error: wrong value of AttributeOpened"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeOpened
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeOpened")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeOpened"
    -
    -A = A._narrow(SALOMEDS.AttributeOpened)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeOpened attribute"
    -
    -if A.IsOpened() == 0:
    -        "Error: wrong value of AttributeOpened"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example12.html b/doc/salome/tui/KERNEL/exemple/Example12.html deleted file mode 100755 index 57c5d4531..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example12.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Example - -
    #%AttributeTextColor interface (creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetTextColor  TextColor%
    -
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeTextColor
    -#===========================================================
    -import SALOMEDS_Attributes_idl
    -color = SALOMEDS_Attributes_idl._0_SALOMEDS.Color(234,345,231)
    -
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextColor")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -A = A._narrow(SALOMEDS.AttributeTextColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -
    -A.SetTextColor(color)
    -
    -c = A.TextColor();
    -
    -if c.R != 234 or c.G != 345 or c.B != 231:
    -        print "Error: wrong value of AttributeTextColor"
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributeTextColor
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeTextColor")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTextColor"
    -
    -A = A._narrow(SALOMEDS.AttributeTextColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextColor attribute"
    -
    -c = A.TextColor();
    -if c.R != 234 or c.G != 345 or c.B != 231:
    -        print "Error: wrong value of AttributeTextColor"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example13.html b/doc/salome/tui/KERNEL/exemple/Example13.html deleted file mode 100755 index 9ecf9964b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example13.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Example - -
    #%Test AttributeTextHighlightColor interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods :  SetTextHighlightColor TextHighlightColor%
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeTextHighlightColor
    -#===========================================================
    -
    -import SALOMEDS_Attributes_idl
    -highlightcolor=SALOMEDS_Attributes_idl._0_SALOMEDS.Color(256,256,256)
    -
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTextHighlightColor")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -A = A._narrow(SALOMEDS.AttributeTextHighlightColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -
    -A.SetTextHighlightColor(highlightcolor)
    -
    -c = A.TextHighlightColor();
    -if c.R != 256 or c.G != 256 or c.B != 256:
    -        print "Error: wrong value of AttributeTextHighlightColor"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributeTextHighlightColor
    -#============================================================
    -
    -res, A = father.FindAttribute("AttributeTextHighlightColor")
    -print res, A
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTextHighlightColor"
    -
    -A = A._narrow(SALOMEDS.AttributeTextHighlightColor)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTextHighlightColor attribute"
    -
    -c = A.TextHighlightColor();
    -
    -if c.R != 256 or c.G != 256 or c.B != 256:
    -        print "Error: wrong value of AttributeTextTextHighlightColor"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example14.html b/doc/salome/tui/KERNEL/exemple/Example14.html deleted file mode 100755 index a4e0ada09..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example14.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -Example - -
    #%AttributePixMap interface (creations/saving/restoring)%
    -#%SALOMEDS methods  : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetPixMap, GetPixMap%
    -
    -#--------------------------------------------------------------------------
    -
    -#--------------------------------------------------------------------------
    -#   create  AttributePixMap
    -#===============================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePixMap")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePixMap attribute"
    -aPixmap = A._narrow(SALOMEDS.AttributePixMap);
    -aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" );
    -
    -if aPixmap.GetPixMap() != "ICON_OBJBROWSER_Geometry":
    -        print "Error: wrong value of AttributePixMap"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#       find   AttributePixMap
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributePixMap")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error: AttributePixMap not found "
    -
    -A = A._narrow(SALOMEDS.AttributePixMap)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePixMap attribute"
    -
    -if A.GetPixMap() != "ICON_OBJBROWSER_Geometry":
    -        print "Error: wrong value of AttributePixMap"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example15.html b/doc/salome/tui/KERNEL/exemple/Example15.html deleted file mode 100755 index f6cddac5a..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example15.html +++ /dev/null @@ -1,51 +0,0 @@ - - - -Example - -
    #%AttributeLocalID interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%    
    -#%Attribute methods : Value,  SetValue%
    -
    -#       create AttributeLocalID
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeLocalID")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeLocalID attribute"
    -A = A._narrow(SALOMEDS.AttributeLocalID)
    -
    -A.SetValue(763242882)
    -
    -if A.Value() != 763242882:
    -        print "Error: wrong value of AttributeLocalID"
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find  AttributeLocalID
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeLocalID")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeLocalID"
    -
    -A = A._narrow(SALOMEDS.AttributeLocalID)
    -
    -if A.Value() != 763242882:
    -        print "Error: wrong value of AttributeLocalID"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example16.html b/doc/salome/tui/KERNEL/exemple/Example16.html deleted file mode 100755 index ec8bfd5e3..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example16.html +++ /dev/null @@ -1,158 +0,0 @@ - - - -Example - -
    Methods : GetAvailableUndos, ChangeValue, FindOrCreateAttribute, SaveAs, GetAvailableRedos, Undo, FindComponent, Redo, FindAttribute, Open, CommitCommand, NewCommand
    -
    -
    -dir= os.getenv("TmpDir")
    -if dir == None:
    -        dir = "/tmp"
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -# 1st transaction -----------------------------------------
    -batchmode_geompy.myBuilder.NewCommand()
    -#       create AttributeSequenceOfInteger      
    -#=========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -
    -A.Add(100)
    -A.Add(300)
    -A.Add(500)
    -A.Add(400)
    -A.Add(700)
    -print "First transaction goes on :  HasOpenCommand() = ", batchmode_geompy.myBuilder.HasOpenCommand()
    -batchmode_geompy.myBuilder.CommitCommand() #--------------
    -
    -# 2nd transaction ------------------------------------------
    -batchmode_geompy.myBuilder.NewCommand() 
    -A.Remove(3)
    -A.ChangeValue(4,500)
    -batchmode_geompy.myBuilder.CommitCommand() #--------------
    -
    -if batchmode_geompy.myBuilder.GetAvailableUndos() == 0:
    -        raise RuntimeError, "GetAvailableUndos() = 0 but must not !"
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger"
    -
    -file1 = dir + "/test1.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file1, batchmode_geompy.myStudy)
    -
    -# 1st Undo ---------------------------------------
    -batchmode_geompy.myBuilder.Undo()
    -res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A is None:
    -        raise  RuntimeError, "After first 'undo' can't find AttributeSequenceOfInteger"
    -if A.Length() != 5:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or  A.Value(5) != 700:
    -        print  A.Value(1), A.Value(2), A.Value(3), A.Value(4), A.Value(5)
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger after the first 'undo'!"
    -# save 
    -file2 = dir + "/test2.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file2, batchmode_geompy.myStudy)
    -#-------------------------------------------------
    -# 2nd Undo ---------------------------------------
    -batchmode_geompy.myBuilder.Undo()
    -res, attr = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if res !=0 or attr != None :
    -        raise  RuntimeError, "After the second 'undo' AttributeSequenceOfInteger exists but must not!"
    -file3 = dir + "/test3.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file3, batchmode_geompy.myStudy)
    -#-------------------------------------------------
    -
    -#make redo twice ---------------------------------
    -if batchmode_geompy.myBuilder.GetAvailableRedos() == 0:
    -        raise RuntimeError, "GetAvailableRedos() = 0 but must not !"
    -batchmode_geompy.myBuilder.Redo()
    -batchmode_geompy.myBuilder.Redo()
    -res, A = batchmode_geompy.myBuilder.FindAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if res ==0 or A== None :
    -        raise  RuntimeError, "AttributeSequenceOfInteger is not found but must be!"
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger"
    -
    -
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file1);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 500:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file2);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 5:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 500 or A.Value(4) != 400 or  A.Value(5) != 700:
    -        raise  RuntimeError, "Wrong  value of  AttributeSequenceOfInteger after the first 'undo'!"
    -
    -#----------------------------------------------------------------------
    -openedStudy=batchmode_geompy.myStudyManager.Open(file3);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -
    -if res!=0 or A != None:
    -        raise RuntimeError, " AttributeSequenceOfInteger is found but must not!"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example17.html b/doc/salome/tui/KERNEL/exemple/Example17.html deleted file mode 100755 index 458ba1e08..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example17.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Example - -
    #% Check  methods : %
    -SALOMEDS methods : RemoveAttribute, FindOrCreateAttribute, NewStudy, GetAllAttributes, NewCommand, CommitCommand, AbortCommand, NewComponent%
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -child = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -#==========================================================
    -#       create AttributeSequenceOfReal      
    -#==========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSequenceOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -if A == None :
    -        raise  RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer"
    -
    -A.Add(0.0293)
    -A.Add(522)
    -A.Add(98234)
    -A.Add(83.287)
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() 
    -#==========================================================
    -#      create  AttributeInteger      
    -#==========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger"
    -
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create AttributeName     
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A.SetValue("AttributesTesting")
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"        
    -
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create     AttributeComment 
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeComment")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -A.SetValue("GEOM")
    -
    -batchmode_geompy.myBuilder.AbortCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#             create   AttributePersistentRef   
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributePersistentRef")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -A.SetValue("/tmp/test;1")
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -batchmode_geompy.myBuilder.NewCommand()  #===================================
    -#              create    AttributeDrawable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeDrawable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -A.SetDrawable(1)
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#              create    AttributeSelectable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child, "AttributeSelectable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -A.SetSelectable(1)
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -
    -batchmode_geompy.myBuilder.NewCommand() #===================
    -#===========================================================
    -batchmode_geompy.myBuilder.RemoveAttribute(child,"AttributeSelectable")
    -batchmode_geompy.myBuilder.CommitCommand()
    -
    -# Control the attributes 
    -#===========================================================
    -
    -res, A = batchmode_geompy.myBuilder.FindAttribute(child, "AttributeComment")
    -print "res = ", res
    -if A != None :
    -        print " AttributeComment was found"
    -else:
    -        print " AttributeComment is not found. It's correct"
    -
    -attributes=[]
    - 
    -attributes = child.GetAllAttributes()
    -
    -length = len(attributes)
    -
    -print "Attributes number = ", length
    -print attributes
    -for i in range(0, length) :
    -        attr = attributes[i]
    -        if attr is None :
    -                print i,"None item of object attributes list"
    -
    -if length != 5 :
    -        raise RuntimeError, "Wrong number of attributes"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example18.html b/doc/salome/tui/KERNEL/exemple/Example18.html deleted file mode 100755 index a6c00d67d..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example18.html +++ /dev/null @@ -1,171 +0,0 @@ - - - -Example - -
    #%AttributeTreeNode interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, NewObject%
    -#%Attribute methods : HasFirst, HasFather, SetPrevious, Next, InsertAfter, GetFather, HasNext, SetValue, Append, NewStudy, Label, IsRoot, Prepend, SetFather, Depth, HasPrevious%
    -
    -child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N1")
    -N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, "AttributeTreeNode")
    -if N1 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N2")
    -N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, "AttributeTreeNode")
    -if N2 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N3")
    -N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, "AttributeTreeNode")
    -if N3 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -
    -child11 = batchmode_geompy.myBuilder.NewObject(child1)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N11")
    -
    -N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, "AttributeTreeNode")
    -
    -if N11 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child111 = batchmode_geompy.myBuilder.NewObject(child11)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N111")
    -
    -N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeTreeNode")
    -
    -if N111 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    - 
    -
    -child31 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N31")
    -
    -N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, "AttributeTreeNode")
    -if N31 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child32 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N32")
    -
    -N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, "AttributeTreeNode")
    -if N32 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child321 = batchmode_geompy.myBuilder.NewObject(child32)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N321")
    -
    -N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, "AttributeTreeNode")
    -if N321 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child33 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N33")
    -
    -N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, "AttributeTreeNode")
    -if N33 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -child34 = batchmode_geompy.myBuilder.NewObject(child3)
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,"AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -A.SetValue("N34")
    -
    -N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, "AttributeTreeNode")
    -if N34 == None :
    -        raise  RuntimeError, "Can't create AttributeTreeNode attribute"
    -
    -
    -
    -#Create links between tree nodes.
    -#  -| root
    -#   --N1 __
    -#   |     N11__
    -#   |           N111
    -#   --N2           
    -#   |   
    -#   --N3__
    -#         N31
    -#         N32__
    -#              N321
    -#         N33
    -#         N34
    -        
    -N11.SetFather(N1)
    -N11.Append(N111)
    -N3.SetPrevious(N1)
    -N3.Prepend(N2)
    -
    -N32.SetFather(N3)
    -N32.Prepend(N31)
    -N33.InsertAfter(N32)
    -N33.Append(N34)
    -print "-------------  ", N1, "  -------------  "
    -print "N1.Label() = ", N1.Label() , "IsRoot() = ", N1.IsRoot(), "Depth() = ", N1.Depth()
    -print "N11.Label() = ", N11.Label() , "IsRoot() = ", N11.IsRoot(), "Depth() = ", N11.Depth()
    -print "N111.Label() = ", N111.Label() , "IsRoot() = ", N111.IsRoot(), "Depth() = ", N111.Depth()
    -print "N2.Label() = ", N2.Label() , "IsRoot() = ",  N2.IsRoot(), "Depth() = ", N2.Depth()
    -print "N3.Label() = ", N3.Label() , "IsRoot() = ", N3.IsRoot(), "Depth() = ", N3.Depth()
    -print "N31.Label() = ", N31.Label() , "IsRoot() = ", N31.IsRoot(), "Depth() = ", N31.Depth()
    -print "N32.Label() = ", N32.Label() , "IsRoot() = ", N32.IsRoot(), "Depth() = ", N32.Depth()
    -print "N321.Label() = ", N321.Label() , "IsRoot() = ", N321.IsRoot(), "Depth() = ", N321.Depth()
    -print "N33.Label() = ", N33.Label() , "IsRoot() = ", N33.IsRoot(), "Depth() = ", N33.Depth()
    -print "N34.Label() = ", N34.Label() , "IsRoot() = ", N34.IsRoot(), "Depth() = ", N34.Depth()
    -print "N1.IsRoot()=", N1.IsRoot()
    -
    -print "N1.HasNext() = ",N1.HasNext()
    -if  N1.HasNext():
    -        print N1.Next().Label()
    -
    -print "N32.HasPrevious() = ",N32.HasPrevious()
    -if  N32.HasPrevious():
    -        print N32.GetPrevious().Label()
    -
    -print "N111.HasFirst()=",N111.HasFirst()
    -print "N111.HasFather()=",N111.HasFather()
    -if N111.HasFather() :
    -        print "N111.GetFather().Label()=",N111.GetFather().Label()
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example19.html b/doc/salome/tui/KERNEL/exemple/Example19.html deleted file mode 100755 index 4c5c2902b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example19.html +++ /dev/null @@ -1,547 +0,0 @@ - - - -Exemple - -
    -#^ SALOMEDS methods :  FindOrCreateAttribute, Save, SaveAs, Close, Open, FindComponent, FindAttribute, FindObject, LoadWith^
    -#^ Attribute methods : Value, SetValue^
    -#======================================================================
    -#1. Create Study and add some components to it
    -#======================================================================
    -
    -#=================================
    -#       create AttributeReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -# ===  Geometry  ==================================================
    -
    -import batchmode_geompy
    - 
    -#===================================
    -#     define a box
    -#===================================
    -
    -box = batchmode_geompy.MakeBox(0., 0., 0., 100., 200., 300.)
    -idbox = batchmode_geompy.addToStudy(box,"box")
    -
    -
    -geom = batchmode_geompy.geom
    -import SMESH
    -import batchmode_smesh
    -ShapeType = batchmode_smesh.ShapeType
    -
    -# ---- add first face of box in study
    -
    -subShapeList = batchmode_geompy.SubShapeAll(box,ShapeType["Face"])
    -face=subShapeList[0]
    -name = "box_face"
    -print name
    -idface= batchmode_geompy.addToStudyInFather(box,face,name)
    -
    -# ---- add shell from box  in study
    -
    -subShellList= batchmode_geompy.SubShapeAll(box,ShapeType["Shell"])
    -shell = subShellList[0]
    -name = "box_shell"
    -print name
    -idshell= batchmode_geompy.addToStudyInFather(box,shell,name)
    -
    -# ---- add first edge of face in study
    -
    -edgeList =  batchmode_geompy.SubShapeAll(face,ShapeType["Edge"])
    -edge=edgeList[0];
    -name = "face_edge"
    -print name
    -idedge= batchmode_geompy.addToStudyInFather(face,edge,name)
    -
    -# ---- launch SMESH, init a Mesh with the box
    -
    -smesh =  batchmode_smesh.smesh
    -#  --  Init  --
    -shape = batchmode_geompy.IDToObject(idbox)
    -mesh=smesh.Init(geom, batchmode_geompy.myStudyId, shape)
    -
    -orb = batchmode_geompy.orb
    -
    -idmesh = batchmode_smesh.AddNewMesh( orb.object_to_string(mesh) )
    -batchmode_smesh.SetName(idmesh, "Meshbox");
    -batchmode_smesh.SetShape(idbox, idmesh);
    -
    -# ---- create Hypothesis
    -
    -print "-------------------------- create Hypothesis ----------------------"
    -print "-------------------------- LocalLength"
    -hyp1 = smesh.CreateHypothesis("LocalLength", batchmode_geompy.myStudyId )
    -hypLen1 = hyp1._narrow(SMESH.SMESH_LocalLength)
    -hypLen1.SetLength(100)
    -print hypLen1.GetName()
    -print hypLen1.GetId()
    -print hypLen1.GetLength()
    -
    -idlength = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypLen1) );
    -batchmode_smesh.SetName(idlength, "Local_Length_100");
    -
    -print "-------------------------- NumberOfSegments"
    -hyp2 =  smesh.CreateHypothesis("NumberOfSegments", batchmode_geompy.myStudyId )
    -hypNbSeg1=hyp2._narrow(SMESH.SMESH_NumberOfSegments)
    -hypNbSeg1.SetNumberOfSegments(7)
    -print hypNbSeg1.GetName()
    -print hypNbSeg1.GetId()
    -print hypNbSeg1.GetNumberOfSegments()
    -
    -idseg =  batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypNbSeg1) );
    -batchmode_smesh.SetName(idseg, "NumberOfSegments_7");
    -
    -print "-------------------------- MaxElementArea"
    -hyp3 = smesh.CreateHypothesis("MaxElementArea",  batchmode_geompy.myStudyId)
    -hypArea1=hyp3._narrow(SMESH.SMESH_MaxElementArea)
    -hypArea1.SetMaxElementArea(2500)
    -print hypArea1.GetName()
    -print hypArea1.GetId()
    -print hypArea1.GetMaxElementArea()
    -
    -idarea1 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea1) );
    -batchmode_smesh.SetName(idarea1, "MaxElementArea_2500");
    -
    -print "-------------------------- MaxElementArea"
    -hyp3 = smesh.CreateHypothesis("MaxElementArea",  batchmode_geompy.myStudyId)
    -hypArea2 = hyp3._narrow(SMESH.SMESH_MaxElementArea)
    -hypArea2.SetMaxElementArea(500)
    -print hypArea2.GetName()
    -print hypArea2.GetId()
    -print hypArea2.GetMaxElementArea()
    -
    -idarea2 = batchmode_smesh.AddNewHypothesis( orb.object_to_string(hypArea2) );
    -batchmode_smesh.SetName(idarea2, "MaxElementArea_500");
    -
    -print "-------------------------- Regular_1D"
    -alg1 = smesh.CreateHypothesis("Regular_1D",  batchmode_geompy.myStudyId)
    -algo1 = alg1._narrow(SMESH.SMESH_Algo)
    -listHyp = algo1.GetCompatibleHypothesis()
    -for hyp in listHyp:
    -    print hyp
    -algoReg=alg1._narrow(SMESH.SMESH_Regular_1D)
    -print algoReg.GetName()
    -print algoReg.GetId()
    -
    -idreg = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoReg) );
    -batchmode_smesh.SetName(idreg, "Regular_1D");
    -
    -print "-------------------------- MEFISTO_2D"
    -alg2 = smesh.CreateHypothesis("MEFISTO_2D",  batchmode_geompy.myStudyId)
    -algo2 = alg2._narrow(SMESH.SMESH_Algo)
    -listHyp=algo2.GetCompatibleHypothesis()
    -for hyp in listHyp:
    -    print hyp
    -algoMef=alg2._narrow(SMESH.SMESH_MEFISTO_2D)
    -print algoMef.GetName()
    -print algoMef.GetId()
    -
    -idmef = batchmode_smesh.AddNewAlgorithms( orb.object_to_string(algoMef) );
    -batchmode_smesh.SetName(idmef, "MEFISTO_2D");
    -
    -
    -# ---- add hypothesis to edge
    -
    -print "-------------------------- add hypothesis to edge"
    -edge = batchmode_geompy.IDToObject(idedge)
    -submesh = mesh.GetElementsOnShape(edge)
    -ret = mesh.AddHypothesis(edge,algoReg)
    -print ret
    -ret=mesh.AddHypothesis(edge,hypLen1)
    -print ret
    -
    -idsm1 = batchmode_smesh.AddSubMeshOnShape( idmesh,
    -                                           idedge,
    -                                           orb.object_to_string(submesh),
    -                                           ShapeType["Edge"] )
    -batchmode_smesh.SetName(idsm1, "SubMeshEdge")
    -batchmode_smesh.SetAlgorithms( idsm1, idreg );
    -batchmode_smesh.SetHypothesis( idsm1, idlength );
    -
    -print "-------------------------- add hypothesis to face"
    -face=batchmode_geompy.IDToObject(idface)
    -submesh=mesh.GetElementsOnShape(face)
    -ret=mesh.AddHypothesis(face,hypArea2)
    -print ret
    -
    -idsm2 = batchmode_smesh.AddSubMeshOnShape( idmesh,
    -                                    idface,
    -                                    orb.object_to_string(submesh),
    -                                    ShapeType["Face"] )
    -batchmode_smesh.SetName(idsm2, "SubMeshFace")
    -batchmode_smesh.SetHypothesis( idsm2, idarea2 );
    -
    -# ---- add hypothesis to box
    -
    -print "-------------------------- add hypothesis to box"
    -box=batchmode_geompy.IDToObject(idbox)
    -submesh=mesh.GetElementsOnShape(box)
    -ret=mesh.AddHypothesis(box,algoReg)
    -print ret
    -ret=mesh.AddHypothesis(box,hypNbSeg1)
    -print ret
    -ret=mesh.AddHypothesis(box,algoMef)
    -print ret
    -ret=mesh.AddHypothesis(box,hypArea1)
    -print ret
    -
    -batchmode_smesh.SetAlgorithms( idmesh, idreg );
    -batchmode_smesh.SetHypothesis( idmesh, idseg );
    -batchmode_smesh.SetAlgorithms( idmesh, idmef );
    -batchmode_smesh.SetHypothesis( idmesh, idarea1 );
    -
    -# ---- compute box
    -
    -print "-------------------------- compute box"
    -ret=smesh.Compute(mesh,box)
    -print ret
    -log=mesh.GetLog(0); # no erase trace
    -for linelog in log:
    -    print linelog
    -
    -
    -#=======================================================
    -#    add  SuperVision component
    -#=======================================================
    -
    -from batchmode_SuperV import *
    -import os
    -dir= os.getenv("SUPERV_ROOT_DIR")
    -if dir == None:
    -        raise RuntimeError, "SUPERV_ROOT_DIR is not defined"
    -xmlfile = dir +"/examples/GraphEssai.xml"
    -print "--------------\n"+xmlfile+"\n--------------\n"
    -
    -myGraph = Graph ( xmlfile )
    -
    -# This DataFlow is "valid" : no loop, correct links between Nodes etc...
    -print myGraph.IsValid()
    -
    -# Get Nodes
    -myGraph.PrintNodes()
    -Add,Sub,Mul,Div = myGraph.Nodes()
    -
    -# Load Datas
    -Addx = Add.Input("x",3.)
    -Addy = Add.Input("y",4.5)
    -Subx = Sub.Input("x",1.5)
    -
    -# Get Output Port
    -Addz = Add.Port('z')
    -Subz = Sub.Port('z')
    -Mulz = Mul.Port('z')
    -Divz = Div.Port('z')
    -
    -# This DataFlow is "executable" : all pending Ports are defined with Datas
    -print myGraph.IsExecutable()
    -
    -# Starts only execution of that DataFlow and gets control immediatly
    -print myGraph.Run()
    -
    -# That DataFlow is running ==> 0 (false)
    -print myGraph.IsDone()
    -
    -# Events of execution :
    -aStatus,aNode,anEvent,aState = myGraph.Event()
    -while aStatus :
    -    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
    -    aStatus,aNode,anEvent,aState = myGraph.Event()
    -print myGraph.IsDone()
    -
    -# Wait for Completion (but it is already done after event loop ...)
    -print "Done : ",myGraph.DoneW()
    -
    -# Get result
    -print "Result : ",Divz.ToString()
    -
    -# Intermediate results :
    -print "Intermediate Result Add\z : ",Addz.ToString()
    -print "Intermediate Result Sub\z : ",Subz.ToString()
    -print "Intermediate Result Mul\z : ",Mulz.ToString()
    -
    -print " "
    -#print "Type : print myGraph.IsDone()"
    -#print "       If execution is finished ==> 1 (true)"
    -res=myGraph.IsDone()
    -if res != 1:
    -        raise RuntimeError, "myGraph.Run() is not done"
    -
    -print " "
    -print "Type : print Divz.ToString()"
    -print "       You will get the result"
    -Divz.ToString()
    -
    -print " "
    -print "Type : myGraph.PrintPorts()"
    -print "       to see input and output values of the graph"
    -myGraph.PrintPorts()
    -
    -print " "
    -print "Type : Add.PrintPorts()"
    -Add.PrintPorts()
    -
    -print "Type : Sub.PrintPorts()"
    -Sub.PrintPorts()
    -
    -print "Type : Mul.PrintPorts()"
    -Mul.PrintPorts()
    -
    -print "Type : Div.PrintPorts()"
    -print "       to see input and output values of nodes"
    -Div.PrintPorts()
    -
    -# Export will create newsupervisionexample.xml and the corresponding .py file
    -tmpdir=os.getenv("TmpDir")
    -if tmpdir is None:
    -        tmpdir="/tmp"
    -file = tmpdir + "/newsupervisionexample"
    -print "--------------\n"+file+"\n--------------\n"
    -myGraph.Export(file)
    -
    -ior = batchmode_geompy.orb.object_to_string(myGraph.G)
    -addStudy(ior)
    -
    -GraphName = myGraph.Name()
    -print "Befor save ",
    -nodes = myGraph.Nodes()
    -length_bs = len(nodes)
    -print "ListOfNodes length = ", length_bs
    -names=[]
    -for node in nodes:
    -        names.append(node.Name())
    -print names
    -
    -
    -#=================================
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:  
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -
    -#==================================================
    -#1. SaveAs
    -#==================================================
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -batchmode_geompy.myStudyManager.Close(batchmode_geompy.myStudy)
    -
    -#rename the file and try to reread it again
    -
    -os.mkdir(str + "/test_dir")
    -
    -#2.==================================================
    -print " ------- We rename the file as " + str + "/test_dir/test_new.hdf"
    -os.rename(file, str+"/test_dir/test_new.hdf")
    -
    -#==================================================
    -#3. Open
    -#==================================================
    -print " ------- We try to open " + str + "/test_dir/test_new.hdf"
    -
    -try:
    -        openedStudy=batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf")
    -except Exception:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "GEOM component is not found!  Wrong study is opened." 
    -
    -
    -#=================================
    -#     find AttributeReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#==================================================
    -#     find  box
    -#==================================================
    -box = openedStudy.FindObject("box")
    -if box is None :
    -        raise  RuntimeError, "box was not found! Wrong study is opened."
    -
    -edge=openedStudy.FindObject("face_edge")
    -if edge is None :
    -        raise  RuntimeError, "face_edge was not found! Wrong study is opened."
    -
    -
    -father = openedStudy.FindComponent("MESH")
    -if father is None:
    -         raise  RuntimeError, "MESH component is not found!  Wrong study is opened." 
    -
    -hp=openedStudy.FindObject("Meshbox")
    -if hp is None:
    -        raise  RuntimeError, "Meshbox object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Algorithms Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algorithms Definition object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("MEFISTO_2D")
    -if hp is None:
    -        raise  RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Hypothesis Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algoriths Definition was not found! Wrong study is opened."
    -
    -#==================================================
    -# Find Supervisor
    -#==================================================
    -father = openedStudy.FindComponent("SUPERV")
    -if father is None: 
    -         raise  RuntimeError, "SUPERV component is not found!  Wrong study is opened." 
    -
    -SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision")
    -Builder = openedStudy.NewBuilder()
    -Builder.LoadWith(father, SuperV)
    -import SALOMEDS
    -
    -aChildIterator = openedStudy.NewChildIterator(father)
    -
    -#while aChildIterator.More():
    -anSObject = aChildIterator.Value()
    -#print "iterate: ", anSObject.GetID()
    -res, anAttr=anSObject.FindAttribute("AttributeIOR")
    -if res :
    -        anAttr=anAttr._narrow(SALOMEDS.AttributeIOR)
    -        ior = anAttr.Value()
    -        Graph=SuperV.getGraph(ior)
    -        ListOfNodes=Graph.Nodes()
    -        length_as= len(ListOfNodes)
    -        print "ListOfNodes length = ", length_as
    -        if length_as != length_bs:
    -                raise RuntimeErrror, "defferent length of nodes after study open"
    -#aChildIterator.Next()
    -
    -Names = []
    -for node in ListOfNodes:
    -        Names.append(node.Name())
    -names.sort()
    -Names.sort()
    -if names != Names :
    -        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
    -
    -#==================================================
    -#4. Save
    -#==================================================
    -batchmode_geompy.myStudyManager.Save(openedStudy)
    -batchmode_geompy.myStudyManager.Close(openedStudy)
    -#==================================================
    -#5. Open
    -#==================================================
    -try:
    -        openedStudy = batchmode_geompy.myStudyManager.Open(str+"/test_dir/test_new.hdf")
    -except Exception:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#find AttributeReal
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -#==================================================
    -#     find  box
    -#==================================================
    -box = openedStudy.FindObject("box")
    -if box is None :
    -        raise  RuntimeError, "box was not found! Wrong study is opened."
    -
    -edge=openedStudy.FindObject("face_edge")
    -if edge is None :
    -        raise  RuntimeError, "face_edge was not found! Wrong study is opened."
    -
    -
    -father = openedStudy.FindComponent("MESH")
    -if father is None:
    -         raise  RuntimeError, "MESH component is not found!  Wrong study is opened." 
    -
    -hp=openedStudy.FindObject("Meshbox")
    -if hp is None:
    -        raise  RuntimeError, "Meshbox object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Algorithms Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algorithms Definition object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("MEFISTO_2D")
    -if hp is None:
    -        raise  RuntimeError, "MEFISTO_2D object was not found! Wrong study is opened."
    -
    -hp = openedStudy.FindObject("Hypothesis Definition")
    -if hp is None:
    -        raise  RuntimeError, "Algoriths Definition was not found! Wrong study is opened."
    -
    -#==================================================
    -# Find Supervisor
    -#==================================================
    -father = openedStudy.FindComponent("SUPERV")
    -if father is None:
    -         raise  RuntimeError, "SUPERV component is not found!  Wrong study is opened." 
    -
    -SuperV = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision")
    -Builder = openedStudy.NewBuilder()
    -Builder.LoadWith(father, SuperV)
    -import SALOMEDS
    -
    -aChildIterator = openedStudy.NewChildIterator(father)
    -
    -#while aChildIterator.More():
    -anSObject = aChildIterator.Value()
    -
    -res, anAttr=anSObject.FindAttribute("AttributeIOR")
    -if res :
    -        anAttr=anAttr._narrow(SALOMEDS.AttributeIOR)
    -        ior = anAttr.Value()
    -        Graph=SuperV.getGraph(ior)
    -        ListOfNodes=Graph.Nodes()
    -        length_as= len(ListOfNodes)
    -        print "ListOfNodes length = ", length_as
    -        if length_as != length_bs:
    -                raise RuntimeErrror, "defferent length of nodes after study open"
    -#aChildIterator.Next()
    -
    -Names = []
    -for node in ListOfNodes:
    -        Names.append(node.Name())
    -names.sort()
    -Names.sort()
    -if names != Names :
    -        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
    -
    diff --git a/doc/salome/tui/KERNEL/exemple/Example2.html b/doc/salome/tui/KERNEL/exemple/Example2.html deleted file mode 100755 index 16361364f..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example2.html +++ /dev/null @@ -1,46 +0,0 @@ - - - -Example - -
    #%AttributeInteger interface(creation/saving/restoring)%
    -#%Methods : FindOrCreateAttribute , Value, SaveAs, SetValue, FindComponent, FindAttribute, Open%
    -
    -#      create  AttributeInteger      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger"
    -
    -#   save and restore the study
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -# ... save ...
    -batchmode_geompy.myStudyManager.SaveAs(str+"/test.hdf", batchmode_geompy.myStudy)
    -# ... open ...
    -openedStudy= batchmode_geompy.myStudyManager.Open(str+"/test.hdf");
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -#     find AttributeInteger
    -#================================
    -res,A=father.FindAttribute("AttributeInteger")
    -if res == 0  or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeInteger"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -if A.Value() != 1000000:
    -        raise  RuntimeError, "Error : wrong value of  AttributeInteger after study restoring"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example20.html b/doc/salome/tui/KERNEL/exemple/Example20.html deleted file mode 100755 index 3019ad80e..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example20.html +++ /dev/null @@ -1,160 +0,0 @@ - - - -Exemple - -
    -#^SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, NewCommand, GetProperties, Open, CommitCommand, NewBuilder^
    -#^Attribute methods : SetLocked, IsLocked, GetCreationMode, SetCreationDate, IsModified, GetUserName, Value, SetUserName, SetValue, GetCreationDate^
    -
    -batchmode_geompy.myBuilder._set_UndoLimit(20)
    -
    -#--------------------------------------------------------------------------
    -#       create AttributeReal      
    -#===============================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeReal attribute"
    -A = A._narrow(SALOMEDS.AttributeReal)
    -A.SetValue(0.0001)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    -
    -#      create AttributeStudyProperties
    -#================================================
    -A = batchmode_geompy.myStudy.GetProperties()
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeStudyProperties attribute"
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -
    -batchmode_geompy.myBuilder.NewCommand();
    -print "A.GetUserName()= ", A.GetUserName()
    -res,mm,hh,dd,mnth,yy=A.GetCreationDate()
    -print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy
    -print "A.GetCreationMode() = ", A.GetCreationMode()
    -print "A.IsModified() = ", A.IsModified()
    -print "A.IsLocked() = ", A.IsLocked()
    -if A.IsLocked() == 0 :
    -        A.SetUserName("tester"); print 'A.SetUserName("tester"), A.GetUserName() = ', A.GetUserName()
    -        A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), A.GetCreationDate() =', A.GetCreationDate()
    -        print "A.IsModified() = ", A.IsModified()
    -A.SetLocked(1)
    -
    -#check the transaction result 
    -batchmode_geompy.myBuilder.CommitCommand()
    -if A.GetUserName() != "tester":
    -        print 'Control after transaction close : A.GetUserName() = ', A.GetUserName()
    -        raise RuntimeError, "Field 'UserName' was not modified but had to!"
    -
    -# try to make some changes wrapped by transaction 
    -#================================================
    -batchmode_geompy.myBuilder.NewCommand()
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeInteger")
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeInteger)
    -A.SetValue(1000000)
    -
    -exception_was = None
    -try : batchmode_geompy.myBuilder.CommitCommand()
    -except Exception: exception_was = 1
    -
    -if exception_was is None:
    -        raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !"
    -
    -#      save / restore study      
    -
    -#================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -
    -#--------------------------------------------------------------------------#
    -#--------------------------- Open file ------------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy = batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#1.     find AttributeReal
    -#================================================
    -
    -res,A=father.FindAttribute("AttributeReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeReal"
    -
    -A = A._narrow(SALOMEDS.AttributeReal)
    -if A.Value() != 0.0001:
    -        raise  RuntimeError, "Error : wrong value of  AttributeReal"
    - 
    -
    -#2.     find AttributeStudyProperties
    -#=================================================
    -A=openedStudy.GetProperties()
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeStudyProperties"
    -
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -if A.IsLocked() == 0 :
    -        raise  RuntimeError, "Error : AttributeStudyProperties must have Locked flag but have no!"
    -
    -#get the builder
    -myBuilder = openedStudy.NewBuilder()
    -
    -#3. try to make some changes wrapped by transaction 
    -#==================================================
    -exception_was = None
    -try : 
    -        myBuilder.NewCommand()
    -        A = myBuilder.FindOrCreateAttribute(father, "AttributeInteger")
    -
    -        if A == None :
    -                raise  RuntimeError, "Can't create AttributeInteger attribute"
    -        A = A._narrow(SALOMEDS.AttributeInteger)
    -        A.SetValue(1000000)
    -        myBuilder.CommitCommand()
    -except Exception: exception_was = 1
    -
    -if exception_was is None:
    -        raise RuntimeError, "Study was locked for changes but CommitCommand did not generate an exception !"
    -
    -
    -myBuilder.NewCommand()
    -A=openedStudy.GetProperties()
    -A = A._narrow(SALOMEDS.AttributeStudyProperties)
    -A.SetLocked(0)
    -myBuilder.CommitCommand()
    -
    -#4.
    -myBuilder.NewCommand()
    -A.SetLocked(0);
    -print "A.GetUserName()= ", A.GetUserName()
    -print "A.GetCreationDate() = ", A.GetCreationDate()
    -print "A.GetCreationMode() = ", A.GetCreationMode()
    -print "A.IsModified() = ", A.IsModified()
    -myBuilder.CommitCommand()
    -
    -#5.
    -myBuilder.NewCommand()
    -A.SetUserName("tester1")
    -myBuilder.CommitCommand()
    -print "A.GetUserName()= ", A.GetUserName()
    -
    -#remove the document file
    -os.remove(file)
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example21.html b/doc/salome/tui/KERNEL/exemple/Example21.html deleted file mode 100755 index 981e9d7ff..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example21.html +++ /dev/null @@ -1,136 +0,0 @@ - - - -Exemple - -
    -#^SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open^
    -#^Attribute methods: GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue, GetColumn, GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles, SetColumn, GetRow, GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle^
    -
    -#       create AttributeReal      
    -#=======================================================================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTableOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeTableOfInteger)
    -a=[1,2]
    -
    -b=[3,4]
    -
    -#    2x2
    -# --- rows ---
    -A.AddRow(a)
    -A.AddRow(b)
    -a=[34,14]
    -A.SetRow(1,a)
    -
    -#    3x3
    -#
    -b=[54,56]
    -A.AddRow(b)
    -
    -# --- columns ---
    -a=[76,25,12]
    -
    -A.AddColumn(a)
    -a=[836,3425,342]
    -A.SetColumn(3,a)
    -
    -# change attribute values
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -print "A.PutValue(2,2,625323)"
    -A.PutValue(625323,2,2)
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -
    -#set Titles
    -
    -A.SetTitle("TEST")
    -
    -A.SetRowTitle(1,"FR")
    -A.SetRowTitle(2,"SR")
    -A.SetRowTitle(3,"TR")
    -
    -A.SetColumnTitle(1,"FC")
    -A.SetColumnTitle(2,"SC")
    -A.SetColumnTitle(3,"TC")
    -
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows()
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns()
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -# set titles
    -#titles=["11","12","13"]
    -#A.SetRowTitles(titles)
    -#titles=["21","22","23"]
    -#A.SetRowTitles(2,titles)
    -#titles=["31","32","33"]
    -#A.SetRowTitles(3,titles)
    -
    -#--------------------------------------------------------------------------#
    -# ----------------------- save the study ----------------------------------#
    -#--------------------------------------------------------------------------#
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -#--------------------------------------------------------------------------#
    -#---------------------------- Open file -----------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -# --- check attribute ---
    -
    -res,A=father.FindAttribute("AttributeTableOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTableOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeTableOfInteger)
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows()
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns()
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -titles=["ff","ss","tt"]
    -A.SetRowTitles(titles)
    -print "Rows titles : ",  A.GetRowTitles()
    -
    -titles=["ww","zz","cc"]
    -A.SetColumnTitles(titles)
    -print "Column titles : ",  A.GetColumnTitles()
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example22.html b/doc/salome/tui/KERNEL/exemple/Example22.html deleted file mode 100755 index f6a3f6e3b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example22.html +++ /dev/null @@ -1,137 +0,0 @@ - - - -Exemple - -
    -#^ SALOMEDS methods  : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open^
    -#^ Attribute methods : GetValue, GetNbColumns, AddColumn, SetRowTitles, PutValue,  GetColumn,  GetColumnTitles, GetTitle, SetRow, GetRowTitles, SetColumnTitles,  SetColumn,  GetRow,  GetNbRows, SetColumnTitle, AddRow, SetTitle, SetRowTitle^
    -
    -#       create AttributeReal      
    -#===============================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeTableOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeTableOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeTableOfReal)
    -a=[1,2]
    -
    -b=[3,4]
    -
    -#    2x2
    -# --- rows ---
    -A.AddRow(a)
    -A.AddRow(b)
    -a=[34,14]
    -A.SetRow(1,a)
    -
    -#    3x3
    -#
    -b=[54,56]
    -A.AddRow(b)
    -
    -# --- columns ---
    -a=[76,25,12]
    -
    -A.AddColumn(a)
    -a=[836,3425,342]
    -A.SetColumn(3,a)
    -
    -# change attribute values
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -print "A.PutValue(2,2,625323)"
    -A.PutValue(625323,2,2)
    -print "A.GetValue(2,2) = ", A.GetValue(2,2)
    -
    -#set Titles
    -
    -A.SetTitle("TEST")
    -
    -A.SetRowTitle(1,"FR")
    -A.SetRowTitle(2,"SR")
    -A.SetRowTitle(3,"TR")
    -
    -A.SetColumnTitle(1,"FC")
    -A.SetColumnTitle(2,"SC")
    -A.SetColumnTitle(3,"TC")
    -
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows() + 1
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns() + 1
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -# set titles
    -#titles=["11","12","13"]
    -#A.SetRowTitles(titles)
    -#titles=["21","22","23"]
    -#A.SetRowTitles(2,titles)
    -#titles=["31","32","33"]
    -#A.SetRowTitles(3,titles)
    -
    -#--------------------------------------------------------------------------#
    -#------------------------ save the study ----------------------------------#
    -#--------------------------------------------------------------------------#
    -import os
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -print " -------  We will save to", file, "-----------"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -
    -#--------------------------------------------------------------------------#
    -#---------------------------- Open file -----------------------------------# 
    -#--------------------------------------------------------------------------#
    -
    -print" -------------- Open  " + file + "-------------- " 
    -
    -openedStudy = batchmode_geompy.myStudyManager.Open(file)
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -# --- check attribute ---
    -
    -res,A=father.FindAttribute("AttributeTableOfReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeTableOfReal"
    -
    -A = A._narrow(SALOMEDS.AttributeTableOfReal)
    -
    -#check the table
    -print "Common title : ",A.GetTitle()
    -print "Rows titles : ",  A.GetRowTitles()
    -rnb = A.GetNbRows() + 1
    -for i in range(1, rnb):
    -        b=A.GetRow(i)
    -        print b
    -
    -cnb = A.GetNbColumns() + 1
    -print "Columns title : ", A.GetColumnTitles()
    -for i in range(1, cnb):
    -        b=A.GetColumn(i)
    -        print b
    -
    -titles=["ff","ss","tt"]
    -A.SetRowTitles(titles)
    -print "Rows titles : ",  A.GetRowTitles()
    -
    -titles=["ww","zz","cc"]
    -A.SetColumnTitles(titles)
    -print "Column titles : ",  A.GetColumnTitles()
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example23.html b/doc/salome/tui/KERNEL/exemple/Example23.html deleted file mode 100755 index 623170417..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example23.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -Exemple - -
    -import batchmode_salome
    -#import SALOMEDS
    -
    -aStudy = batchmode_salome.myStudy    
    -
    -#Add new component 'User data'
    -aBuilder = aStudy.NewBuilder()
    -aComponent = aBuilder.NewComponent("User data")
    -anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    -anAttrName = anAttr._narrow(SALOMEDS.AttributeName) 
    -anAttrName.SetValue("User data")
    -
    -
    -#Add a new case 'Case1' to the component 'User data'
    -aBuilder.AddDirectory("/User data/Case1")
    -
    -#Set a study context to '/User data/Case1'
    -aStudy.SetContext("/User data/Case1")
    -
    -#Print the current study context
    -print aStudy.GetContext()
    -
    -#Add a sub directory 'aSubCase' to 'Case1' (under the current context)
    -aBuilder.AddDirectory("aSubCase")
    -
    -
    -#Add a new case 'Case2' to component 'User data'
    -aBuilder.AddDirectory("/User data/Case2")
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example3.html b/doc/salome/tui/KERNEL/exemple/Example3.html deleted file mode 100755 index 477d80cda..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example3.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Example - -
    #%AttributeSequenceOfReal interface(creations/saving/restoring)%
    -#% AttributeSequenceOfReal  : ChangeValue, Add,  Value,  Remove,  Length%
    -#% SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -
    -#       create AttributeSequenceOfReal      
    -#=================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfReal")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfReal attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -if A == None :
    -        raise  RuntimeError, "_narrow returns None instead of AttributeSequenceOfReal pointer"
    -
    -A.Add(0.0293)
    -A.Add(625.1e+2)
    -A.Add(0.928e+100)
    -A.Add(83.287)
    -
    -print "initial values ",A.Value(1), A.Value(2), A.Value(3), A.Value(4)
    -A.Remove(3)
    -print "after remove ", A.Value(1), A.Value(2), A.Value(3)
    -A.ChangeValue(2,76.265)
    -print "after second item change", A.Value(1), A.Value(2), A.Value(3)
    -
    -if A.Length() != 3:
    -        print "Error : wrong length of SequenceOfReal"
    -if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287:
    -        print "Error : wrong value of  AttributeSequenceOfReal"
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfReal
    -#=================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfReal")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfReal"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -
    -if A.Length() != 3:
    -        print "Error : wrong length of SequenceOfReal"
    -if A.Value(1) != 0.0293 or A.Value(2) != 76.265 or A.Value(3) != 83.287:
    -        print "Error : wrong value of  AttributeSequenceOfReal"
    -print "after restoring ", A.Value(1), A.Value(2), A.Value(3)
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example4.html b/doc/salome/tui/KERNEL/exemple/Example4.html deleted file mode 100755 index 4539170b6..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example4.html +++ /dev/null @@ -1,66 +0,0 @@ - - - -Example - -
    #%AttributeSequenceOfInteger interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute FindComponent FindAttribute Open Add SaveAs%
    -#%AttributeSequenceOfInteger methods :  Value, Remove, Length%
    -
    -#       create AttributeSequenceOfInteger      
    -#==========================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSequenceOfInteger")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSequenceOfInteger attribute"
    -
    -A.Add(100)
    -A.Add(300)
    -A.Add(500)
    -A.Add(400)
    -A.Add(700)
    -
    -A.Remove(3)
    -A.ChangeValue(4,500)
    -
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeSequenceOfInteger
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeSequenceOfInteger")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSequenceOfInteger"
    -
    -A = A._narrow(SALOMEDS.AttributeSequenceOfInteger)
    -
    -if A.Length() != 4:
    -        print "Wrong length of SequenceOfInteger"
    -if A.Value(1) != 100 or A.Value(2) != 300 or A.Value(3) != 400 or A.Value(4) != 700:
    -        print "Wrong  value of  AttributeSequenceOfInteger"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example5.html b/doc/salome/tui/KERNEL/exemple/Example5.html deleted file mode 100755 index 79be2e442..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example5.html +++ /dev/null @@ -1,58 +0,0 @@ - - - -Example - -
    #%AttributeName interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute,  SaveAs, FindComponent FindAttribute Open%
    -#%Attribute methods : SetValue, Value%
    -
    -#              create AttributeName     
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeName")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -A.SetValue("AttributesTesting")
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"
    -
    -
    -#      save / restore study      
    -#=================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributeName
    -#======================================
    -
    -res,A=father.FindAttribute("AttributeName")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeName"
    -
    -A = A._narrow(SALOMEDS.AttributeName)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeName attribute"
    -
    -if A.Value() != "AttributesTesting":
    -        print "Wrong  value of AttributeName"
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example6.html b/doc/salome/tui/KERNEL/exemple/Example6.html deleted file mode 100755 index 197c6b3b1..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example6.html +++ /dev/null @@ -1,56 +0,0 @@ - - - -Example - -
    #%AttributeComment interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs FindComponent FindAttribute  Open%
    -#%Attribute methods : Value, SetValue%
    -
    -#              create     AttributeComment 
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeComment")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -A.SetValue("GEOM")
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#      find    AttributeComment
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeComment")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeComment"
    -
    -A = A._narrow(SALOMEDS.AttributeComment)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeComment attribute"
    -
    -if A.Value() != "GEOM":
    -        "Error: wrong value of AttributeComment"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example7.html b/doc/salome/tui/KERNEL/exemple/Example7.html deleted file mode 100755 index 9bf85152b..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example7.html +++ /dev/null @@ -1,55 +0,0 @@ - - - -Example - -
    #%AttributePersistentRef interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute,  SaveAs, FindComponent FindAttribute Open%
    -#%Attribute methods : SetValue, Value%
    -
    -#              create   AttributePersistentRef   
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributePersistentRef")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -A.SetValue("/tmp/test;1")
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find AttributePersistentRef
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributePersistentRef")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributePersistentRef"
    -
    -A = A._narrow(SALOMEDS.AttributePersistentRef)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributePersistentRef attribute"
    -
    -if A.Value() != "/tmp/test;1":
    -        "Error: wrong value of AttributePersistentRef"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example8.html b/doc/salome/tui/KERNEL/exemple/Example8.html deleted file mode 100755 index db962290a..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example8.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Example - -
    #%AttributeDrawable interface(creations/saving/restoring)%
    -#%SALOMEDS methods : FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods : SetDrawable, IsDrawable% 
    -#--------------------------------------------------------------------------
    -
    -from batchmode_geompy import *
    -import os
    -
    -#--------------------------------------------------------------------------
    -#              create    AttributeDrawable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeDrawable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -A.SetDrawable(1)
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy=batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeDrawable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeDrawable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeDrawable"
    -
    -A = A._narrow(SALOMEDS.AttributeDrawable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeDrawable attribute"
    -
    -if A.IsDrawable() == 0:
    -        "Error: wrong value of AttributeDrawable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/exemple/Example9.html b/doc/salome/tui/KERNEL/exemple/Example9.html deleted file mode 100755 index 6809dab3c..000000000 --- a/doc/salome/tui/KERNEL/exemple/Example9.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Example - -
    #%AttributeSelectable interface(creations/saving/restoring)%
    -#%SALOMEDS methods: FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open%
    -#%Attribute methods: SetSelectable, IsSelectable%
    -
    -#              create    AttributeSelectable  
    -#===========================================================
    -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSelectable")
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -A.SetSelectable(1)
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -
    -
    -#      save / restore study      
    -#============================================================
    -str= os.getenv("TmpDir")
    -if str == None:
    -        str = "/tmp"
    -file = str+"/test.hdf"
    -
    -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)
    -openedStudy = batchmode_geompy.myStudyManager.Open(file);
    -
    -if openedStudy == None:
    -        raise  RuntimeError, "Can't open saved study!"
    -
    -father = openedStudy.FindComponent("GEOM")
    -if father is None:
    -         raise  RuntimeError, "Geom component is not found!  Wrong study is opened." 
    -
    -
    -#     find   AttributeSelectable
    -#============================================================
    -
    -res,A=father.FindAttribute("AttributeSelectable")
    -if res == 0 or A == None:
    -        raise  RuntimeError, "Error:  not found AttributeSelectable"
    -
    -A = A._narrow(SALOMEDS.AttributeSelectable)
    -
    -if A == None :
    -        raise  RuntimeError, "Can't create AttributeSelectable attribute"
    -
    -if A.IsSelectable() == 0:
    -        "Error: wrong value of AttributeSelectable"
    -
    -
    \ No newline at end of file diff --git a/doc/salome/tui/KERNEL/sources/Application-About1.jpg b/doc/salome/tui/KERNEL/sources/Application-About1.jpg deleted file mode 100755 index cf7ab8ba0..000000000 Binary files a/doc/salome/tui/KERNEL/sources/Application-About1.jpg and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/application.gif b/doc/salome/tui/KERNEL/sources/application.gif deleted file mode 100644 index 0b05d5c18..000000000 Binary files a/doc/salome/tui/KERNEL/sources/application.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/application.jpg b/doc/salome/tui/KERNEL/sources/application.jpg deleted file mode 100755 index a6979ab99..000000000 Binary files a/doc/salome/tui/KERNEL/sources/application.jpg and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/doxygen.css b/doc/salome/tui/KERNEL/sources/doxygen.css deleted file mode 100755 index 88e613d23..000000000 --- a/doc/salome/tui/KERNEL/sources/doxygen.css +++ /dev/null @@ -1,170 +0,0 @@ -H1 { - text-align: center; -} - -CAPTION { - font-weight: bold -} - -/* Link in the top navbar */ -A.qindex {} - -A.qindexRef {} - -/* Link to any cross-referenced Doxygen element */ -A.el { - text-decoration: none; - font-weight: bold -} - -A.elRef { - font-weight: bold -} - -/* Link to any cross-referenced Doxygen element inside a code section - (ex: header) -*/ -A.code { - text-decoration: none; - font-weight: normal; - color: #4444ee -} - -A.codeRef { - font-weight: normal; - color: #4444ee -} - -A:hover { - text-decoration: none; - background-color: lightblue -} - -DL.el { - margin-left: -1cm -} - -/* A code fragment (ex: header) */ -DIV.fragment { - width: 100%; - border: none; - background-color: #CCCCCC -} - -/* In the alpha list (coumpound index), style of an alphabetical index letter */ -DIV.ah { - background-color: #CCCCCC; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -/* Method name (+ type) */ -TD.md { - background-color: lightblue; - font-weight: bold; -} - -/* Method parameter (some of them) */ -TD.mdname1 { - background-color: lightblue; - font-weight: bold; color: #602020; -} - -/* Method parameter (some of them) */ -TD.mdname { - background-color: lightblue; - font-weight: bold; - color: #602020; - width: 600px; -} - -/* Separator between methods group (usually empty, seems not supported by IE) */ -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold -} - -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: smaller -} - -BODY { - background: #FFFFFF; -} - -/*div.div-page { - background-color: #FFFFFF; - margin-left: 1em; - margin-right: 1em; - margin-top: 1em; - margin-bottom: 0.1em; - - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - - border: 2px solid #0D299A; - border-width: 2px; - border-color: #0D299A; -}*/ - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -DIV.div-footer { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 0.2em; - text-align: right; - font-size: 9pt; -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/salome/tui/KERNEL/sources/footer.html b/doc/salome/tui/KERNEL/sources/footer.html deleted file mode 100755 index 56d52a61a..000000000 --- a/doc/salome/tui/KERNEL/sources/footer.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - -
    -
    Copyright © 2003-2007 CEA, EDF
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/html_comments.gif b/doc/salome/tui/KERNEL/sources/html_comments.gif deleted file mode 100755 index f0c0f0b47..000000000 Binary files a/doc/salome/tui/KERNEL/sources/html_comments.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/kernel_about_4.png b/doc/salome/tui/KERNEL/sources/kernel_about_4.png deleted file mode 100644 index 5c9c09a79..000000000 Binary files a/doc/salome/tui/KERNEL/sources/kernel_about_4.png and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/logocorp.gif b/doc/salome/tui/KERNEL/sources/logocorp.gif deleted file mode 100755 index 7697e0837..000000000 Binary files a/doc/salome/tui/KERNEL/sources/logocorp.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/myheader.html b/doc/salome/tui/KERNEL/sources/myheader.html deleted file mode 100755 index bddc997ec..000000000 --- a/doc/salome/tui/KERNEL/sources/myheader.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - $title - - - -
    -
    -SALOME documentation central -
    -
    diff --git a/doc/salome/tui/KERNEL/sources/occ.gif b/doc/salome/tui/KERNEL/sources/occ.gif deleted file mode 100755 index ce017c8ae..000000000 Binary files a/doc/salome/tui/KERNEL/sources/occ.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/static/Link.gif b/doc/salome/tui/KERNEL/sources/static/Link.gif deleted file mode 100755 index 75330d0c8..000000000 Binary files a/doc/salome/tui/KERNEL/sources/static/Link.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/static/SObject.gif b/doc/salome/tui/KERNEL/sources/static/SObject.gif deleted file mode 100755 index 1d4e9cb24..000000000 Binary files a/doc/salome/tui/KERNEL/sources/static/SObject.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/static/Study_Struct.gif b/doc/salome/tui/KERNEL/sources/static/Study_Struct.gif deleted file mode 100755 index bc0ce35be..000000000 Binary files a/doc/salome/tui/KERNEL/sources/static/Study_Struct.gif and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/static/doxygen.css b/doc/salome/tui/KERNEL/sources/static/doxygen.css deleted file mode 100755 index 88e613d23..000000000 --- a/doc/salome/tui/KERNEL/sources/static/doxygen.css +++ /dev/null @@ -1,170 +0,0 @@ -H1 { - text-align: center; -} - -CAPTION { - font-weight: bold -} - -/* Link in the top navbar */ -A.qindex {} - -A.qindexRef {} - -/* Link to any cross-referenced Doxygen element */ -A.el { - text-decoration: none; - font-weight: bold -} - -A.elRef { - font-weight: bold -} - -/* Link to any cross-referenced Doxygen element inside a code section - (ex: header) -*/ -A.code { - text-decoration: none; - font-weight: normal; - color: #4444ee -} - -A.codeRef { - font-weight: normal; - color: #4444ee -} - -A:hover { - text-decoration: none; - background-color: lightblue -} - -DL.el { - margin-left: -1cm -} - -/* A code fragment (ex: header) */ -DIV.fragment { - width: 100%; - border: none; - background-color: #CCCCCC -} - -/* In the alpha list (coumpound index), style of an alphabetical index letter */ -DIV.ah { - background-color: #CCCCCC; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -/* Method name (+ type) */ -TD.md { - background-color: lightblue; - font-weight: bold; -} - -/* Method parameter (some of them) */ -TD.mdname1 { - background-color: lightblue; - font-weight: bold; color: #602020; -} - -/* Method parameter (some of them) */ -TD.mdname { - background-color: lightblue; - font-weight: bold; - color: #602020; - width: 600px; -} - -/* Separator between methods group (usually empty, seems not supported by IE) */ -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold -} - -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: smaller -} - -BODY { - background: #FFFFFF; -} - -/*div.div-page { - background-color: #FFFFFF; - margin-left: 1em; - margin-right: 1em; - margin-top: 1em; - margin-bottom: 0.1em; - - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - - border: 2px solid #0D299A; - border-width: 2px; - border-color: #0D299A; -}*/ - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -DIV.div-footer { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 0.2em; - text-align: right; - font-size: 9pt; -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html b/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html deleted file mode 100755 index beb74ae4f..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - Package SALOME_ModuleCatalog
    -
    -      interface SALOME_ModuleCatalog::ModuleCatalog
    -
    -Package SALOME
    -
    -   
    interface SALOME::Session
    -
    -Package Engines
    -   

    -    interface Engines::Container
    -

    -   
    -   

    -
    -
        SALOME_ModuleCatalog::ModuleCatalog interface -
    -
    -
    -

    -
    -

    -Acomponent -GetComponent (in string componentname)
    -
    -See the example below
    -
    -
    -
    -
    SALOME::Session interface

    -

    -
    -GetInterface (), StopSession () raises (GUIActive, RunningStudies)
    -
    -Stop session and restart GUI application:
    -
    -mySession.StopSession()
    -
    -mySession.GetInterface()
    -
    -
    -
    Engines::Container -interface
    -
    -
    -
    Component -load_impl (in string nameToRegister, in string componentName)
    -
    -Load component with defined component name:
    -
    -compinfo = module_catalog.GetComponent(componentName)
    -
    - try:
    -    machineName = theComputer # name of machine
    -    path = compoinfo.GetPathPrefix(machineName) + "/"
    - except SALOME_ModuleCatalog.NotFound, ex:
    -    MESSAGE( "machine " + machineName + " not found in Module -Catalog" )
    -    MESSAGE( "trying localhost" )
    -    try:
    -    path = compoinfo.GetPathPrefix("localhost") + "/"
    -    except SALOME_ModuleCatalog.NotFound, ex:
    -    path = ""
    -
    -implementation = path + "lib" + componentName + "Engine.so"
    -MESSAGE( "Trying to load " + implementation )
    -
    - try:
    -
        component = container.load_impl(componentName, -implementation) # Loads into the container a new component, registers -it and starts it's CORBA servant.
    -
    -    MESSAGE( "component " + component._get_instanceName() -+ " launched !" )
    -    return component
    -except:
    -    MESSAGE( "component " + componentName + " NOT launched -!" )
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html b/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html deleted file mode 100755 index 080112eb4..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Life_cycle.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - //There is a CXX example of LifeCycleCORBA using
    -

    -#include CORBA_CLIENT_HEADER(TestComponent)
    -#include "SALOME_NamingService.hxx"
    -#include "SALOME_LifeCycleCORBA.hxx"
    -
    -int main (int argc, char * argv[]){
    -  try {
    -      // Initializing omniORB
    -
          CORBA::ORB_var orb = CORBA::ORB_init(argc, -argv);
    -   
    -      // Obtain a reference -to the root POA
    -
          CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") -;
    -      PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) -;
    -   
    -      SALOME_NamingService _NS(orb) ;
    -
    -      SALOME_LifeCycleCORBA _LCC(&_NS) ;
    -
    -      Engines::Component_var myComponent = _LCC.FindOrLoad_Component("FactoryServerPy","TestComponentPy");
    -       if(!CORBA::is_nil(myComponent)){
    -          Engines::TestComponent_var -myConcreateComponent = TestComponent::_narrow(myComponent);
    -          //do something -what you like with the interface
    -          ...
    -
              return 0;
    -       }
    -    }
    -  catch(CORBA::COMM_FAILURE& ex){
    -      cout<<"Caught system exception COMM_FAILURE --- unable to contact the object.\n";
    -  }catch(CORBA::SystemException&){
    -      cout<<"Caught a CORBA::SystemException.\n";
    -  }catch(CORBA::Exception&){
    -      cout<<"Caught CORBA::Exception.\n";
    -  }catch(...){
    -      cout<<"Caught unknown exception.\n";
    -  }
    -  return 1;
    -}
    -
    -#The example may be rewritten on Python like this:
    -

    -from omniORB import CORBA
    -from SALOME_TestComponent import *
    -from SALOME_NamingServicePy import *
    -from LifeCycleCORBA import *
    -
    -try:
    -    orb = CORBA.ORB_init(sys.argv,CORBA.ORB_ID)
    -    _NS = SALOME_NamingService(orb)
    -    _LCC = SALOME_LifeCycleCORBA(orb)
    -
    -     myComponent = _LCC.FindOrLoadComponent("FactoryServerPy","TestComponentPy");
    -     myConcreatComponent = myComponent._narrow(TestComponent)
    -    if myConcreatComponent is not None :
    -        //do something what you like with the -interface
    -         ...
    -
            return 0
    -    }
    -except CosNaming.NamingContext.NotFound, e :
    -    print "Caught exception: Naming Service can't found Logger"
    -except CORBA.COMM_FAILURE, e:
    -    print "Caught CORBA::SystemException CommFailure"
    -except CORBA.SystemException, e:
    -    print "Caught CORBA::SystemException."
    -except CORBA.Exception, e:
    -    print "Caught CORBA::Exception."
    -except Exception, e:
    -    print "Caught unknown exception."
    -  
    -
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Naming.html b/doc/salome/tui/KERNEL/sources/static/examples_Naming.html deleted file mode 100755 index ac08a6753..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Naming.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    - #There is a python example of using SALOME_NamingService
    -

    -from omniORB import CORBA
    -from time import sleep
    -from LifeCycleCORBA import *
    -from SALOME_NamingServicePy import *
    -
    -# initialise the ORB
    -
    orb = CORBA.ORB_init([''], CORBA.ORB_ID)
    -
    -# create an LifeCycleCORBA instance
    -
    myLifeCycleCORBA = LifeCycleCORBA(orb)
    -
    -#create a naming service instance
    -
    naming_service = SALOME_NamingServicePy_i(orb)
    -
    -mySession = myNamingService.Resolve("/Kernel/Session")
    -mySession.GetInterface()
    -sleep(10)
    -myLocalVisu = myLifeCycleCORBA.FindOrLoadComponent("FactoryServer", "Visu")
    -
    -
    -//There is some part of a code written by C++
    -

    -SALOME_NamingService aNamingService(orb);
    -CORBA::Object_ptr anObject = aNamingService.Resolve("/Kernel/Session");
    -SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
    -Engines::Component_var aComponent = aSession->GetVisuGen();
    -myVisuGen = VISU::VISU_Gen::_narrow(aComponent);
    -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Study.html b/doc/salome/tui/KERNEL/sources/static/examples_Study.html deleted file mode 100755 index 859f6297f..000000000 --- a/doc/salome/tui/KERNEL/sources/static/examples_Study.html +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - - Main Page - - - - -   -
    - - - - - - - - -
    - - -
    -
    - -

    Examples

    -
    -
    - -
          Interfaces:
    -
    -       SALOMEDS::Study
    -       SALOMEDS::StudyBuilder
    -       SALOMEDS::StudyManager
    -       SALOMEDS::SObject
    -      SALOMEDS::SComponent
    -       SALOMEDS::SComponentIterator
    -       SALOMEDS::ChildIterator
    -
          SALOMEDS::AttributeComment
    -      
    -
    -
    -
    -
    - -
          SALOMEDS::Study interface
    -
    - -

    -
    -
    -
    -
    SComponent FindComponent( -in string aComponentName )
    -
    - Find GEOMETRY component in the opened study by its name:

    -
    -     str= os.getenv("TmpDir")
    -     if str == None:
    -         str = "/tmp"
    -     file = str+"/test.hdf"
    -
    -     openedStudy=batchmode_geompy.myStudyManager.Open(file)
    -
    -     father = openedStudy.FindComponent("GEOM")
    -     if father is None:
    -          raise  RuntimeError, "Geom - component is not found!  Wrong study is opened."
    -
    -
    -
    - -
    SObject FindObject ( in string -anObjectName )
    -
    - Find the SObject of the box by its NameAttribute "box":
    -
    - -

    -
    - -
    box = openedStudy.FindObject("box")
    - if box is None :
    -     raise  RuntimeError, "box was not found! Wrong -study is opened."
    -
    -
    - SObject FindObjectID - ( in ID aObjectID -)
    - #result: "/User data/Case1".
    -
    Find - the SObject of the box by its ID "0:1:1:2":
    -
    -
    - -
    box =openedStudy.FindObjectID("0:1:1:2")
    -
    - -
    if box is None :
    -     raise  RuntimeError, "box was not found! Wrong -ID is used."
    -
    -
    - SObject FindObjectIOR - ( in ID  aObjectIOR -)
    -
    - Find the SObject of the result on imported MED file -by it's IOR:
    -
    - theResult = myVisu.ImportFile(medFile)
    - aSObj = myStudy.FindObjectIOR(theResult.GetID())
    -
    -
    - SObject - FindObjectByPath ( in string thePath )
    -
    - Find SObject by path to it:
    -
    - # create new auxiliary componen
    t
    - aComponent = myStudyBuilder.NewComponent("Virtual Component")
    -
    - # create auxiliary subtree
    - aPath = "/Virtual Component/Case1"
    - myStudyBuilder.AddDirectory(aPath)
    -
    - aSObj = myStudy.FindObjectByPath(aPath)
    -
    -
    - void SetContext ( in string thePath) / - string GetContext ()
    -
    - Set context of the study to the created case and get it for printing:
    -
    - aComponent = myStudyBuilder.NewComponent("User data")
    - anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    - anAttrName = anAttr._narrow(SALOMEDS.AttributeName)
    - anAttrName.SetValue("User data")
    -
    - #Add a new case 'Case1' to the component 'User data'
    - aBuilder.AddDirectory("/User data/Case1")
    -
    - #Set a study context to '/User data/Case1'
    - aStudy.SetContext("/User data/Case1")
    -
    - #Print the current study context
    - print aStudy.GetContext()
    -
    -
    #result: "/User data/Case1".

    -
    -
    - ChildIterator - NewChildIterator ( in SObject aSO )
    -
    - Import med file and print all mesh names that this file includes -(mesh is a child of the result of imported file):
    -
    - # define file name
    - aFileName = datadir + "fra.med"
    -
    - # import file in visu module and get result
    - theVisu = batchmode_visu.myVisu
    - aResult = theVisu.ImportFile(aFileName)
    - if aResult is None : raise RuntimeError, "Error"
    - else : print "OK"
    -  
    - # get current study and its' SObject        -
    - myLocalStudy = theVisu.GetCurrentStudy()
    - aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())
    - if aSObj is None : raise RuntimeError, "Error"
    - else : print "OK"
    -
    - # create iterator by SObject of the current study
    - aMeshIter = myLocalStudy.NewChildIterator(aSObj);
    -
    - # iterating in the current study (with the help of created iterator) -to find all mesh names  
    - while aMeshIter.More() :
    -         aMeshSObj = aMeshIter.Value()
    -         aMeshIter.Next()
    -         anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         if anAttr is None :
    -             aMeshSObj - = aMeshIter.Value()
    -             aMeshIter.Next()
    -             anAttr - = aMeshSObj.FindAttribute("AttributeName")[1]
    -         anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    -         aMeshName = anAttr.Value()
    -         print "  ", aMeshName
    -
    -
    - SComponentIterator -NewComponentIterator ()
    -
    - Find the number an names of all components in the study:
    -
    - aCompItr = myStudy.NewComponentIterator()
    -
    - compNb = 0
    - while aCompItr.More():
    -     aComp = aCompItr.Value()
    -     aName = aComp.ComponentDataType()
    -     print "Component name = ", aName
    -     compNb += 1
    -     aCompItr.Next()
    -
    -
    - StudyBuilder -NewBuilder ()
    -
    -
    -
    - Create a new StudyBuilder (uses to add or modify an object in the -study ):
    -
    - myBuilder = myStudy.NewBuilder()
    -
    -
    - AttributeStudyProperties -GetProperties ()
    -
    - Get the attribute, which contains the properties of the study, and -change properties of the study by changing it:
    -
    - aProperties = myStudy.GetProperties()
    - if aProperties == None :
    -     raise  RuntimeError, "Can't create AttributeStudyProperties -attribute"
    - aProperties = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - A = aProperties
    -
    - # print stydy properties
    - print "A.GetUserName()= ", A.GetUserName()
    - res,mm,hh,dd,mnth,yy=A.GetCreationDate()
    - print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy
    - print "A.GetCreationMode() = ", A.GetCreationMode()
    - print "A.IsModified() = ", A.IsModified()
    - print "A.IsLocked() = ", A.IsLocked()
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    - boolean IsModified ()
    -
    - Find if study is modified:
    -
    - IsModified = myStudy.IsModified()
    -
    - if IsModified == 1:
    -     print "The study is modified and not saved"
    -
    -
    - boolean IsEmpty ()
    -
    - Find if study is empty:
    -
    - IsEmpty = myStudy.IsEmpty()
    -
    - if IsEmpty == 1:
    -     print "The study is empty"
    -
    -
    -
    -
    - -
    SALOMEDS::StudyBuilder -interface
    -
    -
    -
    -
    - SComponent -NewComponent ( in string ComponentDataType )
    -
    - Create Geometry SComponent:
    -
    - myBuilder = myStudy.NewBuilder()
    - father = myBuilder.NewComponent("GEOM")
    -
    -
    - void DefineComponentInstance ( in SComponent aComponent, -in Object ComponentIOR )

    -
    - Define the instance to the created geometry component:
    -
    - # find geom component
    - myLCC = batchmode_salome.lcc
    - geom = myLCC.FindOrLoadComponent("FactoryServer", "Geometry")
    - geom = geom._narrow(GEOM.GEOM_Gen)
    - geom.GetCurrentStudy(myStudyId)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - father = myBuilder.NewComponent("GEOM")
    - myBuilder.DefineComponentInstance(father,geom)
    -
    -
    - SObject -NewObject ( in SObject theFatherObject -)
    -
    - Create box and add it to study:
    -
    - from batchmode_geompy import *
    -
    - # create a box
    - box = geom.MakeBox(0,0,0,100,100,150)
    -
    - ior = orb.object_to_string(box)
    - box._set_Name(ior)     
    -
    - # create Geometry SComponent
    - father = myBuilder.NewComponent("GEOM")
    - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
    - FName = A1._narrow(SALOMEDS.AttributeName)
    - FName.SetValue("Geometry")
    - myBuilder.DefineComponentInstance(father,geom)
    -
    - # add box to Study
    - myBuilder.NewCommand()
    - newObj = myBuilder.NewObject(father)
    - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
    - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
    - ObjIOR.SetValue(ior)
    - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
    - ObjName = A2._narrow(SALOMEDS.AttributeName)
    - ObjName.SetValue("Common_operation")
    - id = newObj.GetID()
    - box._set_StudyShapeId(id)
    - myBuilder.CommitCommand()
    -
    -
    - void RemoveObject ( in SObject anObject )
    -
    - # Remove CutPlanes SObject from the StudyBuilder (delete cutplanes):
    -
    - SObj=myStudy.FindObjectIOR(cutplanes.GetID())
    - myBuilder = newStudy.NewBuilder()
    - myBuilder.RemoveObject(SObj)
    -
    -
    - void LoadWith ( in SComponent sco, in -Driver Engine -) raises (SALOME::SALOME_Exception)

    -
    - # Load Visu component:
    -
    - myBuilder = openedStudy.NewBuilder()
    - SCom=openedStudy.FindComponent("VISU")
    - myBuilder.LoadWith(SCom ,myVisu)
    -
    -
    - GenericAttribute -FindOrCreateAttribute ( in SObject anObject,  -in string aTypeOfAttribute)
    -
    - Create AttributeName attribute for created component an set value -to it:
    -
    - myBuilder = myStudy.NewBuilder()
    - aComponent = myBuilder.NewComponent("User data")
    -
    - anAttr = myBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
    -
    - anAttrName = anAttr._narrow(SALOMEDS.AttributeName)
    - anAttrName.SetValue("User data")
    -
    -
    - boolean FindAttribute ( in SObject anObject, out GenericAttribute -anAttribute, in string aTypeOfAttribute )
    -
    -
    Find AttributeName attribute of the field and print the -field name:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - myStudyBuilder.FindAttribute( aFieldSObj, anAttr, "AttributeName")
    - if res == 0:
    -     raise  RuntimeError, "Error:  Attribute not -found"
    -
    - anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    - aFieldName = anAttr.Value()
    - print "      ", aFieldName
    -
    -
    - void RemoveAttribute ( in SObject anObject, in -string aTypeOfAttribute )
    -
    -
    Remove AttributeSelectable attribute of the field SObject:
    -
    -
    aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - myStudyBuilder.RemoveAttribute( aFieldSObj, "AttributeSelectable")
    -
    -
    -
    void Addreference ( in  SObject -anObject, in  SObject theReferencedObject -)

    -
    - Create a reference between created SObject and the existing field:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    - aNewSObj = myBuilder.NewObject(myVisu)
    -
    - myBuilder.Addreference(aFieldSObj, aNewSObj)
    -
    -
    -
    void -NewCommand ()
    -
    -
    Create new command wich containes actions for changing the -properties of the study:
    -
    -
    A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.CommitCommand() # commits all actions declared -within the created command
    -
    -
    - void CommitCommand()
    -

    -
    See the end of the previous example
    -
    -
    - void AbortCommand ()

    -
    - Create new command wich containes actions for changing -the properties of the study, cancel all declared actions:
    -
    - A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.AbortCommand() # abort all actions declared -within the created command
    -
    -
    - void Undo () raises (LockProtection) -,
    - void Redo () raises (LockProtection)
    -
    - Create new command wich containes actions for changing -the properties of the study,
    - cancel all declared actions and then redo it with the help of undo/redo -mechanism:

    -
    - A = myStudy.GetProperties()
    - A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)
    -
    - myBuilder = myStudy.NewBuilder()
    -
    - myBuilder.NewCommand() # creates a new command
    -
    - # change the properties of the study
    - if A.IsLocked() == 0 :
    -     A.SetUserName("tester"); print 'A.SetUserName("tester"), -A.GetUserName() = ', A.GetUserName()
    -     A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), -A.GetCreationDate() =', A.GetCreationDate()
    -     print "A.IsModified() = ", A.IsModified()
    - A.SetLocked(1)
    -
    -
    myBuilder.CommitCommand() # commits all actions declared -within the created command
    -
    -
    myBuilder.Undo() # cancels all actions of the command
    -
    -
    myBuilder.Redo() # redoes all actions of the command
    -
    -
    -
    -
    -
    SALOMEDS::StudyManager -interface
    -
    -
    -
    -
    -
    Study -NewStudy ( in string study_name )
    -
    - Create the study with the name "Test_Study":

    -
    - myNewStudy = myStudyManager.NewStudy("Test_Study")
    -
    -
    - Study Open -( in URL -aStudyUrl ) raises (SALOME::SALOME_Exception)
    -
    - Open the study saved in the HDF file:
    -
    - file = 'saved_study.hdf'
    -
    - openedStudy=myStudyManager.Open(file)
    -
    - if openedStudy == None:
    -     raise  RuntimeError, "Can't open saved study!"
    -
    -
    - void Save (in Study aStudy, in boolean -theMultifile )
    -
    -
    Open study, import med file into it and save with the old -path and filename:
    -
    -
    file = "saved_study.hdf"
    - myMedFile ="medfile.med"
    -
    - openedStudy=myStudyManager.Open(file)
    -
    - myVisu.SetCurrentStudy(openedStudy)
    - myResult = myVisu.ImportFile(myMedFile)
    -
    - myStudyManager.Save(openedStudy, 0)
    -
    -
    - void SaveAs ( in URL -aUrl, in  Study aStudy, - 
    in boolean theMultifile -)
    -
    - Open study from the file and resave it in several files (using -Multifile option while saving)
    -
    -
    file = "saved_study.hdf"
    - newfile = "resaved_study.hdf"
    -
    - openedStudy=myStudyManager.Open(file)
    - myStudyManager.SaveAs(newfile, openedStudy, 1)
    -
    -
    - void Close ( in  Study aStudy )

    -
    - Close just opened study:
    -
    - file = "saved_study.hdf"
    -
    - openedStudy=myStudyManager.Open(file)
    - myStudyManager.Close(openedStudy)
    -
    -
    -
    - -
    SALOMEDS::SObject interface
    -
    -
    -
    -
    - ID GetID ()
    -
    - Create new SObject and get its ID:
    -
    - mySObj = myBuilder.NewObject(myFather)
    -
    - myID =  mySObj.GetID()
    -
    -
    - SComponent -GetFatherComponent ()
    -
    - Get father component of the SObject:
    -
    - myFather = mySObj.GetFatherComponent();
    -
    -
    - boolean FindAttribute ( out GenericAttribute anAttribute, -in string aTypeOfAttribute )
    -
    - Find the AttributeName attribute of the field:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    -
    - res = aFieldSObj.FindAttribute( anAttr, "AttributeName")
    - if res == 0:
    -     raise  RuntimeError, "Error:  Attribute not -found"
    -
    -
    - ListOfAttributes -GetAllAttributes ()
    -
    - Get list of all attributes of the SObject, find the number of attributes:
    -
    - attrs = mySObj.GetAllAttributes()
    - aLen = len(attrs) # number of attributes
    -
    -
    -
    -
    - -
    SALOMEDS::SComponent interface
    -
    -
    -
    -
    - string ComponentDataType ()
    -
    - Print names of all components wich -the study contains:
    -
    - aCompItr = myStudy.NewComponentIterator()
    -
    - while aCompItr.More():
    -     aComp = aCompItr.Value()
    -     aName = aComp.ComponentDataType()
    -     print "Component name = ", aName
    -     aCompItr.Next()
    -
    -
    - Other methods are inherited.
    -
    -
    -
    -
    - -
    SALOMEDS::SComponentIterator - interface
    -
    -
    -
    -
    - boolean More (), void Next (), SComponent Value -()
    -
    - See another -example
    -
    -   
    -
    - -
    SALOMEDS::ChildIterator - interface
    -
    -
    -
    -
    - boolean More () , void Next (), SObject Value ()
    -
    - Print all mesh names of imported MED file with the help of ChildIterator:
    -
    - aResult = myVisu.ImportFile("MedFile.med")
    -        
    - myStudy = theVisu.GetCurrentStudy()
    - aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())
    -
    - aMeshIter = myLocalStudy.NewChildIterator(aSObj);  # creating new -child iterator
    -
    - while aMeshIter.More() :               -                      -           # check if one more -child level exists.
    -         aMeshSObj = aMeshIter.Value() -                  -         # returns the SObject corresponding -to the current object found by the iterator.  
    -         aMeshIter.Next()     -                      -                      -   # passes the iterator to the next level.
    -         anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         if anAttr is None :
    -                 -aMeshSObj = aMeshIter.Value()
    -               -  aMeshIter.Next()
    -                 -anAttr = aMeshSObj.FindAttribute("AttributeName")[1]
    -         anAttr = anAttr._narrow(SALOMEDS.AttributeName);
    -         aMeshName = anAttr.Value()
    -         print "  ", aMeshName
    -
    -
    -
    - -
    SALOMEDS::AttributeComment - interface
    -
    -
    -
    - string Value (),  void SetValue ( in string value )
    -
    - Find the AttributeComment attribute of the "Head" field in the study, -print it, then change it to "My Comment" string:
    -
    - aFieldSObj  = myStudy.FindObject("Head, -")
    - anAttr = aFieldSObj.FindAttribute("AttributeComment")[1]
    -                     -anAttr = anAttr._narrow(SALOMEDS.AttributeComment);
    -                     -aFieldComment = anAttr.Value()
    -
    - print "AttributeComment", anAttr
    -
    - anAttr.SetValue ("My Comment")
    - -
    
    - 
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/mapping.html b/doc/salome/tui/KERNEL/sources/static/mapping.html deleted file mode 100755 index f3f0a3f53..000000000 --- a/doc/salome/tui/KERNEL/sources/static/mapping.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - -
    -
    -
    - -

    -Mapping of IDL definitions to Python language.

    - -

    -Introduction

    -SALOME is a distributed client/server application using the Common -Object Request Broker Architecture (CORBA). CORBA architecture uses the -Interface Definition Language (IDL), which specifies interfaces between -CORBA objects. So with help of IDL CORBA's language independence is ensured -. Because interfaces described in IDL can be mapped to the most of currently -used programming languages, CORBA applications and components are thus -independent of the language(s) used to implement them. In other words, -a client written in C++ can communicate with a server written in Java, -which in turn can communicate with another server written in COBOL, and -so forth. -

    One important thing to remember about IDL is that it is not an implementation -language. That is, applications can't be written in IDL. The sole purpose -of IDL is to define interfaces; providing implementations for these interfaces -is performed using some other language. -

    This page contains an abridged reference manual for mapping of IDL definitions -to Python language. It will be useful for Python programmers who are not -familiar with IDL language. All examples are taken from SALOME source -files. The complete version of Python Language Mapping Specification can -be found here. -
      -

    CONTENTS: -

    -
    - -

    -Using Scoped Names

    -Python implements a module concept that is similar to the IDL scoping mechanisms, -except that it does not allow for nested modules. In addition, Python requires -each object to be implemented in a module; globally visible objects are -not supported. -

    Because of these constraints, scoped names are translated into Python -using the following rules: -

    • An IDL module mapped into a Python module. Modules containing modules -are mapped to packages (i.e., directories with an __init__ module -containing all definitions excluding the nested modules). An implementation -can chose to map toplevel definitions (including the module CORBA) to modules -in an implementationdefined package, to allow concurrent installations -of different CORBA runtime libraries. In that case, the implementation -must provide additional modules so that toplevel modules can be used without -importing them from a package. -

    • For all other scopes, a Python class is introduced that contains all -the definitions inside this scope. -

    • Other global definitions (except modules) appear in a module whose -name is implementation dependent. Implementations are encouraged to use -the name of the IDL file when defining the name of that module. -

    For instance, -

    -
    module SALOMEDS {
    - interface StudyManager {
    -  void  Close(in Study aStudy);
    - };
    -};
    -
    -would introduce a module SALOMEDS.py, which contains the following definitions: -
    -
    # module SALOMEDS.py
    -class StudyManager:
    -  def _Close(self,aStudy):
    -   pass #interfaces are discussed later
    -
    -To avoid conflicts, IDL names that are also Python identifiers are prefixed -with an underscore (‘_’). -

    Back to the contents -

    -

    -Mapping for Template and Array Types

    -Both the bounded and the unbounded string type of IDL are mapped to the -Python string type. Wide strings are represented by an implementation-defined -type with the following properties: -

    • For the wide string X and the integer n, X[n] returns the nth character, -which is a wide string of length 1. -

    • len(X) returns the number of characters of wide string X. -

    • CORBA.wstr(c) returns a wide character with the code point c in an -implementation-defined encoding. -

    • X+Y returns the concatenation of wide strings X and Y. -

    • CORBA.word(CORBA.wstr(c)) == c -

    The sequence template is mapped to sequence objects (e.g., tuples or -lists). Applications should not assume that values of a sequence type are -mutable. Sequences and arrays of octets and characters are mapped to the -string type for efficiency reasons. -

    For example, given the IDL definitions -

    -
    module SALOMEDS {
    -  typedef sequence <string> StringSeq;
    -   
    -   interface AttributeTableOfInteger : GenericAttribute {
    -
    -    void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
    - };
    -};
    -
    -a client could invoke the operation -
    -
    print My_AttributeTableOfInteger.SetRowTitles(["X","F"])
    -
    -Array types are mapped like sequence templates. The application in this -example also expects an IncorrectArgumentLength exception if it passes -sequences that violate the bounds constraint or arrays of wrong size. -

    Another example with arrays. The following IDL definition -

    -
    module SALOMEDS {
    - typedef sequence<GenericAttribute> ListOfAttributes;
    - interface SObject {
    -  ListOfAttributes     GetAllAttributes();
    - };
    -};
    -
    -is equal to -
    -
    import SALOMEDS
    -
    -attributes=[]
    - 
    -attributes = My_SObject.GetAllAttributes()
    -
    -length = len(attributes)
    -
    -print "Attributes number = ", length
    -print attributes
    -
    -Back to the contents -

    -

    -Mapping for Objects and Operations

    -A CORBA object reference is represented as a Python object at run-time. -This object provides all the operations that are available on the interface -of the object. Although this specification does not mandate the use of -classes for stub objects, the following discussion uses classes to indicate -the interface. -

    The nil object is represented by None. -

    If an operation expects parameters of the IDL Object type, any Python -object representing an object reference might be passed as actual argument. -

    If an operation expects a parameter of an abstract interface, either -an object implementing that interface, or a value supporting this interface -may be passed as actual argument. The semantics of abstract values then -define whether the argument is passed by value or by reference. -

    Operations of an interface map to methods available on the object references. -Parameters with a parameter attribute of in or inout are -passed from left to right tothe method, skipping out parameters. -The return value of a method depends on the number of out parameters -and the return type. If the operation returns a value, this value forms -the first result value. All inout or out parameters -form consecutive result values. The method result depends then on -the number of result values: -

    • If there is no result value, the method returns None. -

    • If there is exactly one result value, it is returned as a single -value. -

    • If there is more than one result value, all of them are packed -into a tuple, and this tuple is returned. -

    Assuming the IDL definition -

    -
    module SALOMEDS{
    - interface StudyBuilder{
    -  boolean FindAttribute  ( in SObject anObject, 
    -                           out GenericAttribute anAttribute, 
    -                           in string aTypeOfAttribute );
    - };
    -};
    -
    -a client could write -
    -
    from SALOMEDS import StudyBuilder;
    -my_StudyBuilder=...
    -  
    -  res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal")
    -
    -In this example A corresponds to the return value anAttribute -and res to the boolean return value. -

    If an interface defines an attribute name, for example, the attribute -is mapped into an operation _get_name. If the attribute is not readonly, -there is an additional operation _set_name. -

    The IDL definition -

    -
    module SALOMEDS{
    - interface Study{
    -  attribute string Name;
    - };
    -};
    -
    -is equal to the following -
    -
    from SALOMEDS import Study
    -My_Study=...
    -  Name=My_Study._get_name();
    -  Name=My_Study._set_name();
    -
    -Back to the contents -

    -

    -Narrowing Object References

    -Python objects returned from CORBA operations or pseudo-operations (such -as string_to_object) might have a dynamic type, which is more specific -than the static type as defined in the operation signature. -

    Since there is no efficient and reliable way of automatically creating -the most specific type, explicit narrowing is necessary. To narrow an object -reference A to an interface class AttributeSequenceOfReal, -the client can use the following operation -

    -
    A = A._narrow(SALOMEDS.AttributeSequenceOfReal)
    -
    -Back to the contents -

    -

    -Mapping for Exceptions

    -An IDL exception is translated into a Python class derived from CORBA.UserException. -System exceptions are derived from CORBA.SystemException. Both base classes -are derived from CORBA.Exception. The parameters of the exception are mapped -in the same way as the fields of a struct definition. When raising an exception, -a new instance of the class is created; the constructor expects the exception -parameters. For example, the definition -
    -
    module SALOMEDS{
    - interface StudyBuilder{
    -  exception LockProtection {};
    -  void CommitCommand() raises(LockProtection);
    - };
    -};
    -
    -could be used caught as -
    -
    from SALOMEDS import StudyBuilder;
    -my_StudyBuilder=...
    -try:
    -  my_StudyBuilder.CommitCommand();
    -except StudyBuilder.LockProtection,value:
    -  print "Error! Study is locked for modifications"
    -
    - -


    Back to the contents -

    -

    -Mapping for Enumeration Types

    -An enumeration is mapped into a number of constant objects in the name -space where the enumeration is defined. An application may only test for -equivalence of two enumeration values, and not assume that they behave -like numbers. For example, the definition -
    -
    module VISU {
    - interface PrsObject{
    - 
    -  enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER,
    -                   TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE,
    -                   TCUTPLANES, TVECTORS };
    - };
    -};
    -
    -introduces the objects -
    -
    from VISU import PrsObject
    -VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER,
    -VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES,
    -VISU.PrsObjType.TVECTORS
    -
    -Back to the contents -

    -

    -Mapping for Structured Types

    -An IDL struct definition is mapped into a Python class or type. For each -field in the struct, there is a corresponding attribute in the class with -the same name as the field. The constructor of the class expects the field -values, from left to right. For example, the IDL definition -
    -
    struct SDate {
    -               short Second;
    -               short Minute;
    -               short Hour;
    -               short Day;
    -               short Month;
    -               short Year;
    -             };
    -
    -could be used in the Python statements -
    -
    Date=SDate(30, 12, 15, 26, 1, 79)
    -print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year
    -
    - -
    -Back to the contents
    - - - - diff --git a/doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg b/doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg deleted file mode 100755 index fd4f45602..000000000 Binary files a/doc/salome/tui/KERNEL/sources/static/ns_f3-1.jpg and /dev/null differ diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html b/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html deleted file mode 100755 index 7f64f4369..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Kernel.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - -

    General overview -

    -

    Table of contents

    - - -
    -

    1. Introduction

    -

    The kernel corresponds to the minimal set of services required for the use of SALOME components (Supervisor, IAPP). -The kernel is also used by application software components (solver) and their container. -The kernel is associated to a unique user who can launch only one kernel at once. -The kernel is launched and destroyed by voluntary actions of the user. These functions are realized via the -use of scripts.

    -

    The list of the kernel services related to communication issues is:

    -
      -
    • The Naming service
    • -
    • The Session service
    • -
    • The Life Cycle service
    • -
    • The Registry service
    • -
    • The Notification service
    • -
    -

    This list is enlarged with CORBA independent services :

    - -
      -
    • The module catalog service
    • -
    • The Data Type Catalog service
    • -
    • The resource catalog service
    • -
    -

    SALOME kernel module also encapsulates the Engine -Back to the contents -

    2. Basic principles

    -

    The SALOME user's desktop is a process on a machine. This process includes:

    -
      -
    • A graphic interface (based on Qt),
    • -
    • A text interface (Python interpreter),
    • -
    • A 3D visualization window shared by components.
    • -
    -

    SALOME Modules decompose into an interface (widgets GUI, text mode TUI, 3D visualization V3D) and -an engine.

    -

    The description of a module and its components is obtained by consulting the module catalog.

    -

    The interface is dynamically loaded in the process of the SALOME user's desktop. The engine is a CORBA -server launched either on the local machine or on the distant machine.

    -

    The engine (CORBA server) is created by a factory (or container). -This factory is also a CORBA server. Several containers can be present on a machine. -Some containers are specialized for types of components requiring a specific management. -For example, a specific container is required for components performing parallel calculations. -The engine includes at least a dynamically linked library in the container process. -This library is the implementation of the CORBA server associated to the engine. -If the engine is built from a pre-existent executable code, the library is simply a wrapper of the encapsulated code. -It launches the code in a separate process. Wherever possible, the code is included into the dynamic library. -

    The container is one of the kernel services. If one needs to create a container on a distant machine, one creates a process resuming a part of the kernel services. The kernel can create other containers on distant machines via the trader (rsh). All the containers and the kernel share the same CORBA naming service with which they register.

    -

    The user reaches the functions of various SALOME'S components, either in graphic interactive mode (GUI) or in command mode ( TUI), via a Python interpreter.

    -Back to the contents - -

    3. Services and features of the SALOME kernel module

    -

    This section gives a brief overview of the services composing the kernel module. - The Life Cycle and Naming - services are described in separate chapters of this reference manual.

    - -

    3.1 Session service

    -

    SALOME session describes the period starting from the kernel creation and - ending with its destruction. During this period the user can connect the session - and disconnect from it without ending this session. One connection log could - be written. A priori, no information resulting from another (past) session can - be used by the current session.

    -

    Implementation of this service in SALOME application is provided by the class -Session encapsulated in the package -SALOME.

    - -

    3.2 Registry service

    -

    The active component registry should contain:

    - -
      -
    • The list of the active components
    • -
    • The list of the active containers during a SALOME session.
    • -
    -

    It should allow the state of a session. It also should allow to know if session can be stopped.

    -

    The API reference for this service is not included in the current version of the reference manual.

    - -

    3.3 Notification service

    -

    The notification service is a kernel function which allows exchanging of events between CORBA objects.

    -

    In comparison with traditional CORBA event service, SALOME notification service allows to:

    -
      -
    • Filter the events,
    • -
    • Structure the events,
    • -
    • Establish quality policies of services,
    • -
    • Subscribe to various event channels.
    • -
    -

    The API reference for this service is not included in the current version of the reference - manual.

    - -

    3.4 Module catalog service

    -

    There are two module catalogs in SALOME application:

    -
      -
    • General module catalog : This first catalog is common to all SALOME users once the the platform is installed (for example for a particular company or a service). This catalog will be managed by the integrator or the administrator of the platform, -
    • Personal module catalog : A specific catalog for every user (possibly empty). This catalog should notably allow the developers to test a new component before integrating it into the general catalog. -
    -

    The objective of these two module catalogs is to:

    -
      -
    • List the available modules; -
    • Allow the addition, the modification and the deletion of a module in catalogs; -
    • Look for a module and\or a service fulfilling some given criteria (in catalogs); -
    -

    Implementation of this service in SALOME application is provided by two classes -ModuleCatalogand AComponent encapsulated in the package -SALOME_ModuleCatalog.

    - -

    3.5 Data type catalog

    - -

    The data exchanged between components services have definite types. During description of input, output, and -configuration parameters of components in the module catalog, the -definition of the parameters types is taken from data type catalog. During the editing of execution of -graphs, it is necessary to check that the connections output-input parameters are of compatible -types.

    -

    The data types correspond to CORBA object classes, including attributes and access methods (defined by their IDL). -These types can be created by specialization of generic data types.

    -

    The purpose of the data type catalog is to:

    -
      -
    • List the available data types in the catalog; -
    • Browse the type hierarchy to check the compatibility of types (specialized output toward generic input); -
    • Allow the addition, the modification and the deletion of a data type in the catalog; -
    -

    The API reference for this service is not included in the current version of the reference - manual.

    -

    3.6 Resource catalog

    - -

    This catalog describes machines, possible types of container on a machine, resources of machines... This catalog is used by the SALOME LifeCycle service.

    -

    The API reference for this service is not included in the current version of the reference - manual.

    - -

    3.7 Engine

    -

    The engine represents a shared library which can be dynamically loaded by a container. The container can load this library, -given an interface name and an implementation -name. The container dynamically resolves an extern_C function in the library, -which constructs the CORBA Engine servant object.

    -

    The SALOME engine in - the current version of the application is implemented - as Engines package of interfaces. It encapsulates two classes: Component, Container.

    -

    The API refernce for Engines package can be found here. -

    -

    3.7.1 Component class

    -

    This class is used for interaction between the container and the component and between the components inside the container. -

    -

    The API reference for this class can be found here.

    - -

    3.7.2 Container class

    -

    This class provides a set of methods which are necessary for definition of the process of loading and registration of new components in SALOME application.

    -

    The API reference for this class can be found here.

    - -Back to the contents - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html b/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html deleted file mode 100755 index f1a1fb8af..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Life_Cycle.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Life Cycle service Description - - - - - - -  -
    - - - - - - -
    -
    -
    - - -

    Life Cycle service Description

    -

    Introduction

    -

    The objective of this document is to give the users of SALOME - application a brief overview of the Life Cycle service implemented in SALOME. - A complete version of the LifeCycle service specification edited by the Object Management Group, Inc.(OMG) can be found here. -

    -

    Table of contents

    - -
    - -

    1. Overview

    - -

    Life Cycle service defines services and conventions for creating, deleting, copying and moving objects. -Because CORBA-based environments support distributed objects, the Life Cycle service defines conventions that allow clients to perform -life cycle operations on objects in different locations. This overview describes the life cycle problem for distributed object systems.

    -
    - - -

    2. SALOME Life Cycle service description

    -

    The SALOME Life Cycle service represents a partial implementation of the CORBA LifeCycle service.

    -

    From general point of view, the SALOME Life Cycle service allows to find or load with the help of a given container a definte SALOME component with its further -initialization and registration in the Naming service.

    -

    Container - it's a certain engine realizing the mechanism of loading a SALOME module.

    -

    Component - it's a certain abstract shell wrapping SALOME modules, performing all operations concerned with their initialization and registration.

    -

    From the point of view of the service user, the Life Cycle provides a set of functions allowing to :

    -
      -
    • Locate a machine (more generally a container) by a logical set of required features (of both container and - machine);
    • -
    • Load components on the obtained containers;
    • -
    • Create a container;
    • -
    • Obtain the container containing a given component;
    • -
    • Treat the list of the active components;
    • -
    • Treat the list of the available containers.
    • -
    - - - -

    The SALOME Life Cycle is a CORBA server. This server at its initialization is registered with the naming service.

    -

    The Life Cycle service is invoked to find a container and use it to load a -component. It supplies, as parameters, the type of container and the machine features required for loading -a given component. -

    -

    The Life Cycle service then returns a CORBA reference of a launched container.

    -

    Containers are launched on demand depending on components to be loaded. The Life Cycle service manages loading of containers.

    -

    When there is no launched container matching the request the Life Cycle service invokes loading of the correct type of container on a correct machine via a rsh type command.

    -

    The Life Cycle service interrogates containers to have information about the dynamic state of the machine (load). It contains (and update) the state of the active containers.

    -

    The Life Cycle service can implement a loading strategy for new containers on new machines, depending on the state of the already launched containers.

    -

    The Life Cycle service can stop containers at the end of session on -demand.

    - -

    In SALOME platform the Life Cycle service is implemented in SALOME_Life CycleCORBA class. The API refernce for the methods of this class -can be found here.

    -Back to the contents -
    - - -
    - - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Naming.html b/doc/salome/tui/KERNEL/sources/static/overview_Naming.html deleted file mode 100755 index 8af6b10ec..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Naming.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - Naming Service Description - - - -  -
    - - - - - - -
    -
    -
    - - -

    Naming Service Description

    -
    -

    Introduction

    -

    This page contains an abridged version of the Naming Service specification - edited by the Object Management Group, Inc.(OMG). The objective of this document is to give the users of SALOME - application a brief overview of the Naming Service implemented in SALOME. - A complete version of this document can be found here. -

    -
    -

    Table of contents

    - - -
    - -

    1. Overview

    -

    This chapter presents the OMG Naming Service and explains how the Naming Service can be used to decouple clients and servers by -providing an external reference exchange mechanism. The chapter also covers how to solve the bootstrapping problem for clients and -servers by controlling their configuration. -

    - -

    In practice, copying stringified references from a server to all its clients is clumsy and does not scale. The Naming Service provides a way -for servers to advertise references under a name, and for clients to retrieve them. The advantages are: -

    -
      -
    • Clients and servers can use meaningful names instead of having to deal with stringified references.
    • -
    • By changing a reference in the service without changing its name, you can transparently direct clients to a different object.
    • -
    • The Naming Service solves the bootstrapping problem because it provides a fixed point for clients and servers to rendezvous.
    • -
    -

    The Naming Service is much like a white pages phone book. Given a name, it - returns an object reference.

    - -

    The terminology used in description of NamigService is the following:

    - -
      -
    • A name-to-IOR association is called by a name binding.
    • -
    • Each binding identifies exactly one object reference, but an object reference - may be bound more than once (have more than one name).
    • -
    • A naming context is an object that contains name bindings. - The names within a context must be unique. Naming contexts can contain bindings - to other naming contexts, so naming contexts can form graphs. Binding contexts - in other contexts creates a naming graph — a directed graph with nodes - and labeled edges where the nodes are contexts. A naming graph allows more - complex names to reference an object. Given a context in a naming graph, a - sequence of names can reference an object. This sequence of names (called - a compound name) defines a path in the naming graph to navigate the - resolution process. Figure 1-1 shows an example of a naming graph.
    • -
    • Binding a name to a context means to add a name–IOR pair to a context.
    • -
    • Resolving a name means to look for a name in a context and to obtain the - IOR bound under that name.
    • -
    - - -
    -

    Figure 1-1 A Naming Graph

    - Back to the contents -
    - -

    2. SALOME Naming Service

    - -

    2.1 Introduction

    -

    The SALOME Naming Service is a kernel function which supplies a name directory - hierarchy for pointing out CORBA objects. This name directory hierarchy allows, - from symbolic names, to dynamically find the references of distributed SALOME - objects, without information about their location. SALOME objects which can - be reached via the naming service are:

    - -
      -
    • The kernel services
    • -
    • Containers -
    • SALOME components instances -
    -

    The name directory hierarchy in SALOME represents a graph of directories containing - symbolic associations name-reference on objects. (It has been described in the - previous section)

    - -

    2.2 Definitions

    -
    -
    Directory
    -
    Context of names containing symbolic associations name-reference on objects.


    -
    "/"
    -
    Character used in SALOME to separate two names of a directory


    -
    Access path
    -
    List of names (separated by "/" character representing the path to be followed - in the graph to reach an association name-reference (the last name in the sequence).
    -
    -
    Note:An object can be referenced by several symbolic names - in one or several directories.
    - -

    2.3 Partition of SALOME name directory hierarchy

    -

    The hierarchical organization of the SALOME name directory is not completely frozen . -Because the framework allows the simultaneous opening of several studies, the following levels are determined:

    -
     
    - /Kernel
    - /Container/
    -	       /Component	
    -
    - -

    2.4 SALOME name directory persistence

    -

    During a SALOME session, stopping a server in charge of the Naming Service - doesn't imply the loss of the contents of the SALOME name directory hierarchy. - A backup file is produced and can be used to restart the Naming Service. So, - one can recover the state of the SALOME name directory hierarchy at restart - time. During such breakdown, every call to any function of the Naming Service - invokes an exception of type Unreachable service.

    - -

    2.5 SALOME Naming Service features

    -

    Usage and administration of the name directory hierarchy is realized by means of the following functions:

    -
      -
    • Recording and recovering of the reference of an object
    • -
    • Searching for a symbolic name
    • -
    • Creating of a directory, reading and modifying of the current directory
    • -
    • Destructing of a symbolic name and a diredtory
    • -
    -

    The access path used in these functions can be defined, either from the root, or from any -directory of SALOME name directory hierarchy.

    - -

    In SALOME there is s standard interface of Naming Service, and any user can - use it for binding and finding objects. How to use it, it's possible to find - in any CORBA documentation. However in SALOME there is an additional layer which - hides calls to standard interface.

    -

    The precise API reference for these functions you can find here.

    -

    Here is a short list of public methods which are used for working with the SALOME Naming Service:

    -
    -

    Register

    -
    Method which register object reference in the naming service with given name. It makes assignment between IOR and stringified name. -Then it's possible to get object reference from name using "Resolve" method.
    -

    -

    Resolve

    -
    Try to obtain object reference from name. It's necessary before publishing - IOR in the Naming Service by Register method.
    -

    -

    Find

    -
    The purpose of this method is to research a name from the current directory - of the naming service. Then if there is occurrence the naming service changes - directory to go to the directory where last occurrence is found.
    -

    -

    CreateDirectory

    -
    This method allows to create one or several directories in the current directory
    -

    -

    ChangeDirectory

    -
    Moves the current directory. The current directory is moved to the root directory if the input parameter Name is "/".
    -

    -

    CurrentDirectory

    -
    Method allowing to get the current directory.
    -

    -

    list

    -
    Method allowing to list and print the whole context beginning from the current context.
    -

    -

    list_directory

    -
    Method to get all contexts contained in the current directory.
    -

    -

    DestroyName

    -
    Destroys a symbolic name-object reference association.
    -

    -

    DestroyDirectory

    -
    Destroys an empty directory.
    -
    - -Back to the contents -
    - - diff --git a/doc/salome/tui/KERNEL/sources/static/overview_Study.html b/doc/salome/tui/KERNEL/sources/static/overview_Study.html deleted file mode 100755 index 0526536e9..000000000 --- a/doc/salome/tui/KERNEL/sources/static/overview_Study.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - -

    General overview -

    -
    -

    Table of contents

    - -

    1. Introduction

    -

    In SALOME application the Study module is used for management (creation, saving - etc.) of studies. In the framework of the platform, a study represents a working - document allowing to manage the data produced by various components which are - integarted into SALOME.
    -

    -

    2. Representation of the study

    -

    The study represents a set of objects that we will call Study Objects or SObjects. - The study can be represented as a tree, every node of that tree containing a - SObject. SObjects in the study can be values or references towards data of calculation, - graphs of calculation, trees of construction of detail(room), results. Every - SOject of the study is characterised by a unique identifier in the study.

    -

    The study allows to describe the following relations:

    -
      -
    • The link between the transient and persistent values of an SObject.
    • -
    • The relations between the SObjects produced by different components.
    • -
    • The relations between the SObjects produced by the same component.
    • -
    • The link between an object and its user name.
    • -
    • The access to the definition of the component which produce an object of - the study.
    • -
    • The access to instance of the component (if this one exists) which has produced - this SObject of the study.
    • -
    - -

    Every SObject in the study contains a set of attributes. These attributes represent - a set of definitions associated to that object, they can contain values or corba - references towards the data contained in the internal data structure of a component.

    -

    As the structure of the study is tree-like it is possible to associate sub-objects - to objects.

    -

    As particular object, the study contains Component Data which are labels associated to the component -which produce data in the study. It is to this object that we can associate attributes containing ID which -we shall allow to identify the type of the component and also its instance. Objects produced by a -component will be sub-objects of the coresponding Data Component.

    -

    For example Component Data GEOM will contain the data produced by the component - Geom.

    - - - - - -
    GEOM contains the data produced by the component GEOM. The component MESH - contains a SObject Mesh_1 wich refers to the SObject identified - by ID4 corresponding to Geometrie_1.
    -

    We distinguish two forms of the study, the study opened in a session SALOME and the study in the -persistent format. These two formats are described in the following sections

    -

    2.1 Study in transient format

    -

    The representation of the study in memory will be based on the document OCAF (supplied by OCC). -The document OCAF can be seen as a tree, every node of that tree is identified by a tag representing an integer value.

    -

    The exploration of the tree from the root to a node supplies a sequence of tags which establishes a -unique identifier ID. ID represents a character string containing the sequence of tags separated by -one ':'.

    -

    For example 0:1:12:4

    -

    To every node we can associate a set of attributes.

    -

    The attributes which the study can contain can be of the following types:

    -
      -
    • All standard attributes supplied by OCC (package TdataStd) which allow to define (integers, -real, strings, identifiers, references etc.)
    • -
    • Attributes which contain CORBA references.
    • -
    • Attributes which contain the path HDF to reach the persistent datum. (Cf. the following chapter)
    • -
    -

    Remark: it is the study which takes care to build the attributes from the values which are passed to it, so -an attribute is always in a study, and it knows the study object to which it is attached.

    -

    Example of a Study Object as a set of various attributes.

    - -

    2.2 Study in persistent format

    -

    To store a study HDF format is used, this tool allows to represent persistent data in the form of a tree.

    -

    Under the root of the persistent document, you can find a set of nodes:

    -
      -
    • The first node contains the skeleton of the study. The skeleton consists of the identifiers of the -objects, as well as the references among them.
    • -
    • There is also one node for every component which has produced data during this SALOME session. Under each of these -node there are values of the data produced by this component.
    • -
    -

    2.3 Link between transient and persistent formats

    -

    It will be possible to complete the definition of one object in the study by associating to it an attribute -HDFPath which will contain the path to the persistent data.

    - -

    Back to the contents

    -

    3. Services and features of the study

    -

    The Study in SALOME application possess a wide functionality. This functionality is provided by a set of classes which are described -below. -

    3.1 Study class

    -

    The purpose of the Study class is to manage the data produced by various components - of SALOME platform. Most of the Study operations are handled by the StudyManager - and the StudyBuilder. What - is left in the Study class are elementary inquiries. A Study is explored by - a set of tools, mainly iterators , which are described further.

    -

    Nevertheless, the Study class contains a set of methods providing:

    - -
      -
    • management of study properties -
    • search for SObjects. -
    • search for SComponents -
    • creation of a new StudyBuilder, ComponentIterator, ChildIterator etc. -
    -

    The API reference for this class can be found here.

    -

    3.2 StudyBuilder class

    -

    StudyBuilder supplies basic services to edit the study. The edition of the study is made by the -component. Every component will use the basic services of the StudyBuilder allowing to write and publish objects.

    -

    StudyBulder provides the following functionality:

    -
      -
    • creation, modification or deletetion of SObjects in the study
    • -
    • creation or removal of SComponents
    • -
    • undo/redo functionality. For that purpose it supplies the methods NewCommand, - CommitCommand, AbortCommand.
    • -
    -

    The API reference for this class can be found here.

    -

    3.3 StudyManager class

    -

    The purpose of the Manager is to manipulate Studies. Since SALOME is a multi-document - application during a working session you can operate as many stadies as you - wishes to create.

    -

    For that purpose StudyManager provides the following functionality:

    -
      -
    • creation, opening, closing and saving studies
    • -
    • navigation through a set of studies present in the current working session
    • -
    • copy/paste of the objects in the study functionality.
    • -
    -

    The API reference for this class can be found here.

    -

    3.4 SObject class

    -

    The objects in the study are built by the StudyBuilder. -The SObject class provides methods for elementary inquiries, like getting an object ID or its attribuites.

    -

    The API reference for this class can be found here.

    -

    3.5 SComponent class

    -

    The SComponent class establishes in the study a permanent assocition to the components -integrated into SALOME platform. The SComponent interface is a specialization of the SObject - class. It inherits the most of its methods from the SObject class which are used for management of the SComponents.

    -

    The API reference for this class can be found here.

    -

    3.6 ChildIterator class

    -

    It is one of the tools destined for exploration of the study. This class contains a set of methods allowing to get -the access to all identified objects which are sons of another identifiedobject.

    -

    The API reference for this class can be found here.

    -

    3.7 SComponentIterator

    -

    This is the second tool destined for exploration of the study. This interface contains the methods allowing to iterate over all SComponents in the list. - The search is started from the first SComponent in the list.

    -

    The API reference for this class can be found here.

    - -

    3.8 GenericAttribute class

    -

    GenericAttribute represents a base class for all attributes which can be assigned to the SObjects created in the study. All attribute classes - derive from this classe and inherit its methods.

    -

    The API reference for this class can be found here.

    - -

    In SALOME application a SObject can possess the following attributes:

    - - - - - -
    - -
    -

    3.9 UseCaseBuilder class

    -

    UseCase in the study represents a user-defined subtree, containing all or some of the objects which currently exist -in the study. The UseCaseBuilder class contains a set of methods used for management (creation, deletion etc) of this sub-tree in the study.

    -

    The API reference for this class can be found here.

    - -

    3.10 UseCaseIterator

    -

    This class represents an exploration tool for the UseCase. It contains a set of methods used for iteration over the objects in the UseCase.

    -

    The API reference for this class can be found here.

    - -

    3.11 Callback class

    -

    The StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class - Callback is created and this object is assigned to the newly created Builder as callback which should be called - when adding and removing the objects.

    -

    The API reference for this class can be found here.

    - -

    3.12 Driver class

    - -

    This class represents a common tool for all components integrated into SALOME - application, that allows them to communicate with the study. It contains a set - of methods which can be called by any component and which provide the following - functionality: -

      -
    • publishing in the study of the objects created by a definite component
    • -
    • saving/loading of the data created by a definite component. These methods - are called by the StudyManager when loading/saving a study containing the - data created by a definite component.
    • -
    • transforming of the transient references into persistant references (or - vice versa) of the SObjects when saving (or loading) a study
    • -
    • copy/paste common functionality. These methods can be called by any component - in order to copy/paste its object created in the study
    • -
    -

    The API reference for this class can be found here.

    -

    Back to the contents

    - - diff --git a/doc/salome/tui/KERNEL/sources/static/page2.html b/doc/salome/tui/KERNEL/sources/static/page2.html deleted file mode 100755 index 40eed1f98..000000000 --- a/doc/salome/tui/KERNEL/sources/static/page2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Main Page - - - -  -
    - - - - - - -
    -
    -
    - - - - - -

    Mapping of SALOME IDL definitions to Python language. -

    - - diff --git a/doc/salome/tui/KERNEL/sources/static/tree.js.in b/doc/salome/tui/KERNEL/sources/static/tree.js.in deleted file mode 100755 index b7422d7b8..000000000 --- a/doc/salome/tui/KERNEL/sources/static/tree.js.in +++ /dev/null @@ -1,200 +0,0 @@ -foldersTree = gFld("SALOME v.@VERSION@ ", "", "") - insDoc(foldersTree, gLnk("Main Page", "", "main.html")) - -aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) - aux2 = insFld(aux1, gFld("Modules", "")) - aux3 = insFld(aux2, gFld("SALOME STUDY module", "")) - insDoc(aux3, gLnk("Overview", "", "overview_Study.html")) - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("SALOMEDS", "", "namespaceSALOMEDS.html")) - insDoc(aux3, gLnk("Examples", "", "examples_Study.html")) - aux3 = insFld(aux2, gFld("SALOME KERNEL module", "")) - insDoc(aux3, gLnk("Overview", "", "overview_Kernel.html")) - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("SALOME_ModuleCatalog", "", "namespaceSALOME__ModuleCatalog.html")) - insDoc(aux4, gLnk("SALOME", "", "namespaceSALOME.html")) - insDoc(aux4, gLnk("Engines", "", "namespaceEngines.html")) - insDoc(aux3, gLnk("Examples", "", "examples_Kernel.html")) - - -/*! Data structures -*/ - insDoc(aux1, gLnk("Data Structures", "", "annotated.html")) - -/*! insDoc(aux1, gLnk("SALOME_ModuleCatalog::Acomponent", "", "interfaceSALOME__ModuleCatalog_1_1Acomponent.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeComment", "", "interfaceSALOMEDS_1_1AttributeComment.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeDrawable", "", "interfaceSALOMEDS_1_1AttributeDrawable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeExpandable", "", "interfaceSALOMEDS_1_1AttributeExpandable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeInteger", "", "interfaceSALOMEDS_1_1AttributeInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeIOR", "", "interfaceSALOMEDS_1_1AttributeIOR.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeLocalID", "", "interfaceSALOMEDS_1_1AttributeLocalID.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeName", "", "interfaceSALOMEDS_1_1AttributeName.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeOpened", "", "interfaceSALOMEDS_1_1AttributeOpened.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePersistentRef", "", "interfaceSALOMEDS_1_1AttributePersistentRef.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePixMap", "", "interfaceSALOMEDS_1_1AttributePixMap.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributePythonObject", "", "interfaceSALOMEDS_1_1AttributePythonObject.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeReal", "", "interfaceSALOMEDS_1_1AttributeReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSelectable", "", "interfaceSALOMEDS_1_1AttributeSelectable.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSequenceOfInteger", "", "interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeSequenceOfReal", "", "interfaceSALOMEDS_1_1AttributeSequenceOfReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeStudyProperties", "", "interfaceSALOMEDS_1_1AttributeStudyProperties.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger", "", "interfaceSALOMEDS_1_1AttributeTableOfInteger.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal", "", "interfaceSALOMEDS_1_1AttributeTableOfReal.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString", "", "interfaceSALOMEDS_1_1AttributeTableOfString.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTarget", "", "interfaceSALOMEDS_1_1AttributeTarget.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTextColor", "", "interfaceSALOMEDS_1_1AttributeTextColor.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTextHighlightColor", "", "interfaceSALOMEDS_1_1AttributeTextHighlightColor.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTreeNode", "", "interfaceSALOMEDS_1_1AttributeTreeNode.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeUserID", "", "interfaceSALOMEDS_1_1AttributeUserID.html")) - insDoc(aux1, gLnk("SALOMEDS::Callback", "", "interfaceSALOMEDS_1_1Callback.html")) - insDoc(aux1, gLnk("SALOMEDS::ChildIterator", "", "interfaceSALOMEDS_1_1ChildIterator.html")) - insDoc(aux1, gLnk("SALOMEDS::Color", "", "structSALOMEDS_1_1Color.html")) - insDoc(aux1, gLnk("Engines::Component", "", "interfaceEngines_1_1Component.html")) - insDoc(aux1, gLnk("Engines::Container", "", "interfaceEngines_1_1Container.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::DefinitionInterface", "", "structSALOME__ModuleCatalog_1_1DefinitionInterface.html")) - insDoc(aux1, gLnk("SALOMEDS::Driver", "", "interfaceSALOMEDS_1_1Driver.html")) - insDoc(aux1, gLnk("SALOME::ExceptionStruct", "", "structSALOME_1_1ExceptionStruct.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute", "", "interfaceSALOMEDS_1_1GenericAttribute.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute::LockProtection", "", "exceptionSALOMEDS_1_1GenericAttribute_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::IAPP_Affich", "", "structSALOME__ModuleCatalog_1_1IAPP__Affich.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ModuleCatalog", "", "interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::NotFound", "", "exceptionSALOME__ModuleCatalog_1_1NotFound.html")) - insDoc(aux1, gLnk("SALOMEDS::NotImplemented", "", "exceptionSALOMEDS_1_1NotImplemented.html")) - insDoc(aux1, gLnk("SALOME::SALOME_Exception", "", "exceptionSALOME_1_1SALOME__Exception.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponent", "", "interfaceSALOMEDS_1_1SComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponentIterator", "", "interfaceSALOMEDS_1_1SComponentIterator.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::Service", "", "structSALOME__ModuleCatalog_1_1Service.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ServicesParameter", "", "structSALOME__ModuleCatalog_1_1ServicesParameter.html")) - insDoc(aux1, gLnk("SALOME::Session", "", "interfaceSALOME_1_1Session.html")) - insDoc(aux1, gLnk("SALOME::Session::GUIActive", "", "exceptionSALOME_1_1Session_1_1GUIActive.html")) - insDoc(aux1, gLnk("SALOME::Session::RunningStudies", "", "exceptionSALOME_1_1Session_1_1RunningStudies.html")) - insDoc(aux1, gLnk("SALOMEDS::SObject", "", "interfaceSALOMEDS_1_1SObject.html")) - insDoc(aux1, gLnk("SALOME::StatSession", "", "structSALOME_1_1StatSession.html")) - insDoc(aux1, gLnk("SALOMEDS::Study", "", "interfaceSALOMEDS_1_1Study.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyCommentError", "", "exceptionSALOMEDS_1_1Study_1_1StudyCommentError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidComponent", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidContext", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidContext.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidDirectory", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidDirectory.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameAlreadyUsed", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameAlreadyUsed.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameError", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyObjectAlreadyExists", "", "exceptionSALOMEDS_1_1Study_1_1StudyObjectAlreadyExists.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder", "", "interfaceSALOMEDS_1_1StudyBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder::LockProtection", "", "exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyManager", "", "interfaceSALOMEDS_1_1StudyManager.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseBuilder", "", "interfaceSALOMEDS_1_1UseCaseBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseIterator", "", "interfaceSALOMEDS_1_1UseCaseIterator.html")) -*/ - insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html")) - -/*! insDoc(aux1, gLnk("SALOME_ModuleCatalog::Acomponent", "", "interfaceSALOME__ModuleCatalog_1_1Acomponent.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfInteger::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfInteger_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfReal::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfReal_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectArgumentLength", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectArgumentLength.html")) - insDoc(aux1, gLnk("SALOMEDS::AttributeTableOfString::IncorrectIndex", "", "exceptionSALOMEDS_1_1AttributeTableOfString_1_1IncorrectIndex.html")) - insDoc(aux1, gLnk("SALOMEDS::Callback", "", "interfaceSALOMEDS_1_1Callback.html")) - insDoc(aux1, gLnk("SALOMEDS::ChildIterator", "", "interfaceSALOMEDS_1_1ChildIterator.html")) - insDoc(aux1, gLnk("SALOMEDS::Color", "", "structSALOMEDS_1_1Color.html")) - aux2 = insFld(aux1, gFld("Engines::Component", "", "interfaceEngines_1_1Component.html")) - insDoc(aux1, gLnk("Engines::Container", "", "interfaceEngines_1_1Container.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::DefinitionInterface", "", "structSALOME__ModuleCatalog_1_1DefinitionInterface.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::Driver", "", "interfaceSALOMEDS_1_1Driver.html")) - insDoc(aux1, gLnk("SALOME::ExceptionStruct", "", "structSALOME_1_1ExceptionStruct.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::GenericAttribute", "", "interfaceSALOMEDS_1_1GenericAttribute.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeComment", "", "interfaceSALOMEDS_1_1AttributeComment.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeDrawable", "", "interfaceSALOMEDS_1_1AttributeDrawable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeExpandable", "", "interfaceSALOMEDS_1_1AttributeExpandable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeInteger", "", "interfaceSALOMEDS_1_1AttributeInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeIOR", "", "interfaceSALOMEDS_1_1AttributeIOR.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeLocalID", "", "interfaceSALOMEDS_1_1AttributeLocalID.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeName", "", "interfaceSALOMEDS_1_1AttributeName.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeOpened", "", "interfaceSALOMEDS_1_1AttributeOpened.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePersistentRef", "", "interfaceSALOMEDS_1_1AttributePersistentRef.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePixMap", "", "interfaceSALOMEDS_1_1AttributePixMap.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributePythonObject", "", "interfaceSALOMEDS_1_1AttributePythonObject.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeReal", "", "interfaceSALOMEDS_1_1AttributeReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSelectable", "", "interfaceSALOMEDS_1_1AttributeSelectable.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSequenceOfInteger", "", "interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeSequenceOfReal", "", "interfaceSALOMEDS_1_1AttributeSequenceOfReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeStudyProperties", "", "interfaceSALOMEDS_1_1AttributeStudyProperties.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfInteger", "", "interfaceSALOMEDS_1_1AttributeTableOfInteger.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfReal", "", "interfaceSALOMEDS_1_1AttributeTableOfReal.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTableOfString", "", "interfaceSALOMEDS_1_1AttributeTableOfString.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTarget", "", "interfaceSALOMEDS_1_1AttributeTarget.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTextColor", "", "interfaceSALOMEDS_1_1AttributeTextColor.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTextHighlightColor", "", "interfaceSALOMEDS_1_1AttributeTextHighlightColor.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeTreeNode", "", "interfaceSALOMEDS_1_1AttributeTreeNode.html")) - insDoc(aux2, gLnk("SALOMEDS::AttributeUserID", "", "interfaceSALOMEDS_1_1AttributeUserID.html")) - insDoc(aux1, gLnk("SALOMEDS::GenericAttribute::LockProtection", "", "exceptionSALOMEDS_1_1GenericAttribute_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::IAPP_Affich", "", "structSALOME__ModuleCatalog_1_1IAPP__Affich.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ModuleCatalog", "", "interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::NotFound", "", "exceptionSALOME__ModuleCatalog_1_1NotFound.html")) - insDoc(aux1, gLnk("SALOMEDS::NotImplemented", "", "exceptionSALOMEDS_1_1NotImplemented.html")) - insDoc(aux1, gLnk("SALOME::SALOME_Exception", "", "exceptionSALOME_1_1SALOME__Exception.html")) - insDoc(aux1, gLnk("SALOMEDS::SComponentIterator", "", "interfaceSALOMEDS_1_1SComponentIterator.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::Service", "", "structSALOME__ModuleCatalog_1_1Service.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog::ServicesParameter", "", "structSALOME__ModuleCatalog_1_1ServicesParameter.html")) - insDoc(aux1, gLnk("SALOME::Session", "", "interfaceSALOME_1_1Session.html")) - insDoc(aux1, gLnk("SALOME::Session::GUIActive", "", "exceptionSALOME_1_1Session_1_1GUIActive.html")) - insDoc(aux1, gLnk("SALOME::Session::RunningStudies", "", "exceptionSALOME_1_1Session_1_1RunningStudies.html")) - aux2 = insFld(aux1, gFld("SALOMEDS::SObject", "", "interfaceSALOMEDS_1_1SObject.html")) - insDoc(aux2, gLnk("SALOMEDS::SComponent", "", "interfaceSALOMEDS_1_1SComponent.html")) - insDoc(aux1, gLnk("SALOME::StatSession", "", "structSALOME_1_1StatSession.html")) - insDoc(aux1, gLnk("SALOMEDS::Study", "", "interfaceSALOMEDS_1_1Study.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyCommentError", "", "exceptionSALOMEDS_1_1Study_1_1StudyCommentError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidComponent", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidComponent.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidContext", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidContext.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyInvalidDirectory", "", "exceptionSALOMEDS_1_1Study_1_1StudyInvalidDirectory.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameAlreadyUsed", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameAlreadyUsed.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyNameError", "", "exceptionSALOMEDS_1_1Study_1_1StudyNameError.html")) - insDoc(aux1, gLnk("SALOMEDS::Study::StudyObjectAlreadyExists", "", "exceptionSALOMEDS_1_1Study_1_1StudyObjectAlreadyExists.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder", "", "interfaceSALOMEDS_1_1StudyBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyBuilder::LockProtection", "", "exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html")) - insDoc(aux1, gLnk("SALOMEDS::StudyManager", "", "interfaceSALOMEDS_1_1StudyManager.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseBuilder", "", "interfaceSALOMEDS_1_1UseCaseBuilder.html")) - insDoc(aux1, gLnk("SALOMEDS::UseCaseIterator", "", "interfaceSALOMEDS_1_1UseCaseIterator.html")) -*/ - insDoc(aux1, gLnk("Class methods list", "", "functions.html")) -/*! -aux1 = insFld(foldersTree, gFld("Namespace List", "", "namespaces.html")) - insDoc(aux1, gLnk("Engines", "", "namespaceEngines.html")) - insDoc(aux1, gLnk("SALOME", "", "namespaceSALOME.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog", "", "namespaceSALOME__ModuleCatalog.html")) - insDoc(aux1, gLnk("SALOMEDS", "", "namespaceSALOMEDS.html")) -*/ - insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html")) - - insDoc(aux1, gLnk("File List", "", "files.html")) - -/*! - insDoc(aux1, gLnk("SALOME_Component.idl", "", "SALOME__Component_8idl.html")) - insDoc(aux1, gLnk("SALOME_Exception.idl", "", "SALOME__Exception_8idl.html")) - insDoc(aux1, gLnk("SALOME_ModuleCatalog.idl", "", "SALOME__ModuleCatalog_8idl.html")) - insDoc(aux1, gLnk("SALOME_Session.idl", "", "SALOME__Session_8idl.html")) - insDoc(aux1, gLnk("SALOMEDS.idl", "", "SALOMEDS_8idl.html")) - insDoc(aux1, gLnk("SALOMEDS_Attributes.idl", "", "SALOMEDS__Attributes_8idl.html")) -*/ - -aux1 = insFld(foldersTree, gFld("IDL/Python mapping", "")) - insDoc(aux1, gLnk("Mapping of IDL definitions to Python language", "", "mapping.html")) - insDoc(aux1, gLnk("Mapping of SALOME IDL definitions to Python language", "", "page2.html")) - -/*! insDoc(foldersTree, gLnk("Graphical Class Hierarchy", "", "inherits.html")) -*/ -aux1 = insFld(foldersTree, gFld("Naming service", "")) - insDoc(aux1, gLnk("Naming Service Description ", "", "overview_Naming.html")) - insDoc(aux1, gLnk("Salome_NamingService Class Reference", "", "classSALOME__NamingService.html")) - insDoc(aux1, gLnk("Examples", "", "examples_Naming.html")) -aux1 = insFld(foldersTree, gFld("Life Cycle", "")) - insDoc(aux1, gLnk("Life Cycle Service Description ", "", "overview_Life_Cycle.html")) - insDoc(aux1, gLnk("Salome_LifeCycleCorba Class Reference", "", "classSALOME__LifeCycleCORBA.html")) - insDoc(aux1, gLnk("Examples", "", "examples_Life_cycle.html")) - - diff --git a/doc/salome/tui/KERNEL/sources/static/treeview.js b/doc/salome/tui/KERNEL/sources/static/treeview.js deleted file mode 100644 index 55eb43d07..000000000 --- a/doc/salome/tui/KERNEL/sources/static/treeview.js +++ /dev/null @@ -1,505 +0,0 @@ -//**************************************************************** -// You are free to copy the "Folder-Tree" script as long as you -// keep this copyright notice: -// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ -// Author: Marcelino Alves Martins (martins@hks.com) December '97. -//**************************************************************** - -//Log of changes: -// 17 Feb 98 - Fix initialization flashing problem with Netscape -// -// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; -// make the ftien4 a js file -// -// DvH: Dec 2000 - Made some minor changes to support external -// references - -// Definition of class Folder -// ***************************************************************** - -function Folder(folderDescription, tagName, hreference) //constructor -{ - //constant data - this.desc = folderDescription - this.tagName = tagName - this.hreference = hreference - this.id = -1 - this.navObj = 0 - this.iconImg = 0 - this.nodeImg = 0 - this.isLastNode = 0 - - //dynamic data - this.isOpen = true - this.iconSrc = "ftv2folderopen.png" - this.children = new Array - this.nChildren = 0 - - //methods - this.initialize = initializeFolder - this.setState = setStateFolder - this.addChild = addChild - this.createIndex = createEntryIndex - this.hide = hideFolder - this.display = display - this.renderOb = drawFolder - this.totalHeight = totalHeight - this.subEntries = folderSubEntries - this.outputLink = outputFolderLink -} - -function setStateFolder(isOpen) -{ - var subEntries - var totalHeight - var fIt = 0 - var i=0 - - if (isOpen == this.isOpen) - return - - if (browserVersion == 2) - { - totalHeight = 0 - for (i=0; i < this.nChildren; i++) - totalHeight = totalHeight + this.children[i].navObj.clip.height - subEntries = this.subEntries() - if (this.isOpen) - totalHeight = 0 - totalHeight - for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) - indexOfEntries[fIt].navObj.moveBy(0, totalHeight) - } - this.isOpen = isOpen - propagateChangesInState(this) -} - -function propagateChangesInState(folder) -{ - var i=0 - - if (folder.isOpen) - { - if (folder.nodeImg) - if (folder.isLastNode) - folder.nodeImg.src = "ftv2mlastnode.png" - else - folder.nodeImg.src = "ftv2mnode.png" - folder.iconImg.src = "ftv2folderopen.png" - for (i=0; i 0) - auxEv = "" - else - auxEv = "" - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + auxEv + "") -// leftSide = leftSide + "" - this.isLastNode = 1 - } - else - { - this.renderOb(leftSide + auxEv + "") - leftSide = leftSide + "" - this.isLastNode = 0 - } - else - this.renderOb("") - - if (nc > 0) - { - level = level + 1 - for (i=0 ; i < this.nChildren; i++) - { - if (i == this.nChildren-1) - this.children[i].initialize(level, 1, leftSide) - else - this.children[i].initialize(level, 0, leftSide) - } - } -} - -function drawFolder(leftSide) -{ - if (browserVersion == 2) { - if (!doc.yPos) - doc.yPos=8 - doc.write("") - } - if (browserVersion == 3) - { - doc.write("
    ") - } - - doc.write("\n") - doc.write("\n\n") - doc.write("\n
    ") - doc.write(leftSide) - this.outputLink() - doc.write("") - doc.write("") - if (USETEXTLINKS) - { - this.outputLink() - doc.write(this.desc + "") - } - else - doc.write(this.desc) - -/*! - if (this.tagName!="") - { - doc.write(" [external]") - } -*/ - doc.write("
    \n") - - if (browserVersion == 2) { - doc.write("") - } - if (browserVersion == 3) { - doc.write("
    ") - } - - if (browserVersion == 1) { - this.navObj = doc.all["folder"+this.id] - this.iconImg = doc.all["folderIcon"+this.id] - this.nodeImg = doc.all["nodeIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["folder"+this.id] - this.iconImg = this.navObj.document.images["folderIcon"+this.id] - this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("folder"+this.id) - this.iconImg = doc.images.namedItem("folderIcon"+this.id) - this.nodeImg = doc.images.namedItem("nodeIcon"+this.id) - } -} - -function outputFolderLink() -{ - if (this.hreference) - { - doc.write(" 0) - doc.write("onClick='javascript:clickOnFolder("+this.id+")'") - doc.write(">") - } - else - doc.write("") -} - -function addChild(childNode) -{ - this.children[this.nChildren] = childNode - this.nChildren++ - return childNode -} - -function folderSubEntries() -{ - var i = 0 - var se = this.nChildren - - for (i=0; i < this.nChildren; i++){ - if (this.children[i].children) //is a folder - se = se + this.children[i].subEntries() - } - - return se -} - - -// Definition of class Item (a document or link inside a Folder) -// ************************************************************* - -function Item(itemDescription, tagName, itemLink) // Constructor -{ - // constant data - this.desc = itemDescription - this.tagName = tagName - this.link = itemLink - this.id = -1 //initialized in initalize() - this.navObj = 0 //initialized in render() - this.iconImg = 0 //initialized in render() - this.iconSrc = "ftv2doc.png" - - // methods - this.initialize = initializeItem - this.createIndex = createEntryIndex - this.hide = hideItem - this.display = display - this.renderOb = drawItem - this.totalHeight = totalHeight -} - -function hideItem() -{ - if (browserVersion == 1 || browserVersion == 3) { - if (this.navObj.style.display == "none") - return - this.navObj.style.display = "none" - } else { - if (this.navObj.visibility == "hidden") - return - this.navObj.visibility = "hidden" - } -} - -function initializeItem(level, lastNode, leftSide) -{ - this.createIndex() - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - this.renderOb("") -} - -function drawItem(leftSide) -{ - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
    ") - - doc.write("\n\n") - doc.write("\n
    ") - doc.write(leftSide) - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (USETEXTLINKS && this.link!="") - doc.write("" + this.desc + "") - else - doc.write(this.desc) -/*! - if (this.tagName!="") - { - doc.write(" [external]"); - } -*/ - doc.write("\n
    \n") - - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
    ") - - if (browserVersion == 1) { - this.navObj = doc.all["item"+this.id] - this.iconImg = doc.all["itemIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["item"+this.id] - this.iconImg = this.navObj.document.images["itemIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("item"+this.id) - this.iconImg = doc.images.namedItem("itemIcon"+this.id) - } -} - - -// Methods common to both objects (pseudo-inheritance) -// ******************************************************** - -function display() -{ - if (browserVersion == 1 || browserVersion == 3) - this.navObj.style.display = "block" - else - this.navObj.visibility = "show" -} - -function createEntryIndex() -{ - this.id = nEntries - indexOfEntries[nEntries] = this - nEntries++ -} - -// total height of subEntries open -function totalHeight() //used with browserVersion == 2 -{ - var h = this.navObj.clip.height - var i = 0 - - if (this.isOpen) //is a folder and _is_ open - for (i=0 ; i < this.nChildren; i++) - h = h + this.children[i].totalHeight() - - return h -} - - -// Events -// ********************************************************* - -function clickOnFolder(folderId) -{ - var clicked = indexOfEntries[folderId] - - if (!clicked.isOpen) - clickOnNode(folderId) - - return - - if (clicked.isSelected) - return -} - -function clickOnNode(folderId) -{ - var clickedFolder = 0 - var state = 0 - - clickedFolder = indexOfEntries[folderId] - state = clickedFolder.isOpen - - clickedFolder.setState(!state) //open<->close -} - -function initializeDocument() -{ - doc = document; - if (doc.all) - browserVersion = 1 //IE4 - else - if (doc.layers) - browserVersion = 2 //NS4 - else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1) - browserVersion = 3 //mozilla - else - browserVersion = 0 //other - - foldersTree.initialize(0, 1, "") - foldersTree.display() - - if (browserVersion > 0) - { - if(browserVersion != 3) - doc.write(" ") - - // close the whole tree - clickOnNode(0) - // open the root folder - clickOnNode(0) - } -} - -// Auxiliary Functions for Folder-Treee backward compatibility -// ********************************************************* - -function gFld(description, tagName, hreference) -{ - folder = new Folder(description, tagName, hreference) - return folder -} - -function gLnk(description, tagName, linkData) -{ - fullLink = "" - - if (linkData!="") - { - fullLink = "'"+linkData+"' target=\"basefrm\"" - } - - linkItem = new Item(description, tagName, fullLink) - return linkItem -} - -function insFld(parentFolder, childFolder) -{ - return parentFolder.addChild(childFolder) -} - -function insDoc(parentFolder, document) -{ - parentFolder.addChild(document) -} - -// Global variables -// **************** - -USETEXTLINKS = 1 -indexOfEntries = new Array -nEntries = 0 -doc = document -browserVersion = 0 -selectedFolder=0 diff --git a/doc/salome/tui/Makefile.am b/doc/salome/tui/Makefile.am index 7aa79e067..bddfbcb90 100644 --- a/doc/salome/tui/Makefile.am +++ b/doc/salome/tui/Makefile.am @@ -26,94 +26,20 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -EXTRA_DIST = pythfilter.py - -dist-hook: - cp -rf $(srcdir)/KERNEL $(distdir) - if test -d "KERNEL"; then \ - find "KERNEL" -name "*.*" -exec cp -rf {} $(distdir)/KERNEL ';' ; \ - fi - rm -rf `find $(distdir) -name CVS` +dev_docs: + $(DOXYGEN) -u doxyfile; \ + $(DOXYGEN) doxyfile clean-local: - rm -rf KERNEL - chmod -R +w INPUT - @for filen in `find INPUT -type f` ; do \ - case $${filen} in \ - INPUT/doxydev | INPUT/doxyuser | INPUT/sources/static/tree.js ) ;; \ - . | .. ) ;; \ - *) echo "Removing $${filen}" ; rm -rf $${filen} ;; \ - esac ; \ - done ; + -rm -fr KERNEL log.txt doxyfile.bak -KERNEL/main.html:../main.dox - cp -fr $(srcdir)/KERNEL/* ./INPUT; \ - cd ./INPUT; \ - pwd; ls;\ - echo "DOXYGEN SUPPORT PYTHON - $(DOXYGEN_WITH_PYTHON)"; \ - if( test "x$(DOXYGEN_WITH_PYTHON)" = "xyes"); then \ - sed 's|python_extension_must_be_here|*.py|' ./doxyuser > ./doxyuser1; \ - $(DOXYGEN) -u ./doxyuser1; \ - else \ - sed 's|python_extension_must_be_here||' ./doxyuser > ./doxyuser1; \ - fi; \ - echo "DOXYGEN SUPPORT STL - $(DOXYGEN_WITH_STL)"; \ - if( test "x$(DOXYGEN_WITH_STL)" = "xyes"); then \ - sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxyuser1 > ./doxyuser2; \ - mv -f doxyuser2 doxyuser1; \ - fi; \ - $(DOXYGEN) ./doxyuser1; \ - cd ..; - -usr_docs:KERNEL/main.html - if test -d "KERNEL"; then b=; else b="$(srcdir)/"; fi; \ - cp -fr $(srcdir)/KERNEL/sources/static/*.* $(DESTDIR)$(docdir); \ - cp -fr $(srcdir)/KERNEL/sources/ $(DESTDIR)$(docdir); \ - find $$b"KERNEL" -name "*.*" -exec cp -rf {} $(DESTDIR)$(docdir) ';' ; \ - cp -fr $(srcdir)/KERNEL/HTML/ $(DESTDIR)$(docdir); \ - cp -f $(srcdir)/pythfilter.py $(DESTDIR)$(docdir); \ - cp -fr $(srcdir)/KERNEL/exemple/ $(DESTDIR)$(docdir); +install-data-local: + if test -d KERNEL; then \ + $(INSTALL) -d $(DESTDIR)$(docdir)/tui ; \ + cp -rp KERNEL $(DESTDIR)$(docdir)/tui ; \ + fi; uninstall-local: -# chmod +w $(DESTDIR)$(docdir)/sources -# chmod +w $(DESTDIR)$(docdir)/sources/static -# chmod +w $(DESTDIR)$(docdir)/HTML - chmod -R +w $(DESTDIR)$(docdir) - rm -rf $(DESTDIR)$(docdir)/pythfilter.py - find $(DESTDIR)$(docdir) -name "*.html" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.jpg" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.map" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.md5" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.png" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.gif" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.css" -type f -exec rm -rf {} \; - find $(DESTDIR)$(docdir) -name "*.js*" -type f -exec rm -rf {} \; - rm -rf $(DESTDIR)$(docdir)/sources - rm -rf $(DESTDIR)$(docdir)/HTML - rm -rf $(DESTDIR)$(docdir)/exemple - rm -rf $(DESTDIR)$(docdir)/*.in + rm -rf $(DESTDIR)$(docdir)/tui/KERNEL -dev_docs: - cp -fr $(srcdir)/KERNEL/* ./INPUT; \ - cd ./INPUT; \ - pwd; ls;\ - echo "DOXYGEN SUPPORT PYTHON - $(DOXYGEN_WITH_PYTHON)"; \ - if( test "x$(DOXYGEN_WITH_PYTHON)" = "xyes"); then \ - sed 's|python_extension_must_be_here|*.py|' ./doxydev > ./doxydev1; \ - $(DOXYGEN) -u ./doxydev1; \ - else \ - sed 's|python_extension_must_be_here||' ./doxydev > ./doxydev1; \ - fi; \ - echo "DOXYGEN SUPPORT STL - $(DOXYGEN_WITH_STL)"; \ - if( test "x$(DOXYGEN_WITH_STL)" = "xyes"); then \ - sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxydev1 > ./doxydev2; \ - mv -f doxydev2 doxydev1; \ - fi; \ - $(DOXYGEN) ./doxydev1; \ - cd ..; - $(INSTALL) -d $(docdir)/tui/KERNEL; -# cp -fr KERNEL $(docdir)/tui -# cp -fr $(srcdir)/KERNEL/sources/static/*.* $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/sources/ $(docdir)/tui/KERNEL; -# cp -fr $(srcdir)/KERNEL/HTML/ $(docdir)/tui/KERNEL; -# cp -f $(srcdir)/pythfilter.py $(docdir)/tui/KERNEL; +EXTRA_DIST = static diff --git a/doc/salome/tui/doxyfile.in b/doc/salome/tui/doxyfile.in new file mode 100644 index 000000000..30541d872 --- /dev/null +++ b/doc/salome/tui/doxyfile.in @@ -0,0 +1,240 @@ +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "SALOME v.@VERSION@" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = KERNEL +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = @top_builddir@ @top_srcdir@ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = @DOXYGEN_SUPPORT_STL@ +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = YES +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = NO +GENERATE_BUGLIST = NO +GENERATE_DEPRECATEDLIST= NO +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 25 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = log.txt + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = \ + @top_srcdir@/src/DSC +FILE_PATTERNS = *.idl *.cxx *.hxx *.h *.hh *.i *c *.cc @DOXYGEN_PYTHON_EXTENSION@ +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = @srcdir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = NO +UML_LOOK = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = jpg +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = NO +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/doc/salome/tui/pythfilter.py b/doc/salome/tui/pythfilter.py deleted file mode 100644 index 4a7f180c2..000000000 --- a/doc/salome/tui/pythfilter.py +++ /dev/null @@ -1,568 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -#!/usr/bin/env python -# -import getopt -import glob -import os.path -import shutil -import string -import sys -import token -import tokenize - -from stat import * - -OUTSIDE = 0 -BUILD_COMMENT = 1 -BUILD_CLASS_DECL = 2 -BUILD_CLASS_BODY = 3 -BUILD_DEF_DECL = 4 -BUILD_DEF_BODY = 5 -IMPORT = 6 -IMPORT_OP = 7 -IMPORT_APPEND = 8 - -# Output file stream -outfile = sys.stdout - -# Output buffer -outbuffer = [] - -out_row = 0 -out_col = 0 - -# Variables used by rec_name_n_param() -name = "" -param = "" -doc_string = "" -record_state = 0 -bracket_counter = 0 - -# Tuple: (row,column) -class_spos = (0,0) -def_spos = (0,0) -import_spos = (0,0) - -# Which import was used? ("import" or "from") -import_token = "" - -# Comment block buffer -comment_block = [] -comment_finished = 0 - -# Imported modules -modules = [] - -# Program state -stateStack = [OUTSIDE] - -# Keep track of whether module has a docstring -module_has_docstring = False - -# Keep track of member protection -protection_level = "public" -private_member = False - -# Keep track of the module namespace -namespace = "" - -###################################################################### -# Output string s. '\n' may only be at the end of the string (not -# somewhere in the middle). -# -# In: s - String -# spos - Startpos -###################################################################### -def output(s,spos, immediate=0): - global outbuffer, out_row, out_col, outfile - - os = string.rjust(s,spos[1]-out_col+len(s)) - if immediate: - outfile.write(os) - else: - outbuffer.append(os) - if (s[-1:]=="\n"): - out_row = out_row+1 - out_col = 0 - else: - out_col = spos[1]+len(s) - - -###################################################################### -# Records a name and parameters. The name is either a class name or -# a function name. Then the parameter is either the base class or -# the function parameters. -# The name is stored in the global variable "name", the parameters -# in "param". -# The variable "record_state" holds the current state of this internal -# state machine. -# The recording is started by calling start_recording(). -# -# In: type, tok -###################################################################### -def rec_name_n_param(type, tok): - global record_state,name,param,doc_string,bracket_counter - s = record_state - # State 0: Do nothing. - if (s==0): - return - # State 1: Remember name. - elif (s==1): - name = tok - record_state = 2 - # State 2: Wait for opening bracket or colon - elif (s==2): - if (tok=='('): - bracket_counter = 1 - record_state=3 - if (tok==':'): record_state=4 - # State 3: Store parameter (or base class) and wait for an ending bracket - elif (s==3): - if (tok=='*' or tok=='**'): - tok='' - if (tok=='('): - bracket_counter = bracket_counter+1 - if (tok==')'): - bracket_counter = bracket_counter-1 - if bracket_counter==0: - record_state=4 - else: - param=param+tok - # State 4: Look for doc string - elif (s==4): - if (type==token.NEWLINE or type==token.INDENT or type==token.SLASHEQUAL): - return - elif (tok==":"): - return - elif (type==token.STRING): - while tok[:1]=='r' or tok[:1]=='u': - tok=tok[1:] - while tok[:1]=='"': - tok=tok[1:] - while tok[-1:]=='"': - tok=tok[:-1] - doc_string=tok - record_state=0 - -###################################################################### -# Starts the recording of a name & param part. -# The function rec_name_n_param() has to be fed with tokens. After -# the necessary tokens are fed the name and parameters can be found -# in the global variables "name" und "param". -###################################################################### -def start_recording(): - global record_state,param,name, doc_string - record_state=1 - name="" - param="" - doc_string="" - -###################################################################### -# Test if recording is finished -###################################################################### -def is_recording_finished(): - global record_state - return record_state==0 - -###################################################################### -## Gather comment block -###################################################################### -def gather_comment(type,tok,spos): - global comment_block,comment_finished - if (type!=tokenize.COMMENT): - comment_finished = 1 - else: - # Output old comment block if a new one is started. - if (comment_finished): - print_comment(spos) - comment_finished=0 - if (tok[0:2]=="##" and tok[0:3]!="###"): - comment_block.append(tok[2:]) - -###################################################################### -## Output comment block and empty buffer. -###################################################################### -def print_comment(spos): - global comment_block,comment_finished - if (comment_block!=[]): - output("/**\n",spos) - for c in comment_block: - output(c,spos) - output("*/\n",spos) - comment_block = [] - comment_finished = 0 - -###################################################################### -def set_state(s): - global stateStack - stateStack[len(stateStack)-1]=s - -###################################################################### -def get_state(): - global stateStack - return stateStack[len(stateStack)-1] - -###################################################################### -def push_state(s): - global stateStack - stateStack.append(s) - -###################################################################### -def pop_state(): - global stateStack - stateStack.pop() - - -###################################################################### -def tok_eater(type, tok, spos, epos, line): - global stateStack,name,param,class_spos,def_spos,import_spos - global doc_string, modules, import_token, module_has_docstring - global protection_level, private_member - - rec_name_n_param(type,tok) - if (string.replace(string.strip(tok)," ","")=="##private:"): - protection_level = "private" - output("private:\n",spos) - elif (string.replace(string.strip(tok)," ","")=="##protected:"): - protection_level = "protected" - output("protected:\n",spos) - elif (string.replace(string.strip(tok)," ","")=="##public:"): - protection_level = "public" - output("public:\n",spos) - else: - gather_comment(type,tok,spos) - - state = get_state() - -# sys.stderr.write("%d: %s\n"%(state, tok)) - - # OUTSIDE - if (state==OUTSIDE): - if (tok=="class"): - start_recording() - class_spos = spos - push_state(BUILD_CLASS_DECL) - elif (tok=="def"): - start_recording() - def_spos = spos - push_state(BUILD_DEF_DECL) - elif (tok=="import") or (tok=="from"): - import_token = tok - import_spos = spos - modules = [] - push_state(IMPORT) - elif (spos[1] == 0 and tok[:3] == '"""'): - # Capture module docstring as namespace documentation - module_has_docstring = True - #comment_block.append("\\namespace %s\n" % namespace) - comment_block.append(tok[3:-3]) - print_comment(spos) - - # IMPORT - elif (state==IMPORT): - if (type==token.NAME): - modules.append(tok) - set_state(IMPORT_OP) - # IMPORT_OP - elif (state==IMPORT_OP): - if (tok=="."): - set_state(IMPORT_APPEND) - elif (tok==","): - set_state(IMPORT) - else: - for m in modules: - output('#include "'+m.replace('.',os.sep)+'.py"\n', import_spos, immediate=1) - if import_token=="from": - output('using namespace '+m.replace('.', '::')+';\n', import_spos) - pop_state() - # IMPORT_APPEND - elif (state==IMPORT_APPEND): - if (type==token.NAME): - modules[len(modules)-1]+="."+tok - set_state(IMPORT_OP) - # BUILD_CLASS_DECL - elif (state==BUILD_CLASS_DECL): - if (is_recording_finished()): - s = "class "+name - if (param!=""): s = s+" : public "+param.replace('.','::') - if (doc_string!=""): comment_block.append(doc_string) - print_comment(class_spos) - output(s+"\n",class_spos) - output("{\n",(class_spos[0]+1,class_spos[1])) - protection_level = "public" - output(" public:\n",(class_spos[0]+2,class_spos[1])) - set_state(BUILD_CLASS_BODY) - # BUILD_CLASS_BODY - elif (state==BUILD_CLASS_BODY): - if (type!=token.INDENT and type!=token.NEWLINE and type!=40 and - type!=tokenize.NL and type!=tokenize.COMMENT and - (spos[1]<=class_spos[1])): - output("}; // end of class\n",(out_row+1,class_spos[1])) - pop_state() - elif (tok=="def"): - start_recording() - def_spos = spos - push_state(BUILD_DEF_DECL) - # BUILD_DEF_DECL - elif (state==BUILD_DEF_DECL): - if (is_recording_finished()): - s = '' - # Do we document a class method? then remove the 'self' parameter - if BUILD_CLASS_BODY in stateStack: - params = param.split(",") - if params[0] == 'self': - param = string.join(params[1:], ",") - else: - s = 'static ' - if params[0] == 'cls': - param = string.join(params[1:], ",") - s = s+name+"("+param+");\n" - if len(name) > 1 \ - and name[0:2] == '__' \ - and name[len(name)-2:len(name)] != '__' \ - and protection_level != 'private': - private_member = True - output(" private:\n",(def_spos[0]+2,def_spos[1])) - else: - s = name+"("+param+");\n" - if (doc_string!=""): comment_block.append(doc_string) - print_comment(def_spos) - output(s,def_spos) -# output("{\n",(def_spos[0]+1,def_spos[1])) - set_state(BUILD_DEF_BODY) - # BUILD_DEF_BODY - elif (state==BUILD_DEF_BODY): - if (type!=token.INDENT and type!=token.NEWLINE \ - and type!=40 and type!=tokenize.NL \ - and (spos[1]<=def_spos[1])): -# output("} // end of method/function\n",(out_row+1,def_spos[1])) - if private_member and protection_level != 'private': - private_member = False - output(" " + protection_level + ":\n",(def_spos[0]+2,def_spos[1])) - pop_state() -# else: -# output(tok,spos) - - -def dump(filename): - f = open(filename) - r = f.readlines() - for s in r: - sys.stdout.write(s) - -def filter(filename): - global name, module_has_docstring - global namespace,outbuffer - outbuffer=[] - - path,name = os.path.split(filename) - root,ext = os.path.splitext(name) - - - if namespace: - if root == "__init__": - root=namespace - else: - root=namespace+"::"+root - else: - root=root - - output("namespace "+root+" {\n",(0,0)) - - # set module name for tok_eater to use if there's a module doc string - package=namespace - name = root - namespace = root - - sys.stderr.write("namespace: "+namespace+'\n') - sys.stderr.write("root: "+root+'\n') - sys.stderr.write('Filtering "'+filename+'"...') - - f = open(filename) - tokenize.tokenize(f.readline, tok_eater) - f.close() - print_comment((0,0)) - - output("\n",(0,0)) - output("} // end of namespace\n",(0,0)) - - if not module_has_docstring: - # Put in default namespace documentation - output('/** \\namespace '+root+' \n',(0,0)) - output(' \\brief Module "%s" */\n'%(root),(0,0)) - - for s in outbuffer: - outfile.write(s) - namespace=package - module_has_docstring = False - - -def filterFile(filename, out=sys.stdout): - global outfile - - outfile = out - - try: - root,ext = os.path.splitext(filename) - - if ext==".py": - filter(filename) - else: - dump(filename) - - sys.stderr.write("OK\n") - except IOError,e: - sys.stderr.write(e[1]+"\n") - - -###################################################################### - -# preparePath -def preparePath(path): - """Prepare a path. - - Checks if the path exists and creates it if it does not exist. - """ - if not os.path.exists(path): - parent = os.path.dirname(path) - if parent!="": - preparePath(parent) - os.mkdir(path) - -# isNewer -def isNewer(file1,file2): - """Check if file1 is newer than file2. - - file1 must be an existing file. - """ - if not os.path.exists(file2): - return True - return os.stat(file1)[ST_MTIME]>os.stat(file2)[ST_MTIME] - -# convert -def convert(srcpath, destpath): - """Convert a Python source tree into a C+ stub tree. - - All *.py files in srcpath (including sub-directories) are filtered - and written to destpath. If destpath exists, only the files - that have been modified are filtered again. Files that were deleted - from srcpath are also deleted in destpath if they are still present. - The function returns the number of processed *.py files. - """ - global namespace - count=0 - l=os.listdir(srcpath) - if "__init__.py" in l: - if namespace: - namespace=namespace+"::"+os.path.split(srcpath)[1] - else: - namespace=os.path.split(srcpath)[1] - print "It's a package:",namespace - sp = os.path.join(srcpath,"*") - sfiles = glob.glob(sp) - dp = os.path.join(destpath,"*") - dfiles = glob.glob(dp) - leftovers={} - for df in dfiles: - leftovers[os.path.basename(df)]=1 - - for srcfile in sfiles: - basename = os.path.basename(srcfile) - if basename in leftovers: - del leftovers[basename] - - # Is it a subdirectory? - if os.path.isdir(srcfile): - package=namespace - sdir = os.path.join(srcpath,basename) - ddir = os.path.join(destpath,basename) - count+=convert(sdir, ddir) - namespace=package - continue - # Check the extension (only *.py will be converted) - root, ext = os.path.splitext(srcfile) - if ext.lower()!=".py": - continue - - destfile = os.path.join(destpath,basename) - if destfile==srcfile: - print "WARNING: Input and output names are identical!" - sys.exit(1) - - count+=1 -# sys.stdout.write("%s\015"%(srcfile)) - - if isNewer(srcfile, destfile): - preparePath(os.path.dirname(destfile)) - out=open(destfile,"w") - filterFile(srcfile, out) - out.close() -# os.system("python %s -f %s>%s"%(sys.argv[0],srcfile,destfile)) - - # Delete obsolete files in destpath - for df in leftovers: - dname=os.path.join(destpath,df) - if os.path.isdir(dname): - try: - shutil.rmtree(dname) - except: - print "Can't remove obsolete directory '%s'"%dname - else: - try: - os.remove(dname) - except: - print "Can't remove obsolete file '%s'"%dname - - return count - - -###################################################################### -###################################################################### -###################################################################### - -filter_file = False - -try: - opts, args = getopt.getopt(sys.argv[1:], "hf", ["help"]) -except getopt.GetoptError,e: - print e - sys.exit(1) - -for o,a in opts: - if o=="-f": - filter_file = True - -if filter_file: - # Filter the specified file and print the result to stdout - filename = string.join(args) - filterFile(filename) -else: - - if len(args)!=2: - sys.stderr.write("%s options input output\n"%(os.path.basename(sys.argv[0]))) - sys.exit(1) - - # Filter an entire Python source tree - print '"%s" -> "%s"\n'%(args[0],args[1]) - c=convert(args[0],args[1]) - print "%d files"%(c) diff --git a/doc/salome/tui/static/footer.html b/doc/salome/tui/static/footer.html new file mode 100755 index 000000000..56d52a61a --- /dev/null +++ b/doc/salome/tui/static/footer.html @@ -0,0 +1,10 @@ + + + + + +
    +
    Copyright © 2003-2007 CEA, EDF
    +
    + + diff --git a/doc/salome/tui/static/header.html b/doc/salome/tui/static/header.html new file mode 100755 index 000000000..bddc997ec --- /dev/null +++ b/doc/salome/tui/static/header.html @@ -0,0 +1,13 @@ + + + + + $title + + + +
    +
    +SALOME documentation central +
    +
    diff --git a/doc/salome/unittests.dox b/doc/salome/unittests.dox index fc5ebdd47..199a0a392 100644 --- a/doc/salome/unittests.dox +++ b/doc/salome/unittests.dox @@ -10,60 +10,57 @@ the unit tests. \section S1_unit SALOME KERNEL source code structuration -
      -
    1. General structure of KERNEL_SRC +\subsection sub11 General structure of KERNEL_SRC -- KERNEL_SRC : +- KERNEL_SRC :\n Some README files and configuration tools for build -- KERNEL_SRC/adm_local : +- KERNEL_SRC/adm_local :\n Part of the configuration files, other modules have a directory with the same name. Not used in KERNEL. -- KERNEL_SRC/bin : +- KERNEL_SRC/bin :\n Python and shell scripts used at run time. Kit to install a %SALOME Application. -- KERNEL_SRC/doc : +- KERNEL_SRC/doc :\n Kit for KERNEL end user documentation production: public interfaces, Python, CORBA. Integrator and Developper documentation. -- KERNEL_SRC/idl : +- KERNEL_SRC/idl :\n All CORBA interfaces from KERNEL are regrouped here. -- KERNEL_SRC/resources : +- KERNEL_SRC/resources :\n Configuration files for servers (examples). Interfaces definitions for KERNEL test components. -- KERNEL_SRC/salome_adm : +- KERNEL_SRC/salome_adm :\n Configuration files used by autotools (M4 macros & co.) -- KERNEL_SRC/src : +- KERNEL_SRC/src :\n The source code (C++ and Python) -
    2. -
    3. -Directory src: C++ and Python source code +\subsection sub12 Directory src: C++ and Python source code
      1. Basic services non related to CORBA -- Basics +- Basics\n %A set of general purpose C++ services, not related to CORBA. Some general purpose services that are in Utils directory (CORBA related), are progressivley moved here, as they are not related to CORBA. -- SALOMELocalTrace +- SALOMELocalTrace\n %A multithread trace system that allows message tracing on standard error or a file. -- CASCatch +- CASCatch\n Exceptions and signal handler. -- HDFPersist +- HDFPersist\n %A C++ interface to HDF.
      2. @@ -71,22 +68,22 @@ the unit tests.
      3. Basic CORBA services -- Logger : +- Logger :\n %A CORBA %server that collects the trace messages from differents CORBA process. -- SALOMETraceCollector : +- SALOMETraceCollector :\n %A multithread trace system derived from SALOMELocalTrace, that sends messages to Logger %server via CORBA. -- Utils : +- Utils :\n %A set of general purpose services related to CORBA, such as basic CORBA exception system. See also Basics directory above. -- NamingService : +- NamingService :\n C++ and Python interfaces to name, store and retrieve CORBA objects -- GenericObj : +- GenericObj :\n %A generic CORBA interface for CORBA objects, to count distributed references, and to allow destruction by client. @@ -94,21 +91,21 @@ the unit tests.
      4. Miscellaneous CORBA servers -- %Registry : +- %Registry :\n Implements SALOME_registry.idl. Provides a CORBA %server library and a separate %server program. -- ModuleCatalog : +- ModuleCatalog :\n Implements SALOME_moduleCatalog.idl. Provide a CORBA %server library and separate %server and client programs. -- ModuleGenerator : +- ModuleGenerator :\n Tool to generate a module catalog from CORBA idl -- ResourcesManager : +- ResourcesManager :\n library included in container %server -- Notification : +- Notification :\n library included in differents servers (container) - NOTIFICATION_SWIG @@ -137,7 +134,7 @@ the unit tests. - SALOMEDSImpl -- SALOMEDS +- %SALOMEDS
      5. @@ -182,7 +179,7 @@ the unit tests. \section S2_unit Tools and principles used for Unit testing -**TO BE COMPLETED** +TO BE COMPLETED Unit Testing rely on cppunit package for C++ testing, and on unittest module for Python. See these products for general principles of unit testing. diff --git a/doc/txt2html.sh b/doc/txt2html.sh deleted file mode 100755 index cfaff46ad..000000000 --- a/doc/txt2html.sh +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -#/bin/sh -# =================================================================== -# This shell script is provided for generating the html files -# from the txt files (restructured text) in the source directory. -# Usage: just execute the script where it stands in the source -# directory. The file list has to be updated manually when adding -# a new restructured text file. -# Note that the building process executes a target rstdoc that -# generates the html documentation without need of this script. -# The autoconficuration (check_htmlgen.m4) set the correct generator -# rst2html by replacing the @RST2HTML@ tag. -# =================================================================== -# (CSSI - gboulant - 25/10/05) -# This must be updated manually in this script (for source usage only) -# -RST2HTML=rst2html - -FILELIST="index - UnitTests - SALOME_Application - INSTALL - kernel_resources - userguide" - -STYLESHEET=rst.css -RSTOPTS="--output-encoding=latin1 --stylesheet=$STYLESHEET" - -for file in $FILELIST; do - bfn=`basename $file .txt` - echo "Generating ${bfn}.html from ${bfn}.txt ..." - $RST2HTML $RSTOPTS ${bfn}.txt ${bfn}.html -done - diff --git a/idl/Calcium_Ports.idl b/idl/Calcium_Ports.idl index cce57e90f..9f1096498 100644 --- a/idl/Calcium_Ports.idl +++ b/idl/Calcium_Ports.idl @@ -19,7 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SALOME_Ports.idl +// File : Calcium_Ports.idl // Author : Eric Fayolle, EDF // #ifndef _CALCIUM_PORTS_IDL_ @@ -27,8 +27,13 @@ #include "SALOME_Ports.idl" +/*! \file Calcium_Ports.idl \brief interfaces for Calcium ports +*/ + module Ports { +/*! \brief module that contains interfaces to define Calcium ports +*/ module Calcium_Ports { const long UNLIMITED_STORAGE_LEVEL = -70; diff --git a/idl/DSC_Engines.idl b/idl/DSC_Engines.idl index 5d42e6693..cbe349e27 100644 --- a/idl/DSC_Engines.idl +++ b/idl/DSC_Engines.idl @@ -29,9 +29,8 @@ #include "SALOME_Component.idl" #include "SALOME_Ports.idl" -/*! \file - This is a package that contains IDL interfaces that permits to add - a dynamic port model to the SALOME object model. +/*! \file DSC_Engines.idl + \brief interfaces that permits to add a dynamic port model to the SALOME object model. */ module Engines { @@ -63,6 +62,7 @@ module Engines { /*--------------------------------------------------------------------------------------------*/ /*-------------------------------------- Types Part ------------------------------------------*/ + //! a uses port /*! This sequence is a uses port. It's a sequence since a uses port can be connected with x provides port. Sometimes this kind of uses port is called multiple port. @@ -71,33 +71,25 @@ module Engines { */ typedef sequence uses_port; + //! This enumeration is used when the connection of a port (uses or provides) is changed. /*! - This enumeration is used when the connection of a port (uses or provides) - is changed. This information is for the component's user code. + This information is for the component's user code. */ enum Message {AddingConnection, RemovingConnection, ApplicationError}; - /*! - This exception is raised when a port's name is gived before - it is added to the component. - */ + //! This exception is raised when a port is used before it is added to the component. exception PortNotDefined {}; - /*! - This exception is raised if you try to add a port with the same - name than a previous defined port. - */ + //! This exception is raised if you try to add a port with the same name than a previous defined port. exception PortAlreadyDefined {}; - /*! - This exception is raised when you try to use a port that is not connected. - */ + //! This exception is raised when you try to use a port that is not connected. exception PortNotConnected {}; + //! This exception is raised if the type of the provides port is bad. /*! - This exception is raised if the type of the provides port is bad. This exception contains a string that gives what type is expected and the type that the operation received. */ @@ -106,27 +98,21 @@ module Engines { string received; }; - /*! - Port's reference is Nil ! - */ + //! Port's reference is Nil ! exception NilPort {}; - /*! - Port's reference is not the right reference. - */ + //! Port's reference is not the right reference. exception BadPortReference {}; - /*! - Object porperty is not good for the port - */ + //! Object property is not good for the port exception BadProperty {}; /*--------------------------------------------------------------------------------------------*/ /*-------------------------------------- Operation Part --------------------------------------*/ + //! This operation adds a provides port to the component. /*! - This operation adds a provides port to the component. \param ref port's Corba reference. \param provides_port_name port's name. @@ -146,8 +132,8 @@ module Engines { NilPort, BadProperty); + //! This operation adds a uses port to the component. /*! - This operation adds a uses port to the component. \param repository_id port's Corba repository id. Eg : IDL:toto.tata/MODULE/INTERFACE_NAME:1.0 @@ -166,8 +152,8 @@ module Engines { in Ports::PortProperties port_prop) raises(PortAlreadyDefined, BadProperty); + //! Get a provides port of the component. /*! - This operation is used to get a provides port of the component. It can be used by the framework or the component himself. If it's the framework that wants the port, the reference has to be gived @@ -191,8 +177,8 @@ module Engines { PortNotConnected, BadPortType); + //! Get a uses port of the component. /*! - This operation is used to get a uses port of the component. It can be used by the framework or the component himself. Actually, only the user layer of the component will use this operation. A uses port could be obtained if and only if the uses port is connected. The sequence @@ -215,8 +201,8 @@ module Engines { BadPortType); + //! Connect a provides port with a uses port. /*! - This operation connects a provides port with a uses port. \param provides_port_name provides port's name. @@ -226,8 +212,8 @@ module Engines { */ void connect_provides_port(in string provides_port_name) raises(PortNotDefined); + //! Connect a uses port with a provides port. /*! - This operation connects a uses port with a provides port. \param uses_port_name uses port's name. \param provides_port_ref provides port's Corba reference. @@ -240,9 +226,10 @@ module Engines { in Ports::Port provides_port_ref) raises(PortNotDefined, BadPortType, NilPort); + + //! Check if a port is connected. /*! - This operation tests if a port is connected. You can test - a uses port or a provides port. + You can test a uses port or a provides port. \param port_name port's name. \return true if the uses port is connected. @@ -251,8 +238,8 @@ module Engines { */ boolean is_connected(in string port_name) raises(PortNotDefined); + //! Disconnect a uses port from a provides port. /*! - This operation disconnects a uses port to a provides port. \param provides_port_name provides port's name. \param message state associated with the disconnection. @@ -264,8 +251,8 @@ module Engines { in Engines::DSC::Message message) raises(PortNotDefined, PortNotConnected); + //! Disconnect a provides port from a uses port. /*! - This operation disconnects a provides port to a uses port. \param uses_port_name uses port's name. \param provides_port_ref CORBA reference of the provides port. @@ -280,8 +267,8 @@ module Engines { in Engines::DSC::Message message) raises(PortNotDefined, PortNotConnected, BadPortReference); + //! Get port's property object. /*! - This operation permits to get port's property object. \param port_name port's name. \return properties object's CORBA reference. @@ -298,18 +285,14 @@ module Engines { */ interface ConnectionManager { - /*! - The Id gived to the disconnect method is bad. - */ + //! The Id given to the disconnect method is bad. exception BadId {}; - /*! - A connection Id. It's unique. - */ + //! A connection Id. It's unique. typedef short connectionId; + //! Connect a uses port with a provides port. /*! - This operation connects a uses port with a provides port. \param uses_component The component that have the uses port. \param uses_port_name uses port's name. @@ -331,9 +314,8 @@ module Engines { Engines::DSC::BadPortType, Engines::DSC::NilPort); + //! Release a connection that has been previously created by the ConnectionManager. /*! - This operation releases a connection that has been previously created by - the ConnectionManager. \param id The id of the connection previously gived by the connect operation of the ConnectionManager. @@ -347,14 +329,10 @@ module Engines { Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference); - /*! - Shutdown the ConnectionManager process. - */ + //! Shutdown the ConnectionManager process. oneway void ShutdownWithExit(); - /*! - Returns the PID of the connection manager - */ + //! Return the PID of the connection manager long getPID(); }; @@ -368,9 +346,10 @@ module Engines { */ interface Superv_Component : Engines::DSC { + //! Operation to create the service ports before it is executed /*! The SUPERV module call this method before starting the service. Thus the service - can add is dynamics ports before it is started. + can add its dynamics ports before it is started. \param service_name service's name. \return true if the service is correctly initialised. diff --git a/idl/Logger.idl b/idl/Logger.idl index e69d5f2dd..91a0234c2 100644 --- a/idl/Logger.idl +++ b/idl/Logger.idl @@ -26,14 +26,26 @@ #define SALOME_LOGGER_IDL #pragma prefix "opencascade.com" +/*! \file Logger.idl \brief interfaces for %SALOME logger +*/ +/*! \brief module that provides interface to %SALOME logger +*/ module SALOME_Logger { +/*! \brief interface to use the %SALOME logger +*/ interface Logger { - //put message into one special place for all servers using Logger + /*! \brief put message into one special place for all servers using %SALOME logger + + \param message the message to send + */ oneway void putMessage (in string message); + + //! check if the logger is running void ping (); + //! shutdown the logger server void shutdown(); }; }; diff --git a/idl/Palm_Ports.idl b/idl/Palm_Ports.idl index 062d0bb5f..46223d805 100644 --- a/idl/Palm_Ports.idl +++ b/idl/Palm_Ports.idl @@ -19,7 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SALOME_Ports.idl +// File : Palm_Ports.idl // Author : André RIBES, EDF // #ifndef _PALM_PORTS_IDL_ @@ -27,8 +27,8 @@ #include "SALOME_Ports.idl" -/*! \file - This file contains IDL palm ports declations. +/*! \file Palm_Ports.idl + \brief This file contains IDL palm ports declarations. */ module Ports { @@ -39,8 +39,7 @@ module Ports { */ interface Palm_Data_Short_Port : Ports::Data_Port { - /*! - This operation permits to transmit a short. + /*! \brief This operation permits to transmit a short. \param data the short transmitted. \param time time associated to the short. @@ -57,8 +56,7 @@ module Ports { /*! \brief Interface of a sequence of short port. */ interface Palm_Data_Seq_Short_Port : Ports::Data_Port { - /*! - This operation permits to transmit a sequence of short. + /*! \brief This operation permits to transmit a sequence of short. \param data the sequence transmitted. \param time time associated to the data. diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index 9c2877937..80b69b51a 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -23,8 +23,7 @@ // Author : Yves FRICAUD // $Header$ // -/*! - \file SALOMEDS.idl This file contains a set of interfaces used for creation, managment +/*! \file SALOMEDS.idl \brief This file contains a set of interfaces used for creation, management and modification of the %Study */ @@ -34,49 +33,43 @@ #include "SALOME_Exception.idl" #include "SALOME_GenericObj.idl" -/*! +/*! \brief This package contains the interfaces used for creation, managment and modification of the %Study */ module SALOMEDS { -/*! \typedef URL - Name of the file in which the %Study is saved. - +/*! \brief Name of the file in which the %Study is saved. */ typedef string URL; -/*! Main identifier of an object in %SALOME application +/*! \brief Main identifier of an object in %SALOME application */ typedef string ID; -/*! While saving the data, IOR is transformed into persistent reference +/*! \brief While saving the data, IOR is transformed into persistent reference */ typedef string PersistentReference; -/*! IOR of the study in %SALOME application +/*! \brief IOR of the study in %SALOME application */ typedef string SalomeReference; -/*! List of the names of studies which are currently open in this %SALOME session. +/*! \brief List of the names of studies which are currently open in this %SALOME session. + Since %SALOME is a multi-study application, it allows to open a lot of studies during each working session. */ typedef sequence ListOfOpenStudies; -/*! List of file names -*/ +//! List of file names typedef sequence ListOfFileNames; -/*! List of modification dates of a study -*/ +//! List of modification dates of a study typedef sequence ListOfDates ; -/*! An unbounded sequence of strings -*/ +//! An unbounded sequence of strings typedef sequence ListOfStrings ; -/*! An unbounded sequence of sequence of strings -*/ +//! An unbounded sequence of sequence of strings typedef sequence ListOfListOfStrings ; -/*! A byte stream which is used for binary data transfer between different components -*/ +//! A byte stream which is used for binary data transfer between different components typedef sequence TMPFile; // Reference to other objects is treated with function AddReference @@ -100,12 +93,10 @@ during each working session. interface UseCaseIterator; interface UseCaseBuilder; -/*! List of attributes of %SObjects -*/ +//! List of attributes of %SObjects typedef sequence ListOfAttributes; -/*! Exception indicating that this feature hasn't been implemented in %SALOME PRO application. -*/ +//! Exception indicating that this feature hasn't been implemented in %SALOME application. exception NotImplemented {}; @@ -128,19 +119,21 @@ during each working session. interface Study { +//! Invalid study context exception StudyInvalidContext {}; +//! Invalid study component exception StudyInvalidComponent {}; -/*! Invalid directory of the %study exception -*/ +//! Invalid directory of the %study exception exception StudyInvalidDirectory {}; -/*! Exception pointing that this name of the study has already been used. -*/ +//! Exception pointing that this name of the study has already been used. exception StudyNameAlreadyUsed {}; +//! study object already exists exception StudyObjectAlreadyExists {}; -/*! Invalid name of the %study exception -*/ +//! Invalid name of the %study exception exception StudyNameError {}; +//! Invalid study comment exception StudyCommentError {}; + /*! \brief The name of the %Study This is equivalent to the methods setName() & getName() @@ -151,139 +144,123 @@ during each working session. This is equivalent to the methods setID() & getID() */ attribute short StudyId; -/*! Sequence containing %SObjects -*/ +//! Sequence containing %SObjects typedef sequence ListOfSObject; -/*! - Gets the persistent reference to the %Study. -*/ +//! Get the persistent reference to the %Study. PersistentReference GetPersistentReference(); -/*! - Gets a transient reference to the %Study. -*/ +//! Get a transient reference to the %Study. SalomeReference GetTransientReference(); -/*! - Returns True if the %Study is empty +/*! \brief indicate whether the %Study is empty + + \return True if the %Study is empty */ boolean IsEmpty(); -/*! - Allows to find a %SComponent by its name. +/*! \brief Find a %SComponent by its name. + \param aComponentName It's a string value in the Comment Attribute of the Component, which is looked for, defining the data type of this Component. -
        See also
        an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. + */ SComponent FindComponent (in string aComponentName); -/*! - Allows to find a %SComponent by ID of the according %SObject + +/*! \brief Find a %SComponent by ID of the according %SObject */ SComponent FindComponentID(in ID aComponentID); -/*! - Allows to find a %SObject by the Name Attribute of this %SObject +/*! \brief Find a %SObject by the Name Attribute of this %SObject \param anObjectName String parameter defining the name of the object \return The obtained %SObject -
        See also an example of this method usage in batchmode of %SALOME application. - +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ SObject FindObject (in string anObjectName); -/*! - Allows to find a %SObject by its ID +/*! \brief Find a %SObject by its ID + \param aObjectID This parameter defines the ID of the required object \return The obtained %SObject - */ SObject FindObjectID (in ID aObjectID); -/*! - Allows to create a %SObject by its ID +/*! \brief Create a %SObject by its ID + \param aObjectID This parameter defines the ID of the required object \return The created %SObject - */ SObject CreateObjectID (in ID aObjectID); -/*! - Allows to find a %SObject by IOR of the object belonging to this %SObject. +/*! \brief Find a %SObject by IOR of the object belonging to this %SObject. + \param anObjectName This parameter defines the IOR of the object \return The obtained %SObject - */ SObject FindObjectIOR (in ID aObjectIOR); -/*! - Finds in the study all %SObjects produced by a given %Component. +/*! \brief Find in the study all %SObjects produced by a given %Component. + \param anObjectName The Name Attribute of the searched %SObjects should correspond to anObjectName. \param aComponentName The name of the component, which objects are searched for. */ ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName); -/*! - Allows to find a %SObject by the path to it. +/*! \brief Find a %SObject by the path to it. \param thePath The path to the required %SObject. \return The obtained %SObject. - */ SObject FindObjectByPath(in string thePath); -/*! - Returns the path to the %SObject. +/*! \brief Get the path to the %SObject. */ string GetObjectPath(in Object theObject); -/*! - Sets the context of the %Study. - \param thePath String parameter defining the context of the study. +/*! \brief Set the context of the %Study. -
        See also an example of this method usage in batchmode of %SALOME application. + \param thePath String parameter defining the context of the study. +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ void SetContext(in string thePath); -/*! - Gets the context of the %Study. +/*! \brief Get the context of the %Study. -
        See also an example of this method usage in batchmode of %SALOME application. - +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ string GetContext(); -/*! - Returns a list of names of objects corresponding to the context. +/*! \brief Get a list of names of objects corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetObjectNames(in string theContext); -/*! - Returns a list of names of directories and subdirectories corresponding to the context. +/*! \brief Get a list of names of directories and subdirectories corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetDirectoryNames(in string theContext); -/*! - Returns a list of names of Files corresponding to the context. +/*! \brief Get a list of names of Files corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetFileNames(in string theContext); -/*! - Returns a list of names of Components corresponding to the context. +/*! \brief Get a list of names of Components corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetComponentNames(in string theContext); -/*! - Creates a new iterator of child levels of the given %SObject. +/*! \brief Create a new iterator of child levels of the given %SObject. + \param aSO The given %SObject \return A new iterator of child levels of the given %SObject. */ ChildIterator NewChildIterator(in SObject aSO); -/*! - Creates a new iterator of the %SComponents. +/*! \brief Create a new iterator of the %SComponents. \return A new iterator of the %SComponents. */ SComponentIterator NewComponentIterator(); -/*! - Creates a new %StudyBuilder to add or modify an object in the study. - \return A new %StudyBuilder. +/*! \brief Create a new %StudyBuilder to add or modify an object in the study. -
        See also an example of this method usage in batchmode of %SALOME application. + \return A new %StudyBuilder. +See \ref example20 for an example of this method usage in batchmode of %SALOME application. */ StudyBuilder NewBuilder() ; /*! \brief Labels dependency @@ -294,28 +271,26 @@ during each working session. /*! \brief Getting properties of the study - Returns the attriubte, which contains the properties of this study. + Returns the attribute, which contains the properties of this study. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example20 for an example of this method usage in batchmode of %SALOME application. */ AttributeStudyProperties GetProperties(); -/*! - Determines whether the %study has been saved +/*! \brief Indicate whether the %study has been saved */ attribute boolean IsSaved; -/*! +/*! \brief Indicate whether the %study has been modified and not saved. + Returns True if the %study has been modified and not saved. */ boolean IsModified(); -/*! - Marks the %study as being modified and not saved. +/*! \brief Mark the %study as being modified and not saved. */ void Modified(); -/*! - Determines the file where the %study has been saved +/*! \brief Indicate the file where the %study has been saved */ attribute string URL; @@ -348,18 +323,15 @@ during each working session. \return An object */ Object ConvertIORToObject(in string theIOR); -/*! - Gets a new %UseCaseBuilder. +/*! \brief Get a new %UseCaseBuilder. */ UseCaseBuilder GetUseCaseBuilder(); -/*! - Closes the components in the study, removes itself from the %StudyManager. +/*! \brief Close the components in the study, remove itself from the %StudyManager. */ void Close(); -/*! - Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case. +/*! \brief Enable (if isEnabled = True)/disable automatic addition of new %SObjects to the use case. */ void EnableUseCaseAutoFilling(in boolean isEnabled); @@ -376,15 +348,15 @@ during each working session. boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished); -/*! - Returns an AttributeParameter used to store common parameters for given %theSavePoint. +/*! \brief Get an AttributeParameter used to store common parameters for given %theSavePoint. + \param theID identifies a common parameters set (Example: "Interface Applicative") \param theSavePoint is number of a set of parameters as there can be several sets */ AttributeParameter GetCommonParameters(in string theID, in long theSavePoint); -/*! - Returns an AttributeParameter used to store parameters for given %theModuleName. +/*! \brief Get an AttributeParameter used to store parameters for given %theModuleName. + \param theID identifies a common parameters set (Example: "Interface Applicative") \param theModuleName is a name of the module (Example: "Geometry") \param theSavePoint is number of a set of parameters as there can be several sets @@ -392,8 +364,8 @@ during each working session. AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint); -/*! - Returns a default Python script to restore visual parameters for given %theModuleName. +/*! \brief Get a default Python script to restore visual parameters for given %theModuleName. + \param theID identifies a common parameters set (Example: "Interface Applicative") \param theModuleName is a name of the module (Example: "Geometry") */ @@ -408,101 +380,106 @@ during each working session. long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal); -/*! - Marks this Study as being locked by the given locker. The lock status can be checked by method IsStudyLocked +/*! \brief Mark this Study as being locked by the given locker. + + The lock status can be checked by method IsStudyLocked \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that locks the study. */ void SetStudyLock(in string theLockerID); -/*! - Returns True if the Study was marked locked. +/*! \brief Indicate if the Study is locked + + Returns True if the Study was marked locked. */ boolean IsStudyLocked(); -/*! - Marks this Study as being unlocked by the given locker. The lock status can be checked by method IsStudyLocked +/*! \brief Mark this Study as being unlocked by the given locker. + + The lock status can be checked by method IsStudyLocked \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that unlocks the study. */ void UnLockStudy(in string theLockerID); -/*! - Returns the list iof IDs of the Study's lockers. +/*! \brief Get the list of IDs of the Study's lockers. */ ListOfStrings GetLockerID(); -/*! - Create real variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create real variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetReal( in string theVarName, in double theValue ); -/*! - Create integer variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create integer variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetInteger( in string theVarName, in long theValue ); -/*! - Create boolean variable with Name theVarName value theValue - (or set if variable value in to theValue already exists) +/*! \brief Create boolean variable with Name theVarName and value theValue + + (or set if variable value into theValue already exists) \param theVarName is a name of the variable \param theVarName is a value of the variable. */ void SetBoolean( in string theVarName, in boolean theValue ); -/*! - Return real value of the variable +/*! \brief Get value of a real variable + \param theVarName is a name of the variable. */ double GetReal( in string theVarName ); -/*! - Return integer value of the variable +/*! \brief Get value of an integer variable + \param theVarName is a name of the variable. */ long GetInteger( in string theVarName ); -/*! - Return boolean value of the variable +/*! \brief Get value of a boolean variable + \param theVarName is a name of the variable. */ boolean GetBoolean( in string theVarName ); -/*! +/*! \brief Indicate if a variable is real + Return true if variable is real otherwise return false. \param theVarName is a name of the variable. */ boolean IsReal( in string theVarName ); -/*! +/*! \brief Indicate if a variable is integer + Return true if variable is integer otherwise return false. \param theVarName is a name of the variable. */ boolean IsInteger( in string theVarName ); -/*! +/*! \brief Indicate if a variable is boolean + Return true if variable is boolean otherwise return false. \param theVarName is a name of the variable. */ boolean IsBoolean( in string theVarName ); -/*! +/*! \brief Indicate if a variable exists in the study + Return true if variable exists in the study, otherwise return false. \param theVarName is a name of the variable. */ boolean IsVariable( in string theVarName ); -/*! - Return names of all variables from the study. +/*! \brief Get names of all variables from the study. */ ListOfStrings GetVariableNames(); -/*! \brief Removing variable +/*! \brief Remove a variable Remove variable with the specified name from the study with substitution of its value. @@ -511,7 +488,7 @@ during each working session. */ boolean RemoveVariable( in string theVarName ); -/*! \brief Renaming variable +/*! \brief Rename a variable Rename variable with the specified name within the study. @@ -521,7 +498,7 @@ during each working session. */ boolean RenameVariable( in string theVarName, in string theNewVarName ); -/*! \brief Checking variable usage +/*! \brief Indicate whether variable is used Check that variable is used in the study. @@ -564,7 +541,7 @@ during each working session. Creates a new %SComponent \param ComponentDataType Data type of the %SComponent which will be created. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ SComponent NewComponent(in string ComponentDataType) raises(LockProtection); @@ -587,7 +564,7 @@ during each working session. \param theFatherObject The father %SObject under which this one should be created. \return New %SObject -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example18 for an example of this method usage in batchmode of %SALOME application. */ @@ -620,7 +597,7 @@ during each working session. /*! Loads a %SComponent. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception); @@ -637,7 +614,7 @@ during each working session. \param anObject The %SObject corresponding to the attribute which is looked for. \param aTypeOfAttribute Type of the attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ GenericAttribute FindOrCreateAttribute(in SObject anObject, @@ -661,7 +638,7 @@ during each working session. \param anObject The %SObject corresponding to the attribute. \param aTypeOfAttribute Type of the attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ void RemoveAttribute(in SObject anObject, in string aTypeOfAttribute) raises(LockProtection); @@ -685,7 +662,7 @@ during each working session. Adds a directory in the %Study. \param theName String parameter defining the name of the directory. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example23 for an example of this method usage in batchmode of %SALOME application. */ void AddDirectory(in string theName) raises(LockProtection); @@ -712,7 +689,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin Creates a new command which can contain several different actions. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void NewCommand(); // command management @@ -722,7 +699,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void CommitCommand() raises(LockProtection); // command management @@ -734,7 +711,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin Cancels all actions declared within the command. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ void AbortCommand(); // command management /*! \brief Undolimit @@ -748,7 +725,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void Undo() raises (LockProtection); @@ -758,21 +735,21 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ void Redo() raises (LockProtection); /*! Returns True if at this moment there are any actions which can be canceled. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example16 for an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableUndos(); /*! Returns True if at this moment there are any actions which can be redone. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableRedos(); @@ -837,7 +814,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param study_name String parameter defining the name of the study -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ Study NewStudy(in string study_name); @@ -848,7 +825,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param aStudyUrl The path to the study \warning This method doesn't activate the corba objects. Only a component can do it. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); @@ -863,7 +840,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param theMultiFile If this parameter is True the study will be saved in several files. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ boolean Save(in Study aStudy, in boolean theMultiFile); @@ -880,7 +857,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin \param aStudy The study which will be saved \param theMultiFile If this parameter is True the study will be saved in several files. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ boolean SaveAs(in URL aUrl, // if the file already exists in Study aStudy, @@ -1027,7 +1004,7 @@ Gets the list of open studies \param aTypeOfAttribute String value defining the type of the required attribute of the given %SObject. \return True if it finds an attribute of a definite type of the given %SObject as well as the discovered attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ boolean FindAttribute(out GenericAttribute anAttribute, in string aTypeOfAttribute); @@ -1041,7 +1018,7 @@ Gets the list of open studies \return The list of all attributes of the given %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example17 for an example of this method usage in batchmode of %SALOME application. */ ListOfAttributes GetAllAttributes(); @@ -1107,14 +1084,17 @@ Gets the list of open studies */ void CheckLocked() raises (LockProtection); + //! Get Type string Type(); + //! Get the class type string GetClassType(); + //! Get SObject SObject GetSObject(); + //! Private method, returns an implementation of this GenericAttribute. /*! - Private method, returns an implementation of this GenericAttribute. \param theHostname is a hostname of the caller \param thePID is a process ID of the caller \param isLocal is set True if the GenericAttribute is launched locally with the caller @@ -1134,12 +1114,12 @@ Gets the list of open studies //========================================================================== interface SComponent : SObject { -/*! Gets the data type of the given %SComponent +/*! \brief Gets the data type of the given %SComponent \return The data type of this %SComponent. */ string ComponentDataType(); -/*! Gets the IOR of the given component +/*! \brief Gets the IOR of the given component \return True (if there is an instance of the given component) and its IOR. */ @@ -1158,22 +1138,22 @@ Gets the list of open studies interface SComponentIterator : SALOME::GenericObj { /*! -Activates the %SComponentIterator. +\brief Activates the %SComponentIterator. */ void Init(); -/*! Method More +/*! \brief Method More \return True if there is one more %SComponent in the list. */ boolean More(); /*! -Moves the iterator to the next %SComponent in the list. +\brief Moves the iterator to the next %SComponent in the list. */ void Next(); /*! - Returns the %SComponent corresponding to the current %SComponent found by the iterator. + \brief Returns the %SComponent corresponding to the current %SComponent found by the iterator. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ SComponent Value(); @@ -1190,27 +1170,27 @@ Moves the iterator to the next %SComponent in the list. { /*! -Activates the %ChildIterator. +\brief Activates the %ChildIterator. */ void Init(); /*! -Activates the %ChildIterator for all child levels. +\brief Activates the %ChildIterator for all child levels. \param allLevels If this boolean parameter is True, the %ChildIterator will be activated for all child levels. */ void InitEx(in boolean allLevels); -/*! Method More +/*! \brief Method More \return True if there is one more %ChildIterator in the list. */ boolean More(); /*! - Passes the iterator to the next level. + \brief Passes the iterator to the next level. */ void Next(); /*! - Returns the %SObject corresponding to the current object found by the iterator. + \brief Returns the %SObject corresponding to the current object found by the iterator. */ SObject Value(); }; @@ -1336,7 +1316,7 @@ can be called by any component and which provide the following functionality: \param isMultiFile If the value of this boolean parameter is True, the data will be saved in several files. \return A byte stream TMPFile that contains all saved data -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ @@ -1351,7 +1331,7 @@ can be called by any component and which provide the following functionality: \param isMultiFile If the value of this boolean parameter is True, the data will be saved in several files. \return A byte stream TMPFile that will contain all saved data -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example19 for an example of this method usage in batchmode of %SALOME application. */ TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile); diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl index 787f9aadd..dd49ef584 100644 --- a/idl/SALOMEDS_Attributes.idl +++ b/idl/SALOMEDS_Attributes.idl @@ -19,11 +19,12 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : SALOMEDS.idl +// File : SALOMEDS_Attributes.idl // Author : Yves FRICAUD // $Header$ // -/*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces +/*! \file SALOMEDS_Attributes.idl + \brief This file contains a set of interfaces for the attributes which can be assigned to %SObject */ #ifndef _SALOMEDS_AttributesIDL_ @@ -33,28 +34,23 @@ module SALOMEDS { -/*! Sequence of double values -*/ +//! Sequence of double values typedef sequence DoubleSeq; -/*! Sequence of long values -*/ +//! Sequence of long values typedef sequence LongSeq; -/*! Sequence of string values -*/ +//! Sequence of string values typedef sequence StringSeq; -/*! \struct Color - This structure stores a set of elements defining the color based on RGB palette. These elements are +/*! \brief This structure stores a set of elements defining the color based on RGB palette. + + These elements are used as input parameters for methods necessary for color definition of different items. */ struct Color { -/*! Red color -*/ +//! Red color double R; -/*! Green color -*/ +//! Green color double G; -/*! Blue color -*/ +//! Blue color double B; }; //========================================================================== @@ -66,16 +62,16 @@ module SALOMEDS interface AttributeReal : GenericAttribute { +//! Returns the value of this attribute. /*! - Returns the value of this attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ double Value(); + //! Sets the value of this attribute. /*! - Sets the value of this attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in double value); @@ -88,16 +84,17 @@ module SALOMEDS //========================================================================== interface AttributeInteger : GenericAttribute { + //! Returns the value of this attribute /*! - Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ long Value(); + + //! Sets the value of this attribute /*! - Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in long value); }; @@ -109,51 +106,45 @@ module SALOMEDS //========================================================================== interface AttributeSequenceOfReal : GenericAttribute { + //! Initialization of the attribute with initial data. /*! - Initialization of the attribute with initial data. \param other Initially assigned sequence of real numbers. */ void Assign (in DoubleSeq other); -/*! - Returns the sequence of real numbers stored in the attribute. -*/ +//! Returns the sequence of real numbers stored in the attribute. DoubleSeq CorbaSequence(); -/*! - Adds to the end of the sequence a real number. +/*! \brief Adds to the end of the sequence a real number. \param value A real number added to the sequence. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Add (in double value); -/*! - Removes a real number with a definite index +/*! \brief Removes a real number with a definite index from the sequence of real numbers stored in the Attribute. \param index The index of the given real number */ void Remove(in long index); -/*! - Substitutes a given real number with a definite index for another real number. +/*! \brief Substitutes a given real number with a definite index for another real number. + \param index The index of the given real number. \param value The value of another real number. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void ChangeValue(in long index, in double value); -/*! - Returns a given real number with a definite index - in the sequence of real numbers stored in the Attribute. +/*! \brief Returns a given real number with a definite index in the sequence of real numbers stored in the Attribute. + \param index The index of the given real number. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ double Value(in short index); -/*! - Returns the length of the sequence of real numbers stored in the Attribute. +/*! \brief Returns the length of the sequence of real numbers stored in the Attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ long Length(); @@ -166,51 +157,44 @@ module SALOMEDS //========================================================================== interface AttributeSequenceOfInteger : GenericAttribute { -/*! - Initialisation of the attribute with initial data. +/*! \brief Initialisation of the attribute with initial data. \param other Initially assigned sequence of integer numbers. */ void Assign (in LongSeq other); -/*! - Returns the sequence of integer numbers stored in the Attribute. -*/ +//! Returns the sequence of integer numbers stored in the Attribute. LongSeq CorbaSequence(); -/*! - Adds to the end of the sequence an integer number. +/*! \brief Adds to the end of the sequence an integer number. + \param value An integer number added to the sequence. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Add (in long value); -/*! - Removes an integer number with a definite index - from the sequence of integer numbers stored in the Attribute. +/*! \brief Removes an integer number with a definite index from the sequence of integer numbers stored in the Attribute. + \param index The index of the given integer number. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Remove(in long index); -/*! - Substitutes an integer number with a definite index for another integer number. +/*! \brief Substitutes an integer number with a definite index for another integer number. + \param index The index of the given integer number. \param value The value of another integer number. */ void ChangeValue(in long index, in long value); -/*! - Returns a given integer number with a definite index - in the sequence of integer numbers stored in the Attribute. +/*! \brief Returns a given integer number with a definite index in the sequence of integer numbers stored in the Attribute. \param index The index of the given integer number. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ long Value(in short index); -/*! - Returns the length of the sequence of integer numbers stored in the Attribute. +/*! \brief Returns the length of the sequence of integer numbers stored in the Attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ long Length(); @@ -226,18 +210,16 @@ module SALOMEDS interface AttributeName : GenericAttribute { -/*! - Returns the value of this attribute +/*! \brief Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); -/*! - Sets the value of this attribute +/*! \brief Sets the value of this attribute \param value This parameter defines the value of this attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -251,17 +233,15 @@ module SALOMEDS //========================================================================== interface AttributeComment : GenericAttribute { -/*! - Returns the value of this attribute +/*! \brief Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); -/*! - Sets the value of this attribute +/*! \brief Sets the value of this attribute \param value This string parameter defines the value of this attribute - a description of a %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -295,14 +275,14 @@ module SALOMEDS /*! Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This parameter defines the value of this attribute - IOR of a %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -318,14 +298,14 @@ module SALOMEDS /*! Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This parameter defines the value of this attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -340,12 +320,12 @@ module SALOMEDS { /*! Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -360,12 +340,12 @@ module SALOMEDS { /*! Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -387,7 +367,7 @@ module SALOMEDS /*! Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example8 for an example of this method usage in batchmode of %SALOME application. */ boolean IsDrawable(); @@ -396,7 +376,7 @@ Sets the item to be drawable. \param value If the value of this boolean parameter is TRUE (default) the item will be drawable. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example8 for an example of this method usage in batchmode of %SALOME application. */ void SetDrawable(in boolean value); @@ -415,7 +395,7 @@ Sets the item to be drawable. Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example9 for an example of this method usage in batchmode of %SALOME application. */ boolean IsSelectable(); @@ -424,7 +404,7 @@ Sets the item to be selectable \param value If the value of this parameter is TRUE (the default) the item will be set as selectable. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example9 for an example of this method usage in batchmode of %SALOME application. */ void SetSelectable(in boolean value); @@ -443,7 +423,7 @@ Sets the item to be selectable /*! Returns TRUE if this item is expandable even when it has no children. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example10 for an example of this method usage in batchmode of %SALOME application. */ boolean IsExpandable(); @@ -451,7 +431,7 @@ Sets the item to be selectable \param value If the value of this boolean parameter is TRUE, this item will be set as expandable. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example10 for an example of this method usage in batchmode of %SALOME application. */ void SetExpandable(in boolean value); @@ -500,7 +480,7 @@ Sets the item to be selectable /*! Returns TRUE if this item is open (its children are visible) and FALSE if it isn't. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example11 for an example of this method usage in batchmode of %SALOME application. */ boolean IsOpened(); @@ -510,7 +490,7 @@ Sets the item to be selectable \param value If the value of this boolean parameter is TRUE this item will be set as open, and as closed if FALSE. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example11 for an example of this method usage in batchmode of %SALOME application. */ void SetOpened(in boolean value); @@ -526,7 +506,7 @@ Sets the item to be selectable /*! Returns the color of an item. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example12 for an example of this method usage in batchmode of %SALOME application. */ Color TextColor(); @@ -535,7 +515,7 @@ Sets the item to be selectable \param value This parameter defines the color of the item. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example12 for an example of this method usage in batchmode of %SALOME application. */ void SetTextColor(in Color value); @@ -554,7 +534,7 @@ Sets the item to be selectable -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example13 for an example of this method usage in batchmode of %SALOME application. */ Color TextHighlightColor(); @@ -562,7 +542,7 @@ Sets the item to be selectable Sets the highlight color of an item. \param value This parameter defines the highlight color of the item. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example13 for an example of this method usage in batchmode of %SALOME application. */ void SetTextHighlightColor(in Color value); @@ -582,7 +562,7 @@ Sets the item to be selectable /*! Returns the name of the icon in the format of a string. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example14 for an example of this method usage in batchmode of %SALOME application. */ string GetPixMap(); @@ -590,7 +570,7 @@ Sets the item to be selectable Sets the name of the icon. \param value This string parameter defines the name of the icon. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example14 for an example of this method usage in batchmode of %SALOME application. */ void SetPixMap(in string value); @@ -603,7 +583,7 @@ Sets the item to be selectable tree whith its own structure and identifier. The quantity of such trees with different identifiers can be arbitrary. -
        See also an example of usage of the methods of this interface in batchmode of %SALOME application. +See \ref example18 for an example of usage of the methods of this interface in batchmode of %SALOME application. */ //========================================================================== @@ -691,7 +671,7 @@ Sets the item to be selectable /*! Deletes a tree node. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Remove(); @@ -734,7 +714,7 @@ Sets the item to be selectable /*! Returns the value of this attribute. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ long Value(); /*! @@ -742,7 +722,7 @@ Sets the item to be selectable \param value This parameter defines the local ID which will be set. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in long value); }; @@ -758,13 +738,13 @@ Sets the item to be selectable /*! Returns the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example1 for an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; @@ -783,7 +763,7 @@ Sets the item to be selectable /*! Adds a %SObject to the list of %SObjects which refer to this %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Add(in SObject anObject); @@ -794,7 +774,7 @@ Sets the item to be selectable /*! Deletes a %SObject from the list of %SObjects which refer to this %SObject. -
        See also an example of this method usage in batchmode of %SALOME application. +See \ref example3 for an example of this method usage in batchmode of %SALOME application. */ void Remove(in SObject anObject); @@ -805,20 +785,16 @@ Sets the item to be selectable This attribute allows to store a table of integers (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column. -
        See also an example of usage of these methods in batchmode of %SALOME application. +See \ref example21 for an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfInteger : GenericAttribute { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ +//! This exception is raised when an incorrect index is passed as parameter. exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ +//! This exception is raised when an incorrect length of the argument is passed as parameter. exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column @@ -964,20 +940,16 @@ Sets the item to be selectable This attribute allows to store a table of reals (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column. -
        See also an example of usage of these methods in batchmode of %SALOME application. +See \ref example21 for an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfReal : GenericAttribute { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ +//! This exception is raised when an incorrect index is passed as parameter. exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ +//! This exception is raised when an incorrect length of the argument is passed as parameter. exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column @@ -1114,20 +1086,16 @@ Sets the item to be selectable This attribute allows to store a table of strings (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column. -
        See also an example of usage of these methods in batchmode of %SALOME application. +See \ref example21 for an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfString : GenericAttribute { -/*! - This exception is raised when an incorrect index is passed as parameter. -*/ +//! This exception is raised when an incorrect index is passed as parameter. exception IncorrectIndex {}; -/*! - This exception is raised when an incorrect length of the argument is passed as parameter. -*/ +//! This exception is raised when an incorrect length of the argument is passed as parameter. exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column @@ -1263,7 +1231,7 @@ Sets the item to be selectable This attribute allows to store study properties: user name, creation date, creation mode, modified flag, locked flag. -
        See also an example of usage of these methods in batchmode of %SALOME application. +See \ref example20 for an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== diff --git a/idl/SALOME_Comm.idl b/idl/SALOME_Comm.idl index 3c2e3f173..31d5d9643 100644 --- a/idl/SALOME_Comm.idl +++ b/idl/SALOME_Comm.idl @@ -24,6 +24,11 @@ #include "SALOME_Exception.idl" +/*! + \file SALOME_Comm.idl \brief This file contains a set of interfaces used for communication + between components + */ + module SALOME { enum TypeOfDataTransmitted { _DOUBLE_,_INT_ }; diff --git a/idl/SALOME_Component.idl b/idl/SALOME_Component.idl index d12f1e190..e47f886d0 100644 --- a/idl/SALOME_Component.idl +++ b/idl/SALOME_Component.idl @@ -29,6 +29,9 @@ #include "SALOMEDS.idl" #include "SALOME_Exception.idl" +/*! \file SALOME_Component.idl \brief interfaces for Component and Container +*/ + /*! \brief This is a package of interfaces used for connecting new components to %SALOME application. It also contains a set of interfaces used for management of %MED @@ -42,9 +45,7 @@ module Engines */ typedef sequence TMPFile; - /*! - General Key Value Structure to set or get properties, for component - */ + //! General Key Value Structure to set or get properties, for component struct KeyValuePair { string key; @@ -66,8 +67,8 @@ module Engines interface Container { - /*! - Loads a new component class (dynamic library). + /*! \brief Loads a new component class (dynamic library). + \param componentName like COMPONENT, (Python or C++ implementation) try to make a Python import of COMPONENT, then a lib open of libCOMPONENTEngine.so @@ -75,8 +76,8 @@ module Engines */ boolean load_component_Library(in string componentName); + //! Create a new servant instance of a component. /*! - Creates a new servant instance of a component. Component library must be loaded. \param componentName Name of the component which will be registered in Registry and Name Service, @@ -88,8 +89,8 @@ module Engines Engines::Component create_component_instance(in string componentName, in long studyId); + //! Find a servant instance of a component /*! - Finds a servant instance of a component \param registeredName Name of the component in Registry or Name Service, without instance suffix number \param studyId 0 if instance is not associated to a study, @@ -99,8 +100,8 @@ module Engines Component find_component_instance(in string registeredName, in long studyId); + //! Find a servant instance of a component, or create a new one. /*! - Find a servant instance of a component, or create a new one. Loads the component library if needed. Only applicable to multiStudy components. \param nameToRegister Name of the component which will be registered @@ -112,52 +113,37 @@ module Engines Component load_impl(in string nameToRegister, in string componentName); + //! Remove the component servant, and deletes all related objects /*! - Stops the component servant, and deletes all related objects \param component_i Component to be removed */ void remove_impl(in Component component_i); - /*! - Discharges all components from the container. - */ + //! Unload component libraries from the container. void finalize_removal() ; - /*! - Determines whether the server has been loaded or not. - */ + //! Determines whether the server has been loaded or not. void ping(); - /*! - Name of the %container - */ + //! Name of the %container readonly attribute string name ; - /*! - working directory of the %container - */ + //! working directory of the %container readonly attribute string workingdir ; - /*! - name of the %container log file (this has been set by the launcher) - */ + //! name of the %container log file (this has been set by the launcher) attribute string logfilename ; - /*! - Shutdown the Container process. - */ + //! Shutdown the Container process. void Shutdown(); - /*! - Returns the hostname of the container - */ + //! Returns the hostname of the container string getHostName(); - /*! - Returns the PID of the container - */ + //! Returns the PID of the container long getPID(); + //! Kill the container /*! Returns True if the %container has been killed. Kept for Superv compilation but can't work, unless oneway... @@ -165,6 +151,7 @@ module Engines */ boolean Kill_impl() ; + //! Create a fileRef /*! returns a fileRef object if origFileName exists and is readable else returns null object. Only one fileRef is created for a given @@ -173,6 +160,7 @@ module Engines */ fileRef createFileRef(in string origFileName); + //! Create a Salome_file /*! returns a Salome_file object if origFileName exists and is readable else returns null object. @@ -183,6 +171,7 @@ module Engines */ Salome_file createSalome_file(in string origFileName); + //! Create a fileTransfer /*! returns a fileTransfer object used to copy files from the container machine to the clients machines. Only one fileTransfer instance is @@ -198,30 +187,25 @@ module Engines */ interface Component { - /*! - The name of the instance of the %Component - */ + //! The name of the instance of the %Component readonly attribute string instanceName ; - /*! - The name of the interface of the %Component - */ + //! The name of the interface of the %Component readonly attribute string interfaceName ; - /*! - Determines whether the server has already been loaded or not. - */ + //! Determines whether the server has already been loaded or not. void ping(); -// /*! +// // Set study associated to component instance // \param studyId // (=0: multistudy component instance, // >0: study id associated to this instance // \return false if already set with a different value (change not possible) -// */ +// // boolean setStudyId(in long studyId); + //! Get study associated to component instance /*! get study associated to component instance \return -1: not initialised (Internal Error) @@ -230,6 +214,7 @@ module Engines */ long getStudyId(); + //! Remove component instance from container /*! Deactivates the %Component. -- TO BE USED BY CONTAINER ONLY (Container housekeeping) -- @@ -237,11 +222,10 @@ module Engines */ void destroy() ; - /*! - Returns the container that the %Component refers to. - */ + //! Returns the container that the %Component refers to. Container GetContainerRef() ; + //! Set component instance properties /*! Gives a sequence of (key=string,value=any) to the component. Base class component stores the sequence in a map. @@ -250,12 +234,14 @@ module Engines */ void setProperties(in FieldsDict dico); + //! Get component instance properties /*! returns a previously stored map (key=string,value=any) as a sequence. See setProperties(in FieldsDict dico). */ FieldsDict getProperties(); + //! Set name of a node in a graph (for %SUPERVISOR use) /*! This method is used by the %SUPERVISOR component. It sets the names of the graph and of the node. @@ -264,33 +250,39 @@ module Engines */ void Names( in string aGraphName , in string aNodeName ) ; + //! Kill the component (if you can) /*! Returns True if the %Component has been killed. */ boolean Kill_impl() ; + //! Stop the component (if you can) /*! Returns True if the activity of the %Component has been stopped. (It's action can't be resumed) */ boolean Stop_impl() ; + //! Suspend the component /*! Returns True if the activity of the %Component has been suspended. (It's action can be resumed) */ boolean Suspend_impl() ; + //! Resume the component /*! Returns True if the activity of the %Component has been resumed. */ boolean Resume_impl() ; + //! Get the cpu used /*! - Returns the Cpu used (long does not run with python !...) + Returns the Cpu used */ long CpuUsed_impl() ; + //! Get a python dump /*! Returns a python script, which is being played back reproduces the data model of component @@ -300,8 +292,8 @@ module Engines out boolean isValidScript); + //! Returns a CORBA Ref of a input Salome_file managed by a service. /*! - Returns a CORBA Ref of a input Salome_file managed by a service. \param service_name service's name. \param file_name name of the requested file. @@ -314,6 +306,7 @@ module Engines Engines::Salome_file getInputFileToService(in string service_name, in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Check service input files (transfer them if needed) /*! This method is used before the activation of the service. It calls recvFiles() on all the input Salome_file files of the service. @@ -331,8 +324,8 @@ module Engines */ void checkInputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + //! This method adds a input Salome_file to a service of the component. /*! - This method adds a input Salome_file to a service of the component. \param service_name service's name. \param Salome_file_name name of the Salome_file @@ -345,8 +338,8 @@ module Engines Engines::Salome_file setInputFileToService(in string service_name, in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Returns a CORBA Ref of a output Salome_file managed by a service. /*! - Returns a CORBA Ref of a output Salome_file managed by a service. \param service_name service's name. \param file_name name of the requested file. @@ -359,6 +352,7 @@ module Engines Engines::Salome_file getOutputFileToService(in string service_name, in string Salome_file_name) raises(SALOME::SALOME_Exception); + //! Check service output files (transfer them if needed) /*! This method is used at the end of the service. It calls recvFiles() on all the output Salome_file files of the service. @@ -376,8 +370,8 @@ module Engines */ void checkOutputFilesToService(in string service_name) raises(SALOME::SALOME_Exception); + //! This method adds an output Salome_file to a service of the component. /*! - This method adds an output Salome_file to a service of the component. \param service_name service's name. \param Salome_file_name name of the Salome_file @@ -389,6 +383,8 @@ module Engines */ Engines::Salome_file setOutputFileToService(in string service_name, in string Salome_file_name) raises(SALOME::SALOME_Exception); + + //! Indicate if the component instance provides custom information about its objects. /*! Returns true if the component provides custom information about its objects, false otherwise. Should be redefined in the certain component to return true in case of this @@ -396,6 +392,7 @@ module Engines */ boolean hasObjectInfo(); + //! Get custom information about the given object. /*! This method is used to get the custom information about the given object. Should be redefined in the certain component in case of this @@ -414,10 +411,7 @@ module Engines void send_parallel_proxy_object(in Object proxy_ref); }; - /*! - A block of binary data used for file transfer. The maximum size of the - block is defined on server side. - */ + //! A block of binary data used for file transfer. The maximum size of the block is defined on server side. typedef sequence fileBlock; /*! \brief Interface of fileTransfer. @@ -426,6 +420,7 @@ module Engines */ interface fileTransfer { + //! Open the file transfer /*! open method returns a key (fileId) that identifies the structure (ex: C FILE), associated to the original file on the server. @@ -436,12 +431,14 @@ module Engines */ long open(in string fileName); + //! Close the file transfer /*! when the file transfer is finished, close method releases structures created by open method, identified by fileId. */ void close(in long fileId); + //! Get a file data block /*! Get successive blocks of octets from the original file. The last block is empty, and identifies the end of file. @@ -449,36 +446,35 @@ module Engines fileBlock getBlock(in long fileId); }; - /*! - This is a file managed by a Salome_file. It contains file's name, path and status. - The status is : "present" or "notpresent". - */ + //! A file managed by a Salome_file. struct file { + //! file name string file_name; - string path; + //! path name + string path; string type; string source_file_name; - string status; + //! status ("present" or "notpresent") + string status; long node; Engines::Container container; }; - /*! - A sequence of Engines::file. - */ + //! A sequence of Engines::file. typedef sequence files; - /*! - It is the state of a Salome_file. It contains the Salome_file's name, the name - of the hdf5 file where it can be saved, the number of files managed and the information - if all the files are received. - */ + //! The state of a Salome_file. struct SfState { - string name; - string hdf5_file_name; - long number_of_files; - boolean files_ok; + //! file name + string name; + //! hdf5 file where the file can be saved + string hdf5_file_name; + //! number of files managed + long number_of_files; + //! information if all the files are received + boolean files_ok; + }; /*! \brief Interface of a Salome_file managed @@ -488,8 +484,8 @@ module Engines */ interface Salome_file : Engines::fileTransfer { + //! Load a Salome_file from a hdf5 file. /*! - Load a Salome_file from a hdf5 file. \param hdf5_file name (with path) of the hdf5_file. @@ -497,8 +493,8 @@ module Engines */ void load(in string hdf5_file) raises (SALOME::SALOME_Exception); + //! Save a Salome_file into a hdf5_file. /*! - Save a Salome_file into a hdf5_file. \param hdf5_file name (with path) of the hdf5_file. @@ -507,9 +503,9 @@ module Engines */ void save(in string hdf5_file) raises (SALOME::SALOME_Exception); + //! Save a Salome_file into a hdf5_file. /*! - Save a Salome_file into a hdf5_file. All files that are managed - are saved into the hdf5_file + All files that are managed are saved into the hdf5_file \param hdf5_file name (with path) of the hdf5_file. @@ -520,8 +516,8 @@ module Engines /**************/ + //! Add a Local file to the Salome_file. /*! - Add a Local file to the Salome_file. \param file_name name of the file with the path. @@ -529,8 +525,8 @@ module Engines */ void setLocalFile(in string comp_file_name) raises (SALOME::SALOME_Exception); + //! Add a Distributed file to the Salome_file. /*! - Add a Distributed file to the Salome_file. \param comp_file_name name of the file with the path. @@ -538,8 +534,8 @@ module Engines */ void setDistributedFile(in string comp_file_name) raises (SALOME::SALOME_Exception); + //! Connect a Salome_file with another Salome_file. /*! - Connect a Salome_file with another Salome_file. It works only if the Salome_file managed only one file \param source_Salome_file Salome_file that managed the distributed version of the file. @@ -548,8 +544,8 @@ module Engines */ void connect(in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception); + //! Connect the managed file file_name to a Salome_file. /*! - Connect the managed file file_name to a Salome_file. \param file_name name of the file without the path. \param source_Salome_file Salome_file that managed the distributed version of the file. @@ -559,8 +555,8 @@ module Engines void connectDistributedFile(in string file_name, in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception); + //! Connect the file_name with a Distributed file_name. /*! - Connect the file_name with a Distributed file_name. \param file_name name of the file without the path. \param source_file_name It's the name of the file managed by the distributed source Salome_file. @@ -572,9 +568,8 @@ module Engines /**************/ + //! Get all the distributed files managed by the Salome_file and check all the local files. /*! - Get all the distributed files managed by the Salome_file and - check all the local files. \exception raised if some of the files are not ok. */ @@ -582,8 +577,8 @@ module Engines /**************/ + //! Remove a file of the Salome_file. /*! - Remove a file of the Salome_file. \param file_name name of the file. @@ -591,21 +586,19 @@ module Engines */ void removeFile(in string file_name) raises (SALOME::SALOME_Exception); - /*! - Remove all the files of the Salome_file. - */ + //! Remove all the files of the Salome_file. void removeFiles(); /**************/ + //! Get the list of the files managed by the Salome_file. /*! - Get the list of the files managed by the Salome_file. The list can be empty. */ Engines::files getFilesInfos(); + //! Get a file managed by the Salome_file. /*! - Get a file managed by the Salome_file. \param file_name the name of the file. @@ -615,14 +608,12 @@ module Engines */ Engines::file getFileInfos(in string file_name) raises (SALOME::SALOME_Exception); - /*! - Return the state of the Salome_file. - */ + //! Return the state of the Salome_file. Engines::SfState getSalome_fileState(); + //! Set the container where files are. /*! - Set the container where files are. \param container container CORBA's reference. */ @@ -648,7 +639,9 @@ module Engines */ interface fileRef { + //! the original file readonly attribute string origFileName; + //! the machine of the original file readonly attribute string refMachine; Container getContainer(); diff --git a/idl/SALOME_ContainerManager.idl b/idl/SALOME_ContainerManager.idl index 7fe11b29b..32b8e364e 100644 --- a/idl/SALOME_ContainerManager.idl +++ b/idl/SALOME_ContainerManager.idl @@ -25,20 +25,22 @@ #include "SALOME_Exception.idl" #include "SALOME_Component.idl" +/*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME launcher and container manager +*/ + module Engines { -/*! - Type to transmit list of machines. -*/ +//! Type to transmit list of machines. typedef sequence MachineList; +//! components list typedef sequence CompoList; +//! files list typedef sequence FilesList; +//! modules list typedef sequence ModulesList; -/*! - Type to describe properties of resource. -*/ +//! Type to describe properties of a resource. struct MachineParameters { string container_name; @@ -63,26 +65,31 @@ struct MachineParameters long nb_component_nodes; }; -/*! - exception thrown if a computer is not found in the catalog -*/ +//! exception thrown if a computer is not found in the catalog exception NotFound {}; - enum policy {P_FIRST,P_CYCL,P_BEST}; +//! enumeration to set a resource management policy + enum policy { + //! first machine in the list of admissible computers + P_FIRST, + //! next machine in the list of admissible computers + P_CYCL, + //! best machine in the list of admissible computers + P_BEST}; +//! resource management policy typedef policy ResPolicy; -/*! - Structure used for Salome Batch Job parameters -*/ +//! Structure used for Salome Batch Job parameters struct BatchParameters { - string batch_directory; // Where batch command will be launched - // and log files will be created - string expected_during_time; // Time for the batch - // has to be like this : hh:mm - string mem; // Minimum of memory needed - // has to be like : 32gb or 512mb - long nb_proc; // Number of processors requested + //! Where batch command will be launched and log files will be created + string batch_directory; + //! Time for the batch (has to be like this : hh:mm) + string expected_during_time; + //! Minimum of memory needed (has to be like : 32gb or 512mb) + string mem; + //! Number of processors requested + long nb_proc; }; /*! \brief Interface of the %salomelauncher @@ -116,11 +123,12 @@ struct BatchParameters */ interface ContainerManager { + //! Find an existing container satisfying the constraints given by input parameters or start a new one. Container FindOrStartContainer( in MachineParameters params, in MachineList possibleComputers); - /*! - This operation launches a PaCO++ container. + //! This operation launches a PaCO++ container. + /*! \param Description of the container resquested. \param List of computers ressources. @@ -130,14 +138,23 @@ struct BatchParameters Container FindOrStartParallelContainer( in MachineParameters params, in MachineList possibleComputers); + //! Start a new container satisfying the constraints given by input parameters. Container StartContainer( in MachineParameters params, in ResPolicy policy, in CompoList componentList ); + //! Same as StartContainer except that in batch all containers have already been launched + /*! + + We are in batch if environment variable SALOME_BATCH is 1. + In this case, containers have been launched at the beginning of the Salome session and + the container manager picks one in the pool of existing containers. + */ Container GiveContainer( in MachineParameters params, in ResPolicy policy, in CompoList componentList ); + //! Shutdown all containers that have been launched by the container manager void ShutdownContainers(); } ; @@ -148,12 +165,19 @@ struct BatchParameters */ interface ResourcesManager { + //! Find first available computer in a computers list string FindFirst(in MachineList possibleComputers); + //! Get a list of computers that are best suited to launch a container given constraints + /*! + + The constraints are resource constraints (params) and components constraints (componentList) + */ MachineList GetFittingResources( in MachineParameters params, in CompoList componentList ) raises (SALOME::SALOME_Exception); + //! Get the current machine parameters of a computer MachineParameters GetMachineParameters( in string hostname ); } ; diff --git a/idl/SALOME_Exception.idl b/idl/SALOME_Exception.idl index e338e4220..aa39c1db5 100644 --- a/idl/SALOME_Exception.idl +++ b/idl/SALOME_Exception.idl @@ -23,8 +23,10 @@ // Author : Paul RASCLE, EDF // $Header$ // -/*! \file SALOME_Exception.idl This file contains the objects defining the main exception used -in %SALOME application. The idl SALOME_Exception provides a generic CORBA exception for SALOME, +/*! \file SALOME_Exception.idl \brief This file contains the objects defining the main exception used +in %SALOME application. + +The idl SALOME_Exception provides a generic CORBA exception for SALOME, with an attribute that gives an exception type,a message, plus optional source file name and line number. This idl is intended to serve for all user CORBA exceptions raised in SALOME code, as IDL specification does not support exception inheritance. So, all the user CORBA exceptions from SALOME could be @@ -34,25 +36,21 @@ handled in a single catch. #ifndef _SALOME_EXCEPTION_IDL_ #define _SALOME_EXCEPTION_IDL_ -/*! -Module %SALOME regroups all idl definitions for %SALOME Kernel component +/*! \brief +Module %SALOME contains all base interfaces of %SALOME Kernel + */ module SALOME { -/*! -This enumeration contains the elements indicating the type of the exception -which can be raised during %SALOME session. -*/ +//! This enumeration contains the elements indicating the type of the exception which can be raised during %SALOME session. enum ExceptionType { COMM, /*!< Communication problem */ BAD_PARAM, /*!< Bad User parameters */ INTERNAL_ERROR /*!< Application level problem, irrecoverable */ }; -/*! -This struct contains a set of fields defining the structure of the exception. -*/ +//! This struct contains a set of fields defining the structure of the exception. struct ExceptionStruct { ExceptionType type; /*! IORTab; + /*! \brief Interface of a parallel %object for the MPI parallel container. + */ interface MPIObject { attribute IORTab tior; diff --git a/idl/SALOME_ModuleCatalog.idl b/idl/SALOME_ModuleCatalog.idl index 683e93943..caccfeb0b 100644 --- a/idl/SALOME_ModuleCatalog.idl +++ b/idl/SALOME_ModuleCatalog.idl @@ -23,20 +23,19 @@ // Author : Estelle Deville // $Header$ // -/*! \file SALOME_ModuleCatalog.idl This file conatins a set of interfaces used for - creation of the catalog of components in %SALOME application +/*! \file SALOME_ModuleCatalog.idl \brief interfaces used for + getting information from module catalog in %SALOME application */ -/*! -The main package of interfaces used for creation of the module catalog in %SALOME application. +/*! \brief +The main package of interfaces used for the module catalog in %SALOME application. + Module catalog allows to manage components of %SALOME application, to call specified in the xml files interfaces with the help of AComponent interface. */ module SALOME_ModuleCatalog { - // Type Definitions -/*! -This enumeration contains a current set of definitions of the components integrated +/*! \brief This enumeration contains a current set of definitions of the components integrated into %SALOME application. */ enum ComponentType { GEOM, /*! ListOfServicesParameter; +//! The list of datastream parameters of service. typedef sequence ListOfServicesDataStreamParameter; +//! a string list typedef sequence ListOfString; + +//! enumeration to define data types used by services enum TypeKind { NONE , - Dble , - Int , - Str , - Bool , - Objref , - Seq , - Array , - Struc + Dble , /*!< a double */ + Int , /*!< an integer */ + Str , /*!< a string */ + Bool , /*!< a boolean */ + Objref , /*!< an object reference */ + Seq , /*!< a sequence of a content type */ + Array , /*!< an array */ + Struc /*!< a structure with named members */ }; + +//! struct to define members of a Struc TypeKind struct MemberDefinition { - string name; /*! Name of the member */ - string type; /*! Type of the member */ + string name; /*!< Member name */ + string type; /*!< Member type name */ }; +//! List of member definitions in a structure typedef sequence ListOfMemberDefinition; -/*! - * Struct to get the definition of types used in Salome catalogs - */ + +//! Struct to get the definition of types used in Salome catalogs struct TypeDefinition { - string name; /*! Name of the type */ - TypeKind kind; /*! Kind of the type.*/ - string id; /*! id (if needed) */ - string content; /*! Content type (if needed) */ - ListOfString bases; /*! Content type (if needed) */ - ListOfMemberDefinition members; /*! Members types (if needed) */ + string name; /*!< Type name*/ + TypeKind kind; /*!< Type kind.*/ + string id; /*!< id (if needed) */ + string content; /*!< Content type (if needed) */ + ListOfString bases; /*!< base types (if needed) */ + ListOfMemberDefinition members; /*!< Member types (if needed) */ }; +//! list of type definitions typedef sequence ListOfTypeDefinition; -/*! -This struct contains fields completely defining each service. -*/ - +//! This struct contains fields defining each service. struct Service { string ServiceName; /*! ListOfInterfaceService; -/*! -List of services. -*/ +//! List of services. typedef sequence ListOfServices ; -/*! -This struct contains fields defining each interface. -*/ +//! This struct contains fields defining each interface. struct DefinitionInterface { string interfacename ; /*! ListOfDefInterface ; -/*! -List of names of interfaces. -*/ +//! List of interface names. typedef sequence ListOfInterfaces ; -/*! -PathPrefix : association of a machine name and +/*! \brief PathPrefix : association of a machine name and a path to a component */ struct PathPrefix { @@ -160,24 +148,18 @@ a path to a component string path; }; -/*! -List of path prefixes -*/ +//! List of path prefixes typedef sequence PathPrefixes; -/*! -Implementation type -*/ +//! Component implementation type enum ImplType { - SO, /* component implemented as a dynamic library loadable with dlopen */ - PY, /* component implemented as a python module loadable with import */ - EXE, /* component implemented as an executable */ - CEXE /* component to be loaded by a container which executable is given in the catalog */ + SO, /*!< component implemented as a dynamic library loadable with dlopen */ + PY, /*!< component implemented as a python module loadable with import */ + EXE, /*!< component implemented as an executable */ + CEXE /*!< component to be loaded by a container which executable is given in the catalog */ } ; -/*! -Description of a component -*/ +//! Description of a component struct ComponentDef { ComponentType type; @@ -192,17 +174,11 @@ Description of a component PathPrefixes paths; }; -/*! -List of names of components. -*/ +//! List of component names. typedef sequence ListOfComponents ; -/*! -List of names of computers. -*/ +//! List of computer names. typedef sequence ListOfComputers ; -/*! -This struct contains GUI elements used for representation of the module in %IAPP component. -*/ +//! This struct contains GUI elements used for representation of the module in %IAPP component. struct IAPP_Affich { string modulename; /*! ListOfIAPP_Affich ; -/*! - This exception is raised when a %component, a %service or a % pathPrefix is not found. -*/ +//! This exception is raised when a %component, a %service or a %pathPrefix is not found. exception NotFound { string what ; /*!If the specified interface doesn't exist, Notfound exception is thrown \param interfacename Name of the interface \return Required interface */ DefinitionInterface GetInterface(in string interfacename) raises(NotFound); - // GetServiceList : operation to get a list of the services name of - // an interface of a component - /*! - Gets the list of names of services of a definite interface belonging to the component. + /*! \brief Get the list of service names of an interface belonging to the component. + \note
        If the specified interface doesn't exist, Notfound exception is thrown. \param interfacename Name of the interface \return List of services of the required interface @@ -260,77 +228,66 @@ List of pair GUI elements (component name, component icone) ListOfServices GetServiceList(in string interfacename) raises(NotFound); - // GetService : operation to get one service of an interface of a component - - /*! - Gets a definite service of an interface of the component. + /*! \brief Get a service of an interface of the component. + \note
        If the required service or the specified interface don't exist, Notfound exception is thrown. \param interfacename Name of the interface \param servicename Name of the service \return Required service */ - Service GetService(in string interfacename, in string servicename) raises(NotFound); - // GetDefaultService : operation to get the default service - // of an interface of a component -/*! - Gets the default service of an interface of the component. +/*! \brief Get the default service of an interface of the component. + \note
        If the required service or the specified interface don't exist, Notfound exception is thrown. \param interfacename Name of the interface \return Required service */ - Service GetDefaultService(in string interfacename) raises(NotFound); - // GetPathPrefix : operation to get the PathPrefix of a computer - /*! - Gets the prefix path of the computer containing the %component. + /*! \brief Get the prefix path of the computer containing the %component. + \note
        If the required computer doesn't exist, Notfound exception is thrown \param machinename Name of the machine \return Prefix path */ - string GetPathPrefix(in string machinename) raises(NotFound); -/*! - Get the constraint affected to the component - (to be resolved by LifeCycle for the computer choice) +/*! \brief Get the constraint affected to the component + + constraint to be resolved by LifeCycle for the computer choice */ readonly attribute string constraint ; -/*! -Get the name of the component +/*! \brief Get the component name */ readonly attribute string componentname; -/*! -Get the user name of the component +/*! \brief Get the user name of the component */ readonly attribute string componentusername; -/*! -Ask whether the component is multistudy or not +/*! \brief Get whether the component is multistudy or not */ readonly attribute boolean multistudy; -/*! -Ask the type of the component +/*! \brief Get the type of the component */ readonly attribute ComponentType component_type ; -/*! -Gets the icone of the component (for IAPP) +/*! \brief Get the icone of the component (for IAPP) */ readonly attribute string component_icone; -/*! -Gets the implementation type of the component : C++ (dyn lib), Python (module) or executable +/*! \brief Get the implementation type of the component + + C++ (dyn lib), Python (module) or executable */ readonly attribute ImplType implementation_type; -/*! -Gets the implementation name of the component : name of the dyn lib or the python module or the executable +/*! \brief Get the implementation name of the component + + It's the name of the dyn lib or the python module or the executable if the default naming scheme is not convenient. */ readonly attribute string implementation_name; @@ -338,69 +295,61 @@ if the default naming scheme is not convenient. /*! \brief %Module catalog interface -This interface is used for creation of the module catalog in %SALOME application. +Interface to get information about components from the module catalog in %SALOME application. */ interface ModuleCatalog { +/*! \brief ping the ModuleCatalog server +*/ void ping(); -/*! - Returns the PID of the server +/*! \brief Returns the PID of the ModuleCatalog server */ long getPID(); -/*! - Shutdown the ModuleCatalog process. +/*! \brief Shutdown the ModuleCatalog server */ oneway void ShutdownWithExit(); -/*! - * Get the types of the catalog +/*! \brief Get the types of the catalog */ ListOfTypeDefinition GetTypes(); -/*! - Gets a list of names of computers of the catalog +/*! \brief Get a list of computer names of the catalog */ ListOfComputers GetComputerList(); -/*! -Gets the %PathPrefix of a computer -*/ +//! Get the %PathPrefix of a computer string GetPathPrefix(in string machinename) raises(NotFound); -/*! - Gets a list of names of components of the catalog -*/ + +//! Get a list of component names of the catalog ListOfComponents GetComponentList(); -/*! -Gets a list of pair GUI elements (component name, component icone) + +/*! \brief Get a list of pair GUI elements (component name, component icone) used for representation of the module in %IAPP component. */ - ListOfIAPP_Affich GetComponentIconeList(); -/*! -Gets a list of names of components of a particular type, which belong to this catalog. + +/*! \brief Get a list of component names of a particular type, which belong to this catalog. */ - // GetComponentList : operation to get a list of the components name of - // a particular type of the catalog ListOfComponents GetTypedComponentList(in ComponentType _component_type); -/*! -Gets one component of the catalog. +/*! \brief Get one component of the catalog. */ Acomponent GetComponent(in string componentname) raises(NotFound); -/*! -Gets the description of a component of the catalog. +/*! \brief Get the description of a component of the catalog. */ ComponentDef GetComponentInfo(in string componentName) raises(NotFound); -/*! -Reads a xml file and imports new components from this file. +/*! \brief Read a xml file and import new components from this file. + New components replace existing components with the same name. */ void ImportXmlCatalogFile(in string filename) raises(NotFound); +/*! \brief Shutdown the module catalog server +*/ void shutdown(); } ; }; diff --git a/idl/SALOME_Ports.idl b/idl/SALOME_Ports.idl index 4408561bc..844052a38 100644 --- a/idl/SALOME_Ports.idl +++ b/idl/SALOME_Ports.idl @@ -26,11 +26,13 @@ #ifndef _SALOME_PORTS_IDL_ #define _SALOME_PORTS_IDL_ -/*! \file - This file contains the IDL declarations of the kind of ports provided by the - SALOME component model. +/*! \file SALOME_Ports.idl + \brief This file contains the IDL base interfaces for ports in the SALOME component model. */ +/*! \brief module that contains interfaces to define the kind of ports provided by the +SALOME component model. +*/ module Ports { /*! \brief Interface of a DSC Port. @@ -68,21 +70,13 @@ module Ports { */ interface Data_And_Control_Port : Ports::Port {}; - /*! - This exception indicates that the property doesn't not exist. - */ + //! This exception indicates that the property doesn't not exist. exception NotDefined {}; - /*! - This exception indicates that the given value to the property is not - of a good type. - */ + //! This exception indicates that the given value to the property is not of a good type. exception BadType {}; - /*! - This exception indicates that the given value to the property is not - authorized. - */ + //! This exception indicates that the given value to the property is not authorized. exception BadValue {}; /*! \brief Interface of a PortProperties. @@ -92,8 +86,8 @@ module Ports { */ interface PortProperties { + //! This operation permits to set a value of a property. /*! - This operation permits to set a value of a property. \param name property's name. \param value value of the property. @@ -105,8 +99,8 @@ module Ports { Ports::BadValue, Ports::NotDefined); + //! This operation permits to get property's value. /*! - This operation permits to get property's value. \param name property's name. \return value of the property. @@ -122,6 +116,7 @@ module Ports { a port in the DSC_User programming model. */ interface Data_Short_Port : Ports::Data_Port { + //! this operation can be used by a uses port to send me a short void put(in short data); }; }; diff --git a/idl/SALOME_Registry.idl b/idl/SALOME_Registry.idl index 22e2f4700..03831123f 100644 --- a/idl/SALOME_Registry.idl +++ b/idl/SALOME_Registry.idl @@ -24,8 +24,14 @@ # ifndef __registry_idl__ # define __registry_idl__ +/*! \file SALOME_Registry.idl \brief interfaces for %SALOME registry +*/ + +/*! \brief module that provides interface to %SALOME registry +*/ module Registry { + //! a struct to collect informations about servers (processes) struct Infos { string name; @@ -43,20 +49,33 @@ module Registry string ior; // client }; + //! a list of informations typedef sequence AllInfos; +/*! \brief interface to use %SALOME registry +*/ interface Components { + //! check if registry is running void ping(); - long getPID(); + //! Get the pid of registry server + long getPID(); + //! Add one information to the registry unsigned long add ( in Infos lesInfos ) ; + //! Remove an information from the registry void remove ( in unsigned long id ) ; + //! Get the size of the registry unsigned long size() ; + //! Get all informations from registry AllInfos getall () ; + //! Get history information from registry AllInfos history () ; + //! Stop the registry (hard exit) oneway void end() ; + //! Say hello to registry from process id oneway void hello( in unsigned long id ) ; - void Shutdown(); + //! Shutdown registry server (CORBA exit) + void Shutdown(); } ; } ; diff --git a/idl/SALOME_RessourcesCatalog.idl b/idl/SALOME_RessourcesCatalog.idl index 42f657d05..c430744cd 100755 --- a/idl/SALOME_RessourcesCatalog.idl +++ b/idl/SALOME_RessourcesCatalog.idl @@ -23,42 +23,68 @@ // Author : Estelle Deville // $Header$ // + +/*! \file SALOME_RessourcesCatalog.idl \brief interfaces for %SALOME Resources Catalog +*/ + +/*! \brief module that provides interface to manage the Resources Catalog of %SALOME +*/ module SALOME_RessourcesCatalog{ - // Type Definitions - //Proc_info : information about a processor + //! Information about a processor struct proc_info{ + //! processor number long number; + //! model name string model_name; + //! frequency in MHz float cpu_mhz; + //! cache size in MB float cache_size; }; + //! a list of processor informations typedef sequence ListOfProc; - //Computer_info : information about a computer - // Os and informations about processors + //! Information about a computer + /*! + Os and informations about processors + */ struct computer_info{ + //! computer name string name; + //! OS name string OS; + //! OS version string OS_version; + //! processors list ListOfProc procs; }; - enum ContainerType {Cpp, python, NP}; + //! Container type + enum ContainerType { + Cpp, /*!< C++ container */ + python, /*!< python container */ + NP /*!< NP container */ + }; + //! a list of container types typedef sequence ListOfContainerType; + //! a list of computer names typedef sequence ListOfComputer; - // exception thrown if a computer is not found in the catalog - + //! exception thrown if a computer is not found in the catalog exception NotFound {}; //------------------------------------------------------------------ - //Interface +/*! \brief interface to get information about Resources +*/ interface RessourcesCatalog { + //! Get the catalog computers list ListOfComputer GetComputerList(); + //! Get the container types list for a given computer ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound); + //! Get computer information for a given computer computer_info GetComputerInfo(in string computer) raises(NotFound); }; }; diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl index 2b663a488..502104a43 100644 --- a/idl/SALOME_Session.idl +++ b/idl/SALOME_Session.idl @@ -25,9 +25,9 @@ // #include "SALOME_Component.idl" -/*! - This package contains interfaces used for management of the session in %SALOME application. -*/ +/*! \file SALOME_Session.idl \brief file that contains interface of the session + */ + module SALOME { /*! \brief State of the session @@ -35,8 +35,8 @@ module SALOME This enumeration contains values defining the state of the session */ - enum SessionState {asleep, /*! Session is inactive */ - running /*! Session is running */ + enum SessionState {asleep, /*!< Session is inactive */ + running /*!< Session is running */ } ; /*! \brief %Session State and Statistics @@ -50,17 +50,16 @@ module SALOME /*! \brief State of the session It can be: - * -# asleep : no running study - * -# running : one or more running studies + -# asleep : no running study + -# running : one or more running studies */ SessionState state ; -/*! Number of running studies -*/ +//! Number of running studies short runningStudies ; -/*! It is True if GUI is active in the session -*/ +//! It is True if GUI is active in the session boolean activeGUI ; } ; + /*! \brief Interface of the session The %session Server launches and stops GUI (Graphical User Interface). @@ -69,52 +68,34 @@ module SALOME interface Session { -/*! - This exception is raised when trying to stop the %session with active GUI -*/ +//! This exception is raised when trying to stop the %session with active GUI exception GUIActive {} ; -/*! - This exception is raised when trying to stop the %session with a number of running studies. -*/ +//! This exception is raised when trying to stop the %session with a number of running studies. exception RunningStudies {} ; -/*! - Launches GUI in the session -*/ +//! Launches GUI in the session void GetInterface(); -/*! - Returns a standalone component -*/ +//! Returns a standalone component Engines::Component GetComponent(in string theLibraryName); -/*! - Stops the %Session (It must be idle) -*/ +//! Stops the %Session (It must be idle) void StopSession() raises(GUIActive, RunningStudies) ; -/*! - Gets Session State -*/ +//! Gets Session State StatSession GetStatSession() ; -/*! - Determines whether the server has already been loaded or not. -*/ + +//! Determines whether the server has already been loaded or not. void ping(); -/*! - Returns the PID of the server -*/ +//! Returns the PID of the server long getPID(); -/*! - Get Active study ID -*/ +//! Get Active study ID long GetActiveStudyId(); -/*! - Restores a state of the study at theSavePoint -*/ +//! Restores a state of the study at theSavePoint boolean restoreVisualState(in long theSavePoint); + + //! Send a message to the session GUI desktop that will emit a qt signal /*! - Emit a qt signal from the session GUI desktop window. This method can be used to send a message to the GUI from the standalone container. Caution: this method can block the Session and the calling container @@ -123,6 +104,8 @@ module SALOME In such a case it is recommended to use oneway method. */ void emitMessage(in string theMessage); + + //! same as emitMessage but in a non blocking way /*! Emit a qt signal from the session GUI desktop window. This method can be used to send a message to the GUI from the standalone diff --git a/idl/SALOME_TestComponent.idl b/idl/SALOME_TestComponent.idl index dc6ae8c48..6bd472f21 100644 --- a/idl/SALOME_TestComponent.idl +++ b/idl/SALOME_TestComponent.idl @@ -25,9 +25,14 @@ // #include "SALOME_Component.idl" +/*! \file SALOME_TestComponent.idl \brief an interface for testing Component and Container +*/ + module Engines { +/*! \brief a component with 2 operations (Coucou and Setenv) +*/ interface TestComponent : Component { string Coucou(in long L); @@ -35,3 +40,4 @@ module Engines }; }; + diff --git a/idl/SALOME_TestMPIComponent.idl b/idl/SALOME_TestMPIComponent.idl index 090d74ef5..4aad69891 100644 --- a/idl/SALOME_TestMPIComponent.idl +++ b/idl/SALOME_TestMPIComponent.idl @@ -30,6 +30,9 @@ #include "SALOME_Component.idl" #include "SALOME_MPIObject.idl" +/*! \file SALOME_TestMPIComponent.idl \brief interface to test MPIObject and MPIContainer +*/ + module Engines { diff --git a/idl/SALOME_TestModuleCatalog.idl b/idl/SALOME_TestModuleCatalog.idl index 06be6c8db..39fa80084 100644 --- a/idl/SALOME_TestModuleCatalog.idl +++ b/idl/SALOME_TestModuleCatalog.idl @@ -27,6 +27,12 @@ #include "SALOME_Component.idl" +/*! \file SALOME_TestModuleCatalog.idl \brief interfaces for %SALOME module catalog test +*/ + +/*! \brief module to test SALOME_ModuleCatalog +*/ + module SALOME_TestModuleCatalog { interface Adder ; diff --git a/idl/TestNotif.idl b/idl/TestNotif.idl index ebf91fa51..f0170baa7 100644 --- a/idl/TestNotif.idl +++ b/idl/TestNotif.idl @@ -24,6 +24,11 @@ # ifndef __TESTNOTIF_IDL_ # define __TESTNOTIF_IDL_ +/*! \file TestNotif.idl \brief for testing notification service +*/ + +/* \brief interface to test notification service +*/ interface Solver { boolean Connect(); diff --git a/idl/TypeData.idl b/idl/TypeData.idl index c75ea69e2..692839d4a 100644 --- a/idl/TypeData.idl +++ b/idl/TypeData.idl @@ -24,6 +24,9 @@ #ifndef _SALOME_TYPEDATA_IDL_ #define _SALOME_TYPEDATA_IDL_ +/*! \file TypeData.idl \brief data definition for tests +*/ + module Engines { diff --git a/idl/nstest.idl b/idl/nstest.idl index c704ff273..3245a5253 100644 --- a/idl/nstest.idl +++ b/idl/nstest.idl @@ -22,17 +22,30 @@ #ifndef NSTEST_IDL #define NSTEST_IDL +/*! \file nstest.idl \brief interfaces for naming service test +*/ + +/*! \brief module with one interface to test naming service +*/ module NSTEST { +/*! \brief small interface for test +*/ interface echo { +/*! \brief operation that returns a long +*/ long getId(); }; +/*! \brief factory interface for test +*/ interface aFactory { +/*! \brief operation that creates a echo %object +*/ echo createInstance(); }; }; -#endif \ No newline at end of file +#endif diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/FindBOOST.cmake index c8af5d003..0c4517cf6 100644 --- a/salome_adm/cmake_files/FindBOOST.cmake +++ b/salome_adm/cmake_files/FindBOOST.cmake @@ -25,7 +25,7 @@ IF(BOOST_ROOT) FIND_LIBRARY(BOOST_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib) FIND_LIBRARY(BOOST_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib) SET(BOOST_LIBS ${BOOST_LIB_THREAD} ${BOOST_LIB_DATE_TIME}) - SET(BOOST_CPPFLAGS -I${BOOST_INCLUDES}) + SET(BOOST_CPPFLAGS -I${BOOST_INCLUDES} -DBOOST_DISABLE_ASSERTS) ELSE(BOOST_ROOT) SET(boost_thread -lboost_thread) ENDIF(BOOST_ROOT) diff --git a/salome_adm/cmake_files/FindHDF5.cmake b/salome_adm/cmake_files/FindHDF5.cmake index c0f0a60c1..27b784a83 100644 --- a/salome_adm/cmake_files/FindHDF5.cmake +++ b/salome_adm/cmake_files/FindHDF5.cmake @@ -29,7 +29,11 @@ FIND_PATH(HDF5_INCLUDES H5public.h ${HDF5_ROOT}/include) SET(HDF5_INCLUDES -I${HDF5_INCLUDES}) IF(WINDOWS) - FIND_LIBRARY(HDF5_LIBS hdf5d ${HDF5_ROOT}/lib) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(HDF5_LIBS hdf5 ${HDF5_ROOT}/lib) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(HDF5_LIBS hdf5d ${HDF5_ROOT}/lib) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) FIND_LIBRARY(HDF5_LIBS hdf5 ${HDF5_ROOT}/lib) ENDIF(WINDOWS) diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index 068623d19..28fd28803 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -42,6 +42,21 @@ ELSE(WINDOWS) # SET(RM /bin/rm) ENDIF(WINDOWS) +IF(WINDOWS) + SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES) + SET(CMAKE_CONFIGURATION_TYPES Release CACHE STRING "compilation types" FORCE) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) +ENDIF(WINDOWS) + +IF(WINDOWS) + SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX}) + IF(CMAKE_INSTALL_PREFIX_ENV) + SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE) + ENDIF(CMAKE_INSTALL_PREFIX_ENV) +ENDIF(WINDOWS) + ## SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_) #SET(RCP rcp) diff --git a/salome_adm/cmake_files/FindPTHREADS.cmake b/salome_adm/cmake_files/FindPTHREADS.cmake index 0fe504c3f..514f2ed52 100644 --- a/salome_adm/cmake_files/FindPTHREADS.cmake +++ b/salome_adm/cmake_files/FindPTHREADS.cmake @@ -25,5 +25,9 @@ IF(PTHREADS_ROOT) IF(PTHREADS_INCLUDE_DIR) SET(PTHREADS_INCLUDES -I${PTHREADS_INCLUDE_DIR}) ENDIF(PTHREADS_INCLUDE_DIR) - FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2d ${PTHREADS_ROOT}/lib) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2 ${PTHREADS_ROOT}/lib) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PTHREADS_LIBRARY pthreadVSE2d ${PTHREADS_ROOT}/lib) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ENDIF(PTHREADS_ROOT) diff --git a/salome_adm/cmake_files/FindPYTHON.cmake b/salome_adm/cmake_files/FindPYTHON.cmake index 4b84d7c58..d97820a0a 100644 --- a/salome_adm/cmake_files/FindPYTHON.cmake +++ b/salome_adm/cmake_files/FindPYTHON.cmake @@ -20,7 +20,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # IF(WINDOWS) - FIND_PROGRAM(PYTHON_EXECUTABLE python_d) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_PROGRAM(PYTHON_EXECUTABLE python) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_PROGRAM(PYTHON_EXECUTABLE python_d) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) FIND_PROGRAM(PYTHON_EXECUTABLE python) ENDIF(WINDOWS) @@ -38,7 +42,11 @@ FIND_PATH(PYTHON_INCLUDE_PATH Python.h PATHS ${PYTHON_ROOT}/include ${PYTHON_ROO IF(WINDOWS) STRING(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOT ${PYTHON_VERSION}) - FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT}_d ${PYTHON_ROOT}/libs) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT} ${PYTHON_ROOT}/libs) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION_WITHOUT_DOT}_d ${PYTHON_ROOT}/libs) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) FIND_LIBRARY(PYTHON_LIBRARIES python${PYTHON_VERSION} ${PYTHON_ROOT}/lib) ENDIF(WINDOWS) @@ -47,5 +55,8 @@ SET(PYTHON_INCLUDES -I${PYTHON_INCLUDE_PATH}) SET(PYTHON_LIBS ${PYTHON_LIBRARIES}) IF(WINDOWS) - SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ENDIF(WINDOWS) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 26ab21a36..31a7fd163 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -134,6 +134,11 @@ class CMakeFile(object): content = content.replace("-no-undefined -version-info 0:0:0", "") content = content.replace("-no-undefined -version-info 2:5:1", "") + # -- + # Compatibility netgen plugin + # -- + content = content.replace("../NETGEN/libNETGEN.la", "${NETGEN_LIBS}") + # -- cas_list = [ "BinLPlugin", @@ -307,10 +312,15 @@ class CMakeFile(object): "TransformationGUI", ] med_list = [ + "InterpGeometric2DAlg", + "interpkernelbases", "interpkernel", - "InterpKernelTest", - "MEDMEMCppTest", + "MEDClientcmodule", + "medcoupling", + "MEDEngine", + "MEDMEMImpl", "medmem", + "MED", "med_V2_1", "MEDWrapperBase", "MEDWrapper", @@ -318,8 +328,29 @@ class CMakeFile(object): "MEDWrapper_V2_2", "SalomeIDLMED", ] + smesh_list = [ + "MEFISTO2D", + "MeshDriverDAT", + "MeshDriverMED", + "MeshDriver", + "MeshDriverSTL", + "MeshDriverUNV", + "SalomeIDLSMESH", + "SMDS", + "SMESHClient", + "SMESHControls", + "SMESHDS", + "SMESHEngine", + "SMESHFiltersSelection", + "SMESHimpl", + "SMESHObject", + "SMESH", + "StdMeshersEngine", + "StdMeshersGUI", + "StdMeshers", + ] full_list = cas_list + kernel_list + gui_list - full_list += geom_list + med_list + full_list += geom_list + med_list + smesh_list # -- full_list += [ "boost_thread", @@ -460,6 +491,34 @@ class CMakeFile(object): INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) """) pass + if self.module == "netgenplugin": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindNETGEN.cmake) + """) + pass + if self.module == "blsurfplugin": + newlines.append(""" + SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR}) + INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindBLSURF.cmake) + """) + pass + if self.module == "visu": + newlines.append(""" + SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + """) + pass pass pass # -- @@ -505,6 +564,21 @@ class CMakeFile(object): SET(MED_ENABLE_GUI ON) """) pass + elif self.module == "smesh": + newlines.append(""" + SET(SMESH_ENABLE_GUI ON) + """) + pass + elif self.module == "netgenplugin": + newlines.append(""" + SET(NETGENPLUGIN_ENABLE_GUI ON) + """) + pass + elif self.module == "blsurfplugin": + newlines.append(""" + SET(BLSURFPLUGIN_ENABLE_GUI ON) + """) + pass # -- pass # -- @@ -689,6 +763,12 @@ class CMakeFile(object): if f[-3:] == ".in": if f == "sstream.in": continue + if f in ["runContainer.in", "stopContainer.in"]: + if self.module == "med": + if self.root[-3:] == "csh": + continue + pass + pass if f == "SALOMEconfig.ref.in": out = "SALOMEconfig.h" else: @@ -957,6 +1037,21 @@ class CMakeFile(object): ''') # -- newlines.append(r''' + IF(WINDOWS) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET(dir $ENV{F2CHOME}) + STRING(REPLACE "\\\\" "/" dir ${dir}) + SET(libadd ${libadd} ${dir}/LIBF77.lib) + SET(libadd ${libadd} ${dir}/LIBI77.lib) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) + ENDIF(WINDOWS) + ''') + # -- + newlines.append(r''' SET(libs ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS}) ''') if key == "bin_PROGRAMS": @@ -995,7 +1090,18 @@ class CMakeFile(object): SET(targets ${targets} medimportcxx) FOREACH(target ${targets}) IF(name STREQUAL ${target}) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT") + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT") ENDIF(name STREQUAL ${target}) ENDFOREACH(target ${targets}) ENDIF(WINDOWS) @@ -1023,6 +1129,7 @@ class CMakeFile(object): SET(targets ${targets} GEOMEngine) SET(targets ${targets} MEDEngine) SET(targets ${targets} SMESHEngine) + SET(targets ${targets} SMESH) FOREACH(target ${targets}) IF(name STREQUAL ${target}) SET(var ${var} -DNOGDI) @@ -1033,6 +1140,20 @@ class CMakeFile(object): # -- newlines.append(r''' IF(WINDOWS) + SET(targets) + SET(targets ${targets} MEFISTO2D) + FOREACH(target ${targets}) + IF(name STREQUAL ${target}) + SET(dir $ENV{F2CHOME}) + STRING(REPLACE "\\\\" "/" dir ${dir}) + SET(var ${var} -I${dir}) + ENDIF(name STREQUAL ${target}) + ENDFOREACH(target ${targets}) + ENDIF(WINDOWS) + ''') + # -- + newlines.append(r''' + IF(WINDOWS) SET(var ${var} -D_USE_MATH_DEFINES) ENDIF(WINDOWS) ''') @@ -1121,6 +1242,17 @@ class CMakeFile(object): FOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES}) GET_FILENAME_COMPONENT(ext ${src} EXT) IF(ext STREQUAL .f) + IF(src STREQUAL trte.f) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src}) + STRING(REPLACE ".f" ".c" src ${src}) + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src}) + SET(output ${src}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND f2c ${input} + MAIN_DEPENDENCY ${input} + ) + ELSE(src STREQUAL trte.f) SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src}) STRING(REPLACE ".f" ".o" src ${src}) SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src}) @@ -1135,6 +1267,7 @@ class CMakeFile(object): COMMAND ${F77} -c -o ${output} ${input} MAIN_DEPENDENCY ${input} ) + ENDIF(src STREQUAL trte.f) ENDIF(ext STREQUAL .f) SET(srcs ${srcs} ${src}) ENDFOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES}) @@ -1178,6 +1311,7 @@ class CMakeFile(object): newlines.append(r''' SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL %s_EXPORTS) '''%(upper_name)) + # -- newlines.append(r''' IF(name STREQUAL SalomeLauncher) SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SALOME%s_EXPORTS) @@ -1213,6 +1347,7 @@ class CMakeFile(object): SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDIMPORTCXX_DLL_EXPORTS) ENDIF(name STREQUAL medimportcxx) ''') + # -- newlines.append(r''' IF(name STREQUAL MEDWrapperBase) SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDWRAPPER_BASE_EXPORTS) @@ -1239,10 +1374,20 @@ class CMakeFile(object): ENDIF(name STREQUAL MEDWrapper) ''') newlines.append(r''' + IF(name STREQUAL interpkernelbases) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL INTERPKERNELBASES_EXPORTS) + ENDIF(name STREQUAL interpkernelbases) + IF(name STREQUAL InterpGeometric2DAlg) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL INTERPKERNELGEOMETRIC2D_EXPORTS) + ENDIF(name STREQUAL InterpGeometric2DAlg) IF(name STREQUAL interpkernel) SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL INTERPKERNEL_EXPORTS) ENDIF(name STREQUAL interpkernel) + IF(name STREQUAL MEDClientcmodule) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEDCLIENT_EXPORTS) + ENDIF(name STREQUAL MEDClientcmodule) ''') + # -- newlines.append(r''' IF(name STREQUAL SMESHControls) SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESHCONTROLS_EXPORTS) @@ -1278,6 +1423,21 @@ class CMakeFile(object): SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEFISTO2D_EXPORTS) ENDIF(name STREQUAL MEFISTO2D) ''') + newlines.append(r''' + IF(name STREQUAL SMESHObject) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESHOBJECT_EXPORTS) + ENDIF(name STREQUAL SMESHObject) + ''') + newlines.append(r''' + IF(name STREQUAL _libSMESH_Swig) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESH_SWIG_EXPORTS) + ENDIF(name STREQUAL _libSMESH_Swig) + ''') + newlines.append(r''' + IF(name STREQUAL NETGENPluginGUI) + SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL NETGENPLUGIN_GUI_EXPORTS) + ENDIF(name STREQUAL NETGENPluginGUI) + ''') # -- self.setLibAdd(key, newlines) # -- @@ -1316,7 +1476,11 @@ class CMakeFile(object): ELSE(BEGIN_WITH_lib) IF(WINDOWS) INSTALL(TARGETS ${name} DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome/${name}.dll DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome/${name}.dll DESTINATION lib/python${PYTHON_VERSION}/site-packages/salome RENAME ${name}_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) GET_TARGET_PROPERTY(version ${name} VERSION) GET_TARGET_PROPERTY(soversion ${name} SOVERSION) diff --git a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 index b6e704b4f..3473cf26e 100644 --- a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +++ b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 @@ -121,7 +121,7 @@ dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif dnl on utilise donc gnu pour generer les dependances. DEPCC=gcc DEPCXX=g++ - DEPCXXFLAGS="-Wno-deprecated" + DEPCXXFLAGS= DIFFFLAGS="-w" dnl MACHINE="OSF1" ;; diff --git a/salome_adm/unix/config_files/ac_cxx_warnings.m4 b/salome_adm/unix/config_files/ac_cxx_warnings.m4 index 14d2cafa8..e9889795c 100644 --- a/salome_adm/unix/config_files/ac_cxx_warnings.m4 +++ b/salome_adm/unix/config_files/ac_cxx_warnings.m4 @@ -23,7 +23,6 @@ dnl @synopsis AC_CXX_WARNINGS dnl Check warning flags for C++ compiler to control warning messages dnl AC_DEFUN([AC_CXX_WARNINGS],[ - AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) AC_CXX_OPTION(-Wparentheses,CXXFLAGS) AC_CXX_OPTION(-Wreturn-type,CXXFLAGS) AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS) diff --git a/salome_adm/unix/config_files/check_openmpi.m4 b/salome_adm/unix/config_files/check_openmpi.m4 index cbbe91f4d..fe5957a2c 100644 --- a/salome_adm/unix/config_files/check_openmpi.m4 +++ b/salome_adm/unix/config_files/check_openmpi.m4 @@ -42,9 +42,15 @@ if test "$WITHOPENMPI" = yes; then AC_CHECK_HEADER(mpi.h,WITHOPENMPI="yes",WITHOPENMPI="no") CPPFLAGS="$CPPFLAGS_old" + LIBS_old="$LIBS" + LIBS="-L${OPENMPI_HOME}/lib $LIBS" + AC_CHECK_LIB(mpi,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") + LIBS="$LIBS_old" + AC_MSG_CHECKING(for openmpi) if test "$WITHOPENMPI" = "yes";then mpi_ok=yes + CPPFLAGS="-DWITHOPENMPI $CPPFLAGS" AC_MSG_RESULT(yes) else mpi_ok=no diff --git a/salome_adm/unix/config_files/production.m4 b/salome_adm/unix/config_files/production.m4 index e109a03dc..6664f951b 100644 --- a/salome_adm/unix/config_files/production.m4 +++ b/salome_adm/unix/config_files/production.m4 @@ -38,7 +38,6 @@ AC_ARG_ENABLE([production], ], [enable_production=]AC_ENABLE_PRODUCTION_DEFAULT) -AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) AC_CXX_OPTION(-Wparentheses,CXXFLAGS) AC_CXX_OPTION(-Wreturn-type,CXXFLAGS) AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS) diff --git a/src/Basics/SALOME_Basics.hxx b/src/Basics/SALOME_Basics.hxx index 35defec9f..cd0690952 100644 --- a/src/Basics/SALOME_Basics.hxx +++ b/src/Basics/SALOME_Basics.hxx @@ -30,7 +30,7 @@ #ifdef WIN32 -# ifdef BASICS_EXPORTS +# if defined BASICS_EXPORTS || defined SALOMEBasics_EXPORTS # define BASICS_EXPORT __declspec( dllexport ) # else # define BASICS_EXPORT __declspec( dllimport ) diff --git a/src/Batch/Batch_Defines.hxx b/src/Batch/Batch_Defines.hxx index e61d83c1e..84548ad42 100755 --- a/src/Batch/Batch_Defines.hxx +++ b/src/Batch/Batch_Defines.hxx @@ -27,7 +27,7 @@ #define _BATCH_Defines_HXX_ #ifdef WIN32 -# ifdef BATCH_EXPORTS +# if defined BATCH_EXPORTS || defined SalomeBatch_EXPORTS # define BATCH_EXPORT __declspec( dllexport ) # else # define BATCH_EXPORT __declspec( dllimport ) diff --git a/src/Batch/Batch_FactBatchManager_Local_RSH.cxx b/src/Batch/Batch_FactBatchManager_Local_RSH.cxx index e52954fd0..8e21bb577 100644 --- a/src/Batch/Batch_FactBatchManager_Local_RSH.cxx +++ b/src/Batch/Batch_FactBatchManager_Local_RSH.cxx @@ -34,15 +34,6 @@ //#include "utilities.h" namespace Batch { - - static FactBatchManager_Local_RSH* instanceOfFBM_eLSF() - { - static FactBatchManager_Local_RSH* sFBM_Local_RSH = 0; - if ( !sFBM_Local_RSH ) - sFBM_Local_RSH = new FactBatchManager_Local_RSH(); - - return sFBM_Local_RSH; - } // Constructeur FactBatchManager_Local_RSH::FactBatchManager_Local_RSH() : FactBatchManager("RSH") diff --git a/src/Batch/Batch_FactBatchManager_eLSF.cxx b/src/Batch/Batch_FactBatchManager_eLSF.cxx index b21c36598..e46b355bd 100644 --- a/src/Batch/Batch_FactBatchManager_eLSF.cxx +++ b/src/Batch/Batch_FactBatchManager_eLSF.cxx @@ -35,16 +35,6 @@ namespace Batch { -static FactBatchManager_eLSF* instanceOfFBM_eLSF() -{ - static FactBatchManager_eLSF* sFBM_eLSF = 0; - if ( !sFBM_eLSF ) - sFBM_eLSF = new FactBatchManager_eLSF(); - - return sFBM_eLSF; -} - - // Constructeur FactBatchManager_eLSF::FactBatchManager_eLSF() : FactBatchManager_eClient("eLSF") { diff --git a/src/Batch/Batch_FactBatchManager_ePBS.cxx b/src/Batch/Batch_FactBatchManager_ePBS.cxx index e5745b2fc..863ed5212 100644 --- a/src/Batch/Batch_FactBatchManager_ePBS.cxx +++ b/src/Batch/Batch_FactBatchManager_ePBS.cxx @@ -35,15 +35,6 @@ namespace Batch { - static FactBatchManager_ePBS* instanceOfFBM_eLSF() - { - static FactBatchManager_ePBS* sFBM_ePBS = 0; - if ( !sFBM_ePBS ) - sFBM_ePBS = new FactBatchManager_ePBS(); - - return sFBM_ePBS; - } - // Constructeur FactBatchManager_ePBS::FactBatchManager_ePBS() : FactBatchManager_eClient("ePBS") { diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index dfcae478f..eca25186b 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -56,6 +56,11 @@ static Engines_Component_i * theEngines_Component ; bool Engines_Component_i::_isMultiStudy = true; bool Engines_Component_i::_isMultiInstance = false; +/*! \class Engines_Component_i + * \brief C++ implementation of Engines::Component interface + * + */ + //============================================================================= /*! * Default constructor, not for use @@ -69,8 +74,8 @@ Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupp } //============================================================================= -/*! - * Standard Constructor for generic Component, used in derived class +/*! \brief Standard Constructor for generic Component, used in derived class + * * Connection to Registry and Notification * \param orb Object Request broker given by Container * \param poa Portable Object Adapter from Container (normally root_poa) @@ -78,6 +83,7 @@ Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupp * \param instanceName unique instance name for this object (see Container_i) * \param interfaceName component class name * \param notif use of notification + * \param regist (true or false) use of registry (default true) */ //============================================================================= @@ -86,7 +92,8 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, PortableServer::ObjectId * contId, const char *instanceName, const char *interfaceName, - bool notif) : + bool notif, + bool regist ) : _instanceName(instanceName), _interfaceName(interfaceName), _myConnexionToRegistry(0), @@ -100,23 +107,25 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, _CanceledThread(false) { MESSAGE("Component constructor with instanceName "<< _instanceName); - //SCRUTE(pd_refCount); _orb = CORBA::ORB::_duplicate(orb); _poa = PortableServer::POA::_duplicate(poa); _contId = contId ; CORBA::Object_var o = _poa->id_to_reference(*contId); // container ior... _container=Engines::Container::_narrow(o); - const CORBA::String_var ior = _orb->object_to_string(o); - _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", - _instanceName.c_str()); + + if(regist) + { + const CORBA::String_var ior = _orb->object_to_string(o); + _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", + _instanceName.c_str()); + } _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); - //SCRUTE(pd_refCount); } //============================================================================= -/*! - * Standard Constructor for standalone Component, used in derived class +/*! \brief Standard Constructor for standalone Component, used in derived class + * * Connection to Registry and Notification * \param orb Object Request broker given by Container * \param poa Portable Object Adapter from Container (normally root_poa) @@ -167,48 +176,6 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, } -//============================================================================= -/*! - * Standard constructor for parallel component - * Connection Notification (no connection to Registry !) - * \param orb Object Request broker given by Container - * \param poa Portable Object Adapter from Container (normally root_poa) - * \param contId container CORBA id inside the server - * \param instanceName unique instance name for this object (see Container_i) - * \param interfaceName component class name - * \param flag not used... - * \param notif use of notification - */ -//============================================================================= - -Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - int flag, - bool notif ) : - _instanceName(instanceName), - _interfaceName(interfaceName), - _myConnexionToRegistry(0), - _notifSupplier(0), - _ThreadId(0) , - _ThreadCpuUsed(0) , - _Executed(false) , - _graphName("") , - _nodeName(""), - _studyId(-1), - _CanceledThread(false) -{ - _orb = CORBA::ORB::_duplicate(orb); - _poa = PortableServer::POA::_duplicate(poa); - _contId = contId ; - CORBA::Object_var o = _poa->id_to_reference(*contId); // container ior... - _container=Engines::Container::_narrow(o); - - _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); -} - //============================================================================= /*! * Destructor: call Container for decrement of instances count. diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 954c8fcf7..7558ef37e 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -64,10 +64,6 @@ bool _Sleeping = false ; int _ArgC ; char ** _ArgV ; - -// Containers with name FactoryServer are started via rsh in LifeCycleCORBA -// Other Containers are started via start_impl of FactoryServer - extern "C" {void ActSigIntHandler() ; } #ifndef WIN32 extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } @@ -87,6 +83,12 @@ map Engines_Container_i::_library_map; map Engines_Container_i::_toRemove_map; omni_mutex Engines_Container_i::_numInstanceMutex ; +/*! \class Engines_Container_i + * \brief C++ implementation of Engines::Container interface + * + */ + + //============================================================================= /*! * Default constructor, not for use @@ -94,7 +96,7 @@ omni_mutex Engines_Container_i::_numInstanceMutex ; //============================================================================= Engines_Container_i::Engines_Container_i () : -_numInstance(0) +_numInstance(0),_id(0),_NS(0) { } @@ -111,7 +113,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, bool activAndRegist, bool isServantAloneInProcess ) : -_numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) + _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess),_id(0),_NS(0) { _pid = (long)getpid(); @@ -227,12 +229,14 @@ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) Engines_Container_i::~Engines_Container_i() { MESSAGE("Container_i::~Container_i()"); - delete _id; + if(_id) + delete _id; if(_NS) delete _NS; } //============================================================================= +//! Get container name /*! * CORBA attribute: Container name (see constructor) */ @@ -244,6 +248,7 @@ char* Engines_Container_i::name() } //============================================================================= +//! Get container working directory /*! * CORBA attribute: Container working directory */ @@ -257,6 +262,7 @@ char* Engines_Container_i::workingdir() } //============================================================================= +//! Get container log file name /*! * CORBA attribute: Container log file name */ @@ -267,12 +273,14 @@ char* Engines_Container_i::logfilename() return CORBA::string_dup(_logfilename.c_str()) ; } +//! Set container log file name void Engines_Container_i::logfilename(const char* name) { _logfilename=name; } //============================================================================= +//! Get container host name /*! * CORBA method: Get the hostName of the Container (without domain extensions) */ @@ -286,6 +294,7 @@ char* Engines_Container_i::getHostName() } //============================================================================= +//! Get container PID /*! * CORBA method: Get the PID (process identification) of the Container */ @@ -297,6 +306,7 @@ CORBA::Long Engines_Container_i::getPID() } //============================================================================= +//! Ping the servant to check it is still alive /*! * CORBA method: check if servant is still alive */ @@ -308,6 +318,7 @@ void Engines_Container_i::ping() } //============================================================================= +//! Shutdown the container /*! * CORBA method, oneway: Server shutdown. * - Container name removed from naming service, @@ -473,6 +484,7 @@ int findpathof(string& pth, const string& exe) //============================================================================= +//! load a new component class /*! * CORBA method: load a new component class (Python or C++ implementation) * \param componentName like COMPONENT @@ -572,6 +584,7 @@ Engines_Container_i::load_component_Library(const char* componentName) } //============================================================================= +//! Create a new component instance /*! * CORBA method: Creates a new servant instance of a component. * The servant registers itself to naming service and Registry. @@ -749,6 +762,7 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, } //============================================================================= +//! Find an existing (in the container) component instance /*! * CORBA method: Finds a servant instance of a component * \param registeredName Name of the component in Registry or Name Service, @@ -783,11 +797,15 @@ Engines_Container_i::find_component_instance( const char* registeredName, } //============================================================================= +//! Find or create a new component instance /*! * CORBA method: find or create an instance of the component (servant), * load a new component class (dynamic library) if required, +* * ---- FOR COMPATIBILITY WITH 2.2 ---- +* * ---- USE ONLY FOR MULTISTUDY INSTANCES ! -------- +* * The servant registers itself to naming service and Registry. * \param genericRegisterName Name of the component to register * in Registry & Name Service @@ -809,6 +827,7 @@ Engines_Container_i::load_impl( const char* genericRegisterName, //============================================================================= +//! Remove the component instance from container /*! * CORBA method: Stops the component servant, and deletes all related objects * \param component_i Component to be removed @@ -828,6 +847,7 @@ void Engines_Container_i::remove_impl(Engines::Component_ptr component_i) } //============================================================================= +//! Unload component libraries from the container /*! * CORBA method: Discharges unused libraries from the container. */ @@ -856,6 +876,7 @@ void Engines_Container_i::finalize_removal() } //============================================================================= +//! Kill the container /*! * CORBA method: Kill the container process with exit(0). * To remove : never returns ! @@ -876,6 +897,7 @@ bool Engines_Container_i::Kill_impl() } //============================================================================= +//! Get or create a file reference object associated to a local file (to transfer it) /*! * CORBA method: get or create a fileRef object associated to a local file * (a file on the computer on which runs the container server), which stores @@ -916,6 +938,7 @@ Engines_Container_i::createFileRef(const char* origFileName) } //============================================================================= +//! Get a fileTransfer reference /*! * CORBA method: * \return a reference to the fileTransfer object @@ -931,6 +954,7 @@ Engines_Container_i::getFileTransfer() } +//! Create a Salome file Engines::Salome_file_ptr Engines_Container_i::createSalome_file(const char* origFileName) { @@ -962,6 +986,7 @@ Engines_Container_i::createSalome_file(const char* origFileName) return theSalome_file; } //============================================================================= +//! Finds an already existing component instance or create a new instance /*! * C++ method: Finds an already existing servant instance of a component, or * create an instance. @@ -973,20 +998,19 @@ Engines_Container_i::createSalome_file(const char* origFileName) * \return a loaded component * * example with names: -* aGenRegisterName = COMPONENT (= first argument) -* impl_name = libCOMPONENTEngine.so (= second argument) -* _containerName = /Containers/cli76ce/FactoryServer -* factoryName = COMPONENTEngine_factory -* component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT -* -* instanceName = COMPONENT_inst_1 -* component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 +* - aGenRegisterName = COMPONENT (= first argument) +* - impl_name = libCOMPONENTEngine.so (= second argument) +* - _containerName = /Containers/cli76ce/FactoryServer +* - factoryName = COMPONENTEngine_factory +* - component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT +* - instanceName = COMPONENT_inst_1 +* - component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 */ //============================================================================= Engines::Component_ptr -Engines_Container_i::find_or_create_instance(string genericRegisterName, - string componentLibraryName) +Engines_Container_i::find_or_create_instance(std::string genericRegisterName, + std::string componentLibraryName) { string aGenRegisterName = genericRegisterName; string impl_name = componentLibraryName; @@ -1044,6 +1068,7 @@ Engines_Container_i::find_or_create_instance(string genericRegisterName, } //============================================================================= +//! Create a new component instance /*! * C++ method: create a servant instance of a component. * \param genericRegisterName Name of the component instance to register @@ -1055,17 +1080,17 @@ Engines_Container_i::find_or_create_instance(string genericRegisterName, * \return a loaded component * * example with names: -* aGenRegisterName = COMPONENT (= first argument) -* _containerName = /Containers/cli76ce/FactoryServer -* factoryName = COMPONENTEngine_factory -* component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT -* instanceName = COMPONENT_inst_1 -* component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 +* - aGenRegisterName = COMPONENT (= first argument) +* - _containerName = /Containers/cli76ce/FactoryServer +* - factoryName = COMPONENTEngine_factory +* - component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT +* - instanceName = COMPONENT_inst_1 +* - component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1 */ //============================================================================= Engines::Component_ptr -Engines_Container_i::createInstance(string genericRegisterName, +Engines_Container_i::createInstance(std::string genericRegisterName, void *handle, int studyId) { @@ -1161,12 +1186,13 @@ Engines_Container_i::createInstance(string genericRegisterName, } //============================================================================= +//! Decrement component instance reference count /*! * */ //============================================================================= -void Engines_Container_i::decInstanceCnt(string genericRegisterName) +void Engines_Container_i::decInstanceCnt(std::string genericRegisterName) { if(_cntInstances_map.count(genericRegisterName)==0) return; @@ -1190,6 +1216,7 @@ void Engines_Container_i::decInstanceCnt(string genericRegisterName) } //============================================================================= +//! Indicate if container is a python one /*! * Retrieves only with container naming convention if it is a python container */ diff --git a/src/Container/SALOME_ComponentPy.py b/src/Container/SALOME_ComponentPy.py index dd7320643..1d5722ad9 100755 --- a/src/Container/SALOME_ComponentPy.py +++ b/src/Container/SALOME_ComponentPy.py @@ -26,6 +26,11 @@ # Module : SALOME # $Header$ # +## @package SALOME_ComponentPy +# \brief python implementation of component interface for Kernel +# +# + import os import sys import time @@ -46,8 +51,9 @@ from thread import * _Sleeping = 0 -#define an implementation of the component interface - +## define an implementation of the component interface Engines::Component +# +# class SALOME_ComponentPy_i (Engines__POA.Component): _orb = None _poa = None @@ -288,3 +294,14 @@ class SALOME_ComponentPy_i (Engines__POA.Component): def getStudyId(self): return self._studyId + + #------------------------------------------------------------------------- + + def hasObjectInfo(self): + return 0 + + #------------------------------------------------------------------------- + + def getObjectInfo(self, studyId, entry): + return "" + diff --git a/src/Container/SALOME_Component_i.hxx b/src/Container/SALOME_Component_i.hxx index ccf8ddff2..2285e5f4d 100644 --- a/src/Container/SALOME_Component_i.hxx +++ b/src/Container/SALOME_Component_i.hxx @@ -59,7 +59,8 @@ public: PortableServer::ObjectId * contId, const char *instanceName, const char *interfaceName, - bool notif = false); + bool notif = false, + bool regist = true); //Constructor for standalone component Engines_Component_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, @@ -67,15 +68,7 @@ public: const char *instanceName, const char *interfaceName, bool notif = false, - bool regist=true); - // Constructor for parallel component : don't call registry - Engines_Component_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName, - int flag, - bool notif = false); + bool regist = true); virtual ~Engines_Component_i(); @@ -100,27 +93,27 @@ public: bool Resume_impl(); CORBA::Long CpuUsed_impl() ; - virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript); + virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, + CORBA::Boolean isPublished, + CORBA::Boolean& isValidScript); - // CORBA operations for Salome_file - virtual Engines::Salome_file_ptr getInputFileToService(const char* service_name, - const char* Salome_file_name); - virtual Engines::Salome_file_ptr getOutputFileToService(const char* service_name, - const char* Salome_file_name); + // CORBA operations for Salome_file + virtual Engines::Salome_file_ptr getInputFileToService(const char* service_name, + const char* Salome_file_name); + virtual Engines::Salome_file_ptr getOutputFileToService(const char* service_name, + const char* Salome_file_name); - virtual void checkInputFilesToService(const char* service_name); - virtual Engines::Salome_file_ptr setInputFileToService(const char* service_name, - const char* Salome_file_name); + virtual void checkInputFilesToService(const char* service_name); + virtual Engines::Salome_file_ptr setInputFileToService(const char* service_name, + const char* Salome_file_name); - virtual void checkOutputFilesToService(const char* service_name); - virtual Engines::Salome_file_ptr setOutputFileToService(const char* service_name, - const char* Salome_file_name); + virtual void checkOutputFilesToService(const char* service_name); + virtual Engines::Salome_file_ptr setOutputFileToService(const char* service_name, + const char* Salome_file_name); // Object information virtual bool hasObjectInfo() { return false; } - virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return ""; } + virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return CORBA::string_dup(""); } // --- local C++ methods @@ -143,8 +136,8 @@ public: void CancelThread() ; virtual void configureSalome_file(std::string service_name, - std::string file_port_name, - Salome_file_i * file); + std::string file_port_name, + Salome_file_i * file); protected: diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index 07024cd13..1cb421223 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -30,7 +30,7 @@ #endif #include -#include +#include #include #include #include diff --git a/src/Container/SALOME_Container.hxx b/src/Container/SALOME_Container.hxx index c1e1e24df..b24bd4ea2 100755 --- a/src/Container/SALOME_Container.hxx +++ b/src/Container/SALOME_Container.hxx @@ -27,7 +27,7 @@ #define _SALOME_Container_HXX_ #ifdef WIN32 -# ifdef CONTAINER_EXPORTS +# if defined CONTAINER_EXPORTS || defined SalomeContainer_EXPORTS # define CONTAINER_EXPORT __declspec( dllexport ) # else # define CONTAINER_EXPORT __declspec( dllimport ) diff --git a/src/Container/SALOME_Container.py b/src/Container/SALOME_Container.py index 9b6d7f893..1a92f6b54 100644 --- a/src/Container/SALOME_Container.py +++ b/src/Container/SALOME_Container.py @@ -26,6 +26,11 @@ # Module : SALOME # $Header$ # +## @package SALOME_Container +# \brief python implementation of container interface for Kernel +# +# + import os import sys import string diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 3c7fdf021..d00618fd2 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -62,7 +62,6 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb, PortableSer MESSAGE("constructor"); _NS = ns; _ResManager = rm; - _id=0; PortableServer::POAManager_var pman = poa->the_POAManager(); _orb = CORBA::ORB::_duplicate(orb) ; @@ -177,8 +176,8 @@ void SALOME_ContainerManager::ShutdownContainers() } //============================================================================= +//! Find a suitable Container in a list of machines, or start one /*! CORBA Method: - * Find a suitable Container in a list of machines, or start one * \param params Machine Parameters required for the container * \param possibleComputers list of machines usable for find or start */ @@ -199,10 +198,13 @@ FindOrStartContainer(const Engines::MachineParameters& params, } //============================================================================= -/*! CORBA Method: - * Start a suitable Container in a list of machines +//! Start a suitable Container in a list of machines with constraints and a policy +/*! C++ Method: + * Constraints are given by a machine parameters struct * \param params Machine Parameters required for the container * \param possibleComputers list of machines usable for start + * \param policy policy to use (first,cycl or best) + * \param container_exe specific container executable (default=SALOME_Container) */ //============================================================================= @@ -217,9 +219,7 @@ StartContainer(const Engines::MachineParameters& params, if (parallelLib != "") return FindOrStartParallelContainer(params, possibleComputers); #endif - long id; string containerNameInNS; - char idc[3*sizeof(long)]; Engines::Container_ptr ret = Engines::Container::_nil(); MESSAGE("SALOME_ContainerManager::StartContainer " << @@ -254,15 +254,6 @@ StartContainer(const Engines::MachineParameters& params, MESSAGE("try to launch it on " << theMachine); - // Get Id for container: a parallel container registers in Naming Service - // on the machine where is process 0. ContainerManager does'nt know the name - // of this machine before the launch of the parallel container. So to get - // the IOR of the parallel container in Naming Service, ContainerManager - // gives a unique Id. The parallel container registers his name under - // /ContainerManager/Id directory in NamingService - - id = GetIdForContainer(); - string command; if(theMachine==""){ MESSAGE("SALOME_ContainerManager::StartContainer : " << @@ -270,19 +261,14 @@ StartContainer(const Engines::MachineParameters& params, return Engines::Container::_nil(); } else if(theMachine==Kernel_Utils::GetHostname()) - command = BuildCommandToLaunchLocalContainer(params,id,container_exe); + command = BuildCommandToLaunchLocalContainer(params,container_exe); else - command = BuildCommandToLaunchRemoteContainer(theMachine,params,id,container_exe); - - // RmTmpFile(); Too early! May be this function has not been used for a long time... + command = BuildCommandToLaunchRemoteContainer(theMachine,params,container_exe); //check if an entry exists in Naming service if(params.isMPI) - { - containerNameInNS = "/ContainerManager/id"; - sprintf(idc,"%ld",id); - containerNameInNS += idc; - } + // A parallel container register on zero node in NS + containerNameInNS = _NS->BuildContainerNameForNS(params,GetMPIZeroNode(theMachine).c_str()); else containerNameInNS = _NS->BuildContainerNameForNS(params,theMachine.c_str()); @@ -314,13 +300,13 @@ StartContainer(const Engines::MachineParameters& params, if (status == -1){ MESSAGE("SALOME_LifeCycleCORBA::StartOrFindContainer rsh failed " << "(system command status -1)"); - RmTmpFile(); // command file can be removed here + RmTmpFile(_TmpFileName); // command file can be removed here return Engines::Container::_nil(); } else if (status == 217){ MESSAGE("SALOME_LifeCycleCORBA::StartOrFindContainer rsh failed " << "(system command status 217)"); - RmTmpFile(); // command file can be removed here + RmTmpFile(_TmpFileName); // command file can be removed here return Engines::Container::_nil(); } else{ @@ -352,16 +338,17 @@ StartContainer(const Engines::MachineParameters& params, ret->logfilename(logFilename.c_str()); } - RmTmpFile(); // command file can be removed here + RmTmpFile(_TmpFileName); // command file can be removed here return ret; } } //============================================================================= +//! Start a suitable Container for a list of components with constraints and a policy /*! CORBA Method: - * Start a suitable Container in a list of machines * \param params Machine Parameters required for the container - * \param possibleComputers list of machines usable for start + * \param policy policy to use (first,cycl or best) + * \param componentList list of component to be loaded on this container */ //============================================================================= @@ -516,33 +503,33 @@ FindOrStartParallelContainer(const Engines::MachineParameters& params_const, proxy->start(); } catch(CORBA::SystemException& e) - { - INFOS("Caught CORBA::SystemException. : " << e); - } + { + INFOS("Caught CORBA::SystemException. : " << e); + } catch(PortableServer::POA::ServantAlreadyActive&) - { - INFOS("Caught CORBA::ServantAlreadyActiveException"); - } + { + INFOS("Caught CORBA::ServantAlreadyActiveException"); + } catch(CORBA::Exception&) - { - INFOS("Caught CORBA::Exception."); - } + { + INFOS("Caught CORBA::Exception."); + } catch(std::exception& exc) - { - INFOS("Caught std::exception - "<ContainerName(params); - command += " -id "; - sprintf(idc,"%ld",id); - command += idc; command += " -"; AddOmninamesParams(command); @@ -914,12 +887,11 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer string SALOME_ContainerManager::BuildCommandToLaunchLocalContainer -(const Engines::MachineParameters& params, const long id,const std::string& container_exe) +(const Engines::MachineParameters& params, const std::string& container_exe) { _TmpFileName = BuildTemporaryFileName(); string command; int nbproc = 0; - //char idc[3*sizeof(long)]; ofstream command_file( _TmpFileName.c_str() ); @@ -946,14 +918,23 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer #ifdef WITHLAM //command += "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; command_file << "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; +#elif defined(WITHOPENMPI) + //command += "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace "; + if( getenv("OMPI_URI_FILE") == NULL ) + command_file << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace"; + else + { + command_file << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:"; + command_file << getenv("OMPI_URI_FILE"); + } #endif if (isPythonContainer(params.container_name)) //command += "pyMPI SALOME_ContainerPy.py "; - command_file << "pyMPI SALOME_ContainerPy.py "; + command_file << " pyMPI SALOME_ContainerPy.py "; else //command += "SALOME_MPIContainer "; - command_file << "SALOME_MPIContainer "; + command_file << " SALOME_MPIContainer "; } else @@ -998,16 +979,8 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer } - - /*command += _NS->ContainerName(params); - command += " -id "; - sprintf(idc,"%ld",id); - command += idc; - command += " -"; - AddOmninamesParams(command);*/ - command_file << _NS->ContainerName(params); - command_file << " -id " << id << " -"; + command_file << " -"; AddOmninamesParams(command_file); command_file.close(); @@ -1027,9 +1000,9 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalContainer */ //============================================================================= -void SALOME_ContainerManager::RmTmpFile() +void SALOME_ContainerManager::RmTmpFile(std::string& tmpFileName) { - int lenght = _TmpFileName.size(); + int lenght = tmpFileName.size(); if ( lenght > 0) { #ifdef WIN32 @@ -1038,13 +1011,13 @@ void SALOME_ContainerManager::RmTmpFile() string command = "rm "; #endif if ( lenght > 4 ) - command += _TmpFileName.substr(0, lenght - 3 ); + command += tmpFileName.substr(0, lenght - 3 ); else - command += _TmpFileName; + command += tmpFileName; command += '*'; system(command.c_str()); //if dir is empty - remove it - string tmp_dir = Kernel_Utils::GetDirByPath( _TmpFileName ); + string tmp_dir = Kernel_Utils::GetDirByPath( tmpFileName ); if ( Kernel_Utils::IsEmptyDir( tmp_dir ) ) { #ifdef WIN32 @@ -1064,11 +1037,11 @@ void SALOME_ContainerManager::RmTmpFile() //============================================================================= void SALOME_ContainerManager::AddOmninamesParams(string& command) const - { - CORBA::String_var iorstr = _NS->getIORaddr(); - command += "ORBInitRef NameService="; - command += iorstr; - } +{ + CORBA::String_var iorstr = _NS->getIORaddr(); + command += "ORBInitRef NameService="; + command += iorstr; +} //============================================================================= @@ -1078,11 +1051,11 @@ void SALOME_ContainerManager::AddOmninamesParams(string& command) const //============================================================================= void SALOME_ContainerManager::AddOmninamesParams(ofstream& fileStream) const - { - CORBA::String_var iorstr = _NS->getIORaddr(); - fileStream << "ORBInitRef NameService="; - fileStream << iorstr; - } +{ + CORBA::String_var iorstr = _NS->getIORaddr(); + fileStream << "ORBInitRef NameService="; + fileStream << iorstr; +} //============================================================================= /*! @@ -1091,16 +1064,16 @@ void SALOME_ContainerManager::AddOmninamesParams(ofstream& fileStream) const //============================================================================= string SALOME_ContainerManager::BuildTemporaryFileName() const - { - //build more complex file name to support multiple salome session - string aFileName = Kernel_Utils::GetTmpFileName(); +{ + //build more complex file name to support multiple salome session + string aFileName = Kernel_Utils::GetTmpFileName(); #ifndef WIN32 - aFileName += ".sh"; + aFileName += ".sh"; #else - aFileName += ".bat"; + aFileName += ".bat"; #endif - return aFileName; - } + return aFileName; +} //============================================================================= @@ -1152,6 +1125,13 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer tempOutputFile << nbproc << " "; #ifdef WITHLAM tempOutputFile << "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace "; +#elif defined(WITHOPENMPI) + if( getenv("OMPI_URI_FILE") == NULL ) + tempOutputFile << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace"; + else{ + tempOutputFile << "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:"; + tempOutputFile << getenv("OMPI_URI_FILE"); + } #endif } @@ -1160,9 +1140,9 @@ SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer if (params.isMPI) { if (isPythonContainer(params.container_name)) - tempOutputFile << "pyMPI SALOME_ContainerPy.py "; + tempOutputFile << " pyMPI SALOME_ContainerPy.py "; else - tempOutputFile << "SALOME_MPIContainer "; + tempOutputFile << " SALOME_MPIContainer "; } else @@ -1261,90 +1241,90 @@ SALOME_ContainerManager::BuildCommandToLaunchLocalParallelContainer(const std::s string real_exe_name = exe_name + parallelLib; if (parallelLib == "Dummy") - { - //command = "gdb --args "; - //command = "valgrind --tool=memcheck --log-file=val_log "; - //command += real_exe_name; - - command = real_exe_name; - - command += " " + _NS->ContainerName(rtn); - command += " " + parallelLib; - command += " " + hostname; - command += " -"; - AddOmninamesParams(command); - } - - else if (parallelLib == "Mpi") - { - // Step 1 : check if MPI is started - if (_MpiStarted == false) { - startMPI(); - } + //command = "gdb --args "; + //command = "valgrind --tool=memcheck --log-file=val_log "; + //command += real_exe_name; - if (par < 0) - { - // Nodes case + command = real_exe_name; - command = "mpiexec -np " + string(buffer) + " "; -// command += "gdb --args "; - command += real_exe_name; command += " " + _NS->ContainerName(rtn); command += " " + parallelLib; command += " " + hostname; command += " -"; AddOmninamesParams(command); } - else + + else if (parallelLib == "Mpi") { - // Proxy case - command = "mpiexec -np 1 "; - command += real_exe_name; - command += " " + _NS->ContainerName(rtn); - command += " " + string(buffer); - command += " " + parallelLib; - command += " " + hostname; - command += " -"; - AddOmninamesParams(command); + // Step 1 : check if MPI is started + if (_MpiStarted == false) + { + startMPI(); + } + + if (par < 0) + { + // Nodes case + + command = "mpiexec -np " + string(buffer) + " "; + // command += "gdb --args "; + command += real_exe_name; + command += " " + _NS->ContainerName(rtn); + command += " " + parallelLib; + command += " " + hostname; + command += " -"; + AddOmninamesParams(command); + } + else + { + // Proxy case + command = "mpiexec -np 1 "; + command += real_exe_name; + command += " " + _NS->ContainerName(rtn); + command += " " + string(buffer); + command += " " + parallelLib; + command += " " + hostname; + command += " -"; + AddOmninamesParams(command); + } } - } else - { - std::string message("Unknown parallelLib" + parallelLib); - throw SALOME_Exception(message.c_str()); - } + { + std::string message("Unknown parallelLib" + parallelLib); + throw SALOME_Exception(message.c_str()); + } // log choice if (log == "default") - { - command += " > /tmp/"; - command += _NS->ContainerName(rtn); - command += "_"; - command += Kernel_Utils::GetHostname(); - command += "_"; - command += getenv( "USER" ) ; - command += ".log 2>&1 &" ; - } + { + command += " > /tmp/"; + command += _NS->ContainerName(rtn); + command += "_"; + command += Kernel_Utils::GetHostname(); + command += "_"; + command += getenv( "USER" ) ; + command += ".log 2>&1 &" ; + } if (log == "xterm") - { - command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; " - + command + " \" &"; -// + command + "; echo $LD_LIBRARY_PATH; cat \" &"; - } + { + command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; " + + command + " \" &"; + // + command + "; echo $LD_LIBRARY_PATH; cat \" &"; + } return command; -/* if (log == "xterm") - { - command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; echo $LD_LIBRARY_PATH; echo $PATH; " + command + "; cat \" &"; - } -*/ -/* command = "cd ; rm " + fichier_commande + "; touch " + \ - fichier_commande + "; echo \" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; " + \ - command + " >& /tmp/ribes_" + fichier_commande + " & \" > " + fichier_commande + ";"; - command += "ssh cn01 sh " + fichier_commande + " &"; - cerr << "La commande : " << command << endl; -*/ + /* if (log == "xterm") + { + command = "/usr/X11R6/bin/xterm -e \"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export PATH=$PATH; echo $LD_LIBRARY_PATH; echo $PATH; " + command + "; cat \" &"; + } + */ + /* command = "cd ; rm " + fichier_commande + "; touch " + \ + fichier_commande + "; echo \" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; " + \ + command + " >& /tmp/ribes_" + fichier_commande + " & \" > " + fichier_commande + ";"; + command += "ssh cn01 sh " + fichier_commande + " &"; + cerr << "La commande : " << command << endl; + */ } void SALOME_ContainerManager::startMPI() @@ -1359,16 +1339,35 @@ void SALOME_ContainerManager::startMPI() int status = system("lamboot"); if (status == -1) - { - INFOS("lamboot failed : system command status -1"); - } + { + INFOS("lamboot failed : system command status -1"); + } else if (status == 217) - { - INFOS("lamboot failed : system command status 217"); - } + { + INFOS("lamboot failed : system command status 217"); + } else - { - _MpiStarted = true; - } + { + _MpiStarted = true; + } } +string SALOME_ContainerManager::GetMPIZeroNode(string machine) +{ + int status; + string zeronode; + string cmd; + string tmpFile = BuildTemporaryFileName(); + + cmd = "ssh " + machine + " mpirun -np 1 hostname > " + tmpFile; + + status = system(cmd.c_str()); + if( status == 0 ){ + ifstream fp(tmpFile.c_str(),ios::in); + fp >> zeronode; + } + + RmTmpFile(tmpFile); + + return zeronode; +} diff --git a/src/Container/SALOME_ContainerManager.hxx b/src/Container/SALOME_ContainerManager.hxx index 7b1f26eab..d57dfba1d 100644 --- a/src/Container/SALOME_ContainerManager.hxx +++ b/src/Container/SALOME_ContainerManager.hxx @@ -50,12 +50,12 @@ public: StartContainer(const Engines::MachineParameters& params, const Engines::MachineList& possibleComputer, Engines::ResPolicy policy, - const std::string& container_exe="SALOME_Container"); + const std::string& container_exe="SALOME_Container"); Engines::Container_ptr StartContainer(const Engines::MachineParameters& params, - Engines::ResPolicy policy, - const Engines::CompoList& componentList); + Engines::ResPolicy policy, + const Engines::CompoList& componentList); Engines::Container_ptr GiveContainer(const Engines::MachineParameters& params, @@ -88,19 +88,17 @@ protected: void fillBatchLaunchedContainers(); - long GetIdForContainer(void); - std::string BuildCommandToLaunchRemoteContainer(const std::string& machine, - const Engines::MachineParameters& params, const long id, - const std::string& container_exe="SALOME_Container"); + const Engines::MachineParameters& params, + const std::string& container_exe="SALOME_Container"); - std::string BuildCommandToLaunchLocalContainer(const Engines::MachineParameters& params, const long id, + std::string BuildCommandToLaunchLocalContainer(const Engines::MachineParameters& params, const std::string& container_exe="SALOME_Container"); std::string BuildTempFileToLaunchRemoteContainer(const std::string& machine, const Engines::MachineParameters& params) throw(SALOME_Exception); - void RmTmpFile(); + void RmTmpFile(std::string& tmpFile); void AddOmninamesParams(std::string& command) const; @@ -108,6 +106,8 @@ protected: std::string BuildTemporaryFileName() const; + std::string GetMPIZeroNode(std::string machine); + // Parallel extension std::string BuildCommandToLaunchLocalParallelContainer(const std::string& exe_name, const Engines::MachineParameters& params, @@ -115,7 +115,6 @@ protected: void startMPI(); bool _MpiStarted; - long _id; CORBA::ORB_var _orb; PortableServer::POA_var _poa; diff --git a/src/Container/SALOME_FileTransfer_i.cxx b/src/Container/SALOME_FileTransfer_i.cxx index 2c7d762f2..b11959726 100644 --- a/src/Container/SALOME_FileTransfer_i.cxx +++ b/src/Container/SALOME_FileTransfer_i.cxx @@ -27,6 +27,11 @@ #include "SALOME_FileTransfer_i.hxx" #include "utilities.h" +/*! \class fileTransfer_i + \brief A class to manage file transfer in SALOME + +*/ + //============================================================================= /*! * Default constructor, @@ -52,8 +57,9 @@ fileTransfer_i::~fileTransfer_i() //============================================================================= -/*! - * CORBA method: try to open the file given. If the file is readable, return +/*! \brief open the given file + * + * CORBA method: try to open the file. If the file is readable, return * a positive integer else return 0; * \param fileName path to the file to be transfered * \return fileId = positive integer > 0 if open OK. @@ -76,7 +82,8 @@ CORBA::Long fileTransfer_i::open(const char* fileName) } //============================================================================= -/*! +/*! \brief close a file + * * CORBA method: close the file associated to the fileId given at open. * \param fileId got in return from open method */ @@ -93,8 +100,11 @@ void fileTransfer_i::close(CORBA::Long fileId) else fclose(fp); } +#define FILEBLOCK_SIZE 256*1024 + //============================================================================= -/*! +/*! \brief get a data block from a file + * * CORBA method: get a block of data from the file associated to the fileId * given at open. * \param fileId got in return from open method @@ -102,8 +112,6 @@ void fileTransfer_i::close(CORBA::Long fileId) */ //============================================================================= -#define FILEBLOCK_SIZE 256*1024 - Engines::fileBlock* fileTransfer_i::getBlock(CORBA::Long fileId) { MESSAGE("fileTransfer_i::getBlock"); diff --git a/src/Container/Salome_file_i.cxx b/src/Container/Salome_file_i.cxx index 525dcc08d..567fd1dc5 100644 --- a/src/Container/Salome_file_i.cxx +++ b/src/Container/Salome_file_i.cxx @@ -38,6 +38,11 @@ # include #endif +/*! \class Salome_file_i + * \brief A class to manage file transfer in %SALOME + * + */ + //============================================================================= /*! diff --git a/src/DSC/DSC_Basic/DSC_Callbacks.hxx b/src/DSC/DSC_Basic/DSC_Callbacks.hxx index 24ba2b006..c1e8b884b 100644 --- a/src/DSC/DSC_Basic/DSC_Callbacks.hxx +++ b/src/DSC/DSC_Basic/DSC_Callbacks.hxx @@ -33,7 +33,8 @@ /*! \class DSC_Callbacks * \brief This is an abstract class that defines methods that the component - * uses to prevent the component user code that the state of the component has changed. + * uses to notify the component user code that the state of the component has changed. + * * Currently only port's connection modifications are signaled. */ class DSC_BASIC_EXPORT DSC_Callbacks @@ -42,11 +43,10 @@ class DSC_BASIC_EXPORT DSC_Callbacks DSC_Callbacks() {} virtual ~DSC_Callbacks() {} - /*! - * This method is used by the component when the number of connection - * on a provides port changes. This information helps the user code to detect - * operation on its ports. - * + /*! \brief This method is used by the component when the number of connection + * on a provides port changes. + * + * This information helps the user code to detect operation on its ports. * * \param provides_port_name the name of the provides name that has changed. * \param connection_nbr the new number of connection on the provides port. @@ -56,11 +56,10 @@ class DSC_BASIC_EXPORT DSC_Callbacks int connection_nbr, const Engines::DSC::Message message) = 0; - /*! - * This method is used by the component when the number of connection - * on a uses port changes. This information helps the user code to detect - * operation on its ports. - * + /*! \brief This method is used by the component when the number of connection + * on a uses port changes. + * + * This information helps the user code to detect operation on its ports. * * \param uses_port_name the name of the uses name that has changed. * \param new_uses_port the new sequence representing the uses port. diff --git a/src/DSC/DSC_Python/dsccalcium.py b/src/DSC/DSC_Python/dsccalcium.py index d928701c8..6aa2d6c4b 100644 --- a/src/DSC/DSC_Python/dsccalcium.py +++ b/src/DSC/DSC_Python/dsccalcium.py @@ -19,20 +19,26 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## @package dsccalcium +# \brief Module that provides the base class for DSC components implemented in python +# +# + import calcium import SALOME_ComponentPy import SALOME_DriverPy import Engines +## The SALOME base class for all DSC components implemented in python (interface Engines::Superv_Component). +# +# class PyDSCComponent(SALOME_ComponentPy.SALOME_ComponentPy_i, SALOME_DriverPy.SALOME_DriverPy_i): """ - A Python SALOME component is implemented by a Python class that has + A Python DSC component is implemented by a Python class that has the name of the component and is located in a python module that has the name of the component. - This class is a base class for Python DSC components. - You must derive it and implement init_service and those methods that are services of the component. """ diff --git a/src/GenericObj/SALOME_GenericObj_i.hh b/src/GenericObj/SALOME_GenericObj_i.hh index 59c31faac..a7f03c893 100644 --- a/src/GenericObj/SALOME_GenericObj_i.hh +++ b/src/GenericObj/SALOME_GenericObj_i.hh @@ -32,7 +32,7 @@ #include CORBA_SERVER_HEADER(SALOME_GenericObj) #ifdef WIN32 -# ifdef GENERICOBJ_EXPORTS +# if defined GENERICOBJ_EXPORTS || defined SalomeGenericObj_EXPORTS # define GENERICOBJ_EXPORT __declspec( dllexport ) # else # define GENERICOBJ_EXPORT __declspec( dllimport ) diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 2498319d6..17642df5b 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -187,12 +187,12 @@ void SaveGroupInASCIIfile(HDFgroup *hdf_group, FILE* fp, int ident) char* name = makeName(hdf_group->GetName()); fprintf(fp, "%s %i\n", name, nbsons+nbAttr); - delete name; + delete [] name; for(unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_group); - delete name; + delete [] name; SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1); hdf_attribute = 0; } @@ -241,7 +241,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) fprintf(fp, "%s\n", DATASET_ID); fprintf(fp, "%s %i %i\n", name, type, nbAttr); - delete name; + delete [] name; hdf_dataset->GetDim(dim); fprintf(fp, " %i\n", ndim); @@ -251,7 +251,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) } fprintf(fp, "\n"); - delete dim; + delete [] dim; fprintf(fp, "%li %i:", size, order); @@ -259,7 +259,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) char* val = new char[size]; hdf_dataset->ReadFromDisk(val); fwrite(val, 1, size, fp); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64* val = new hdf_float64[size]; hdf_dataset->ReadFromDisk(val); @@ -272,7 +272,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) } else fprintf(fp," "); } - delete val; + delete [] val; } else if(type == HDF_INT64) { hdf_int64* val = new hdf_int64[size]; hdf_dataset->ReadFromDisk(val); @@ -284,7 +284,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) j = 0; } } - delete val; + delete [] val; } else if(type == HDF_INT32) { hdf_int32* val = new hdf_int32[size]; hdf_dataset->ReadFromDisk(val); @@ -296,7 +296,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) j = 0; } } - delete val; + delete [] val; } fprintf(fp, "\n"); @@ -305,7 +305,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) { name = hdf_dataset->GetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset); - delete name; + delete [] name; SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1); hdf_attribute = 0; } @@ -332,7 +332,7 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) fprintf(fp, "%s\n", ATTRIBUTE_ID); fprintf(fp, "%s %i %i\n", name, type, size); - delete name; + delete [] name; if (type == HDF_STRING) { char* val = new char[size+1]; @@ -340,7 +340,7 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) fprintf(fp, ":"); fwrite(val, 1, size, fp); fprintf(fp, "\n"); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64 val; hdf_attribute->ReadFromDisk(&val); @@ -447,7 +447,7 @@ bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp) HDFgroup* hdf_group = new HDFgroup(new_name, father); - delete new_name; + delete [] new_name; hdf_group->CreateOnDisk(); @@ -526,8 +526,8 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) order = H5T_ORDER_NONE; HDFdataset* hdf_dataset = new HDFdataset(new_name, father,type, sizeArray, nbDim, order); - delete new_name; - delete sizeArray; + delete [] new_name; + delete [] sizeArray; hdf_dataset->CreateOnDisk(); @@ -535,28 +535,28 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) char *val = new char[size+1]; fread(val, 1, size, fp); hdf_dataset->WriteOnDisk(val); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64* val = new hdf_float64[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; } else if(type == HDF_INT64) { hdf_int64* val = new hdf_int64[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; } else if(type == HDF_INT32) { hdf_int32* val = new hdf_int32[size]; for(i=0; iWriteOnDisk(val); - delete val; + delete [] val; } char token[MAX_ID_SIZE]; @@ -605,7 +605,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) hdf_attribute->CreateOnDisk(); - delete new_name; + delete [] new_name; if (type == HDF_STRING) { char tmp; @@ -614,7 +614,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) val[size] = (char)0; fread(val, 1, size, fp); hdf_attribute->WriteOnDisk(val); - delete val; + delete [] val; } else if (type == HDF_FLOAT64) { hdf_float64 val; read_float64(fp, &val); diff --git a/src/HDFPersist/HDFexport.hxx b/src/HDFPersist/HDFexport.hxx index 2b0402a6d..3c969d33f 100644 --- a/src/HDFPersist/HDFexport.hxx +++ b/src/HDFPersist/HDFexport.hxx @@ -27,7 +27,7 @@ #define _HDF_export_HXX_ #ifdef WIN32 -# ifdef HDFPERSIST_EXPORTS +# if defined HDFPERSIST_EXPORTS || defined SalomeHDFPersist_EXPORTS # define HDFPERSIST_EXPORT __declspec( dllexport ) # else # define HDFPERSIST_EXPORT __declspec( dllimport ) diff --git a/src/KERNEL_PY/salome.py b/src/KERNEL_PY/salome.py index 4756cd580..446c3e08d 100755 --- a/src/KERNEL_PY/salome.py +++ b/src/KERNEL_PY/salome.py @@ -24,49 +24,62 @@ # Module : SALOME # $Header$ # -""" +""" Module salome gives access to Salome ressources. variables: - salome.orb : CORBA - salome.naming_service : instance of naming Service class - methods: - Resolve(name) : find a CORBA object (ior) by its pathname - Register(name) : register a CORBA object under a pathname - salome.lcc : instance of lifeCycleCORBA class - methods: - FindOrLoadComponent(server,name) : + - salome.orb : CORBA + - salome.naming_service : instance of naming Service class + - methods: + - Resolve(name) : find a CORBA object (ior) by its pathname + - Register(name) : register a CORBA object under a pathname + + - salome.lcc : instance of lifeCycleCORBA class + - methods: + - FindOrLoadComponent(server,name) : obtain an Engine (CORBA object) or launch the Engine if not found, with a Server name and an Engine name - salome.sg - methods: - updateObjBrowser(bool): - getActiveStudyId(): - getActiveStudyName(): - SelectedCount(): returns number of selected objects - getSelected(i): returns entry of selected object number i - getAllSelected(): returns list of entry of selected objects - AddIObject(Entry): select an existing Interactive object - RemoveIObject(Entry): remove object from selection - ClearIObjects(): clear selection + - salome.sg : salome object to communicate with the graphical user interface (if any) + - methods: + - updateObjBrowser(bool): + - getActiveStudyId(): + - getActiveStudyName(): + + - SelectedCount(): returns number of selected objects + - getSelected(i): returns entry of selected object number i + - getAllSelected(): returns list of entry of selected objects + - AddIObject(Entry): select an existing Interactive object + - RemoveIObject(Entry): remove object from selection + - ClearIObjects(): clear selection - Display(*Entry): - DisplayOnly(Entry): - Erase(Entry): - DisplayAll(): - EraseAll(): + - Display(*Entry): + - DisplayOnly(Entry): + - Erase(Entry): + - DisplayAll(): + - EraseAll(): - IDToObject(Entry): returns CORBA reference from entry + - IDToObject(Entry): returns CORBA reference from entry - salome.myStudyName : active Study Name - salome.myStudyId : active Study Id - salome.myStudy : the active Study itself (CORBA ior) - methods : defined in SALOMEDS.idl + - salome.myStudyName : active Study Name + - salome.myStudyId : active Study Id + - salome.myStudy : the active Study itself (CORBA ior) + - methods : defined in SALOMEDS.idl """ +## @package salome +# Module salome gives access to Salome ressources. +# +# \param salome.orb : CORBA orb object +# \param salome.naming_service : instance of naming Service class (SALOME_NamingServicePy::SALOME_NamingServicePy_i) +# \param salome.lcc : instance of lifeCycleCORBA class (SALOME_LifeCycleCORBA) +# \param salome.sg : Salome object to communicate with the graphical user interface, if running (see interface in salome_iapp::SalomeOutsideGUI) +# \param salome.myStudyName : active Study Name +# \param salome.myStudyId : active Study Id +# \param salome.myStudy : the active Study (interface SALOMEDS::Study) + from salome_kernel import * from salome_study import * diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index 323a079e3..b8e394ae6 100644 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -24,6 +24,10 @@ # Module : SALOME # $Header$ # +## @package salome_iapp +# Module salome gives access to Salome GUI ressources (if GUI has been launched). +# + import salome_ComponentGUI #-------------------------------------------------------------------------- @@ -70,69 +74,86 @@ class SalomeOutsideGUI(object): global myStudyId, myStudyName def hasDesktop(self): + """Indicate if GUI is running""" return False def updateObjBrowser(self, bid): + """update the GUI object browser""" print "SalomeOutsideGUI: no objectBrowser update outside GUI" pass def getActiveStudyId(self): + """Get the active study id""" print "SalomeOutsideGUI.getActiveStudyId: avoid use outside GUI" return myStudyId def getActiveStudyName(self): + """Get the active study name""" print "SalomeOutsideGUI.getActiveStudyName: avoid use outside GUI" return myStudyName def SelectedCount(self): + """Get the number of active selections""" print "SalomeOutsideGUI: no selection mecanism available outside GUI" return 0 def getSelected(self, i): + """Get the selection number i """ print "SalomeOutsideGUI: no selection mecanism available outside GUI" return none def AddIObject(self, Entry): + """Add an entry""" print "SalomeOutsideGUI.AddIOObject: not available outside GUI" pass def RemoveIObject(self, Entry): + """Remove an entry""" print "SalomeOutsideGUI.REmoveIOObject: not available outside GUI" pass def ClearIObjects(self): + """Clear entries""" print "SalomeOutsideGUI.ClearIOObject: not available outside GUI" pass def Display(self, Entry): + """Display an entry""" print "SalomeOutsideGUI.Display: not available outside GUI" pass def DisplayOnly(self, Entry): + """Display only an entry""" print "SalomeOutsideGUI.DisplayOnly: not available outside GUI" pass def Erase(self, Entry): + """Erase en entry""" print "SalomeOutsideGUI.Erase: not available outside GUI" pass def DisplayAll(self): + """Display all""" print "SalomeOutsideGUI.Erase: not available outside GUI" pass def EraseAll(self): + """Erase all""" print "SalomeOutsideGUI.EraseAll: not available outside GUI" pass def IsInCurrentView(self, Entry): + """Indicate if an entry is in current view""" print "SalomeOutsideGUI.IsIncurentView: not available outside GUI" return False def getComponentName(self, ComponentUserName ): + """Get component name from component user name""" print "SalomeOutsideGUI.getComponentName: not available outside GUI" return "" def getComponentUserName( self, ComponentName ): + """Get component user name from component name""" print "SalomeOutsideGUI.getComponentUserName: not available outside GUI" return "" diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index 23d7d4a1a..a62cbafe9 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -253,14 +253,16 @@ print ret smesh.Compute(mesh, box) sg.updateObjBrowser(1); +##################################################################### # SUPERVISOR module is not available since SALOME 5.0 version -defineSuperV = 0 - -if (defineSuperV != 0) & (sys.platform != "win32"): - print - print "============= Test Supervisor =============================" - print - +##################################################################### +print +print "============= Test Supervisor =============================" +print +import salome_version +versions = salome_version.getVersions() +if versions[0] < 5: + # SUPERV module is avaiable comp = catalog.GetComponent("SUPERV") if comp is None: raise RuntimeError,"Component SUPERV not found in Module Catalog." @@ -455,6 +457,10 @@ if (defineSuperV != 0) & (sys.platform != "win32"): sg.updateObjBrowser(1); pass +else: + # SUPERV module is NOT avaiable + print "WARNING! Supervisor is not avaiable in this version of SALOME!" + pass print print "============= Test VISU and MED =============================" diff --git a/src/KERNEL_PY/salome_version.py b/src/KERNEL_PY/salome_version.py index 2c95b4219..696cd48db 100644 --- a/src/KERNEL_PY/salome_version.py +++ b/src/KERNEL_PY/salome_version.py @@ -84,3 +84,26 @@ def getVersionRelease( mod = "KERNEL" ): except: pass return None + +def getVersions( mod = "KERNEL" ): + """ + Get SALOME module version as list of [major, minor, release] numbers + Returns: version numbers list + """ + try: + major = int( getVersionMajor( mod ) ) + except: + major = 0 + pass + try: + minor = int( getVersionMinor( mod ) ) + except: + minor = 0 + pass + try: + rel = int( getVersionRelease( mod ) ) + except: + rel = 0 + pass + return [ major, minor, rel ] + diff --git a/src/Launcher/Launcher.hxx b/src/Launcher/Launcher.hxx index d9153543e..33e7fd76c 100644 --- a/src/Launcher/Launcher.hxx +++ b/src/Launcher/Launcher.hxx @@ -23,7 +23,7 @@ #define __LAUNCHER_HXX__ #ifdef WIN32 -# ifdef LAUNCHER_EXPORTS +# if defined LAUNCHER_EXPORTS || defined Launcher_EXPORTS # define LAUNCHER_EXPORT __declspec(dllexport) # else # define LAUNCHER_EXPORT __declspec(dllimport) diff --git a/src/Launcher/SALOME_Launcher_Handler.cxx b/src/Launcher/SALOME_Launcher_Handler.cxx index 31b4e7ce1..c9861c4e9 100755 --- a/src/Launcher/SALOME_Launcher_Handler.cxx +++ b/src/Launcher/SALOME_Launcher_Handler.cxx @@ -31,12 +31,6 @@ using namespace std; -#ifdef _DEBUG_ -static int MYDEBUG = 1; -#else -static int MYDEBUG = 0; -#endif - //============================================================================= /*! * Constructor diff --git a/src/Launcher/SALOME_Launcher_defs.hxx b/src/Launcher/SALOME_Launcher_defs.hxx index a321beadf..6cd96d7fa 100755 --- a/src/Launcher/SALOME_Launcher_defs.hxx +++ b/src/Launcher/SALOME_Launcher_defs.hxx @@ -23,7 +23,7 @@ #define __SALOME_LAUNCHER_DEFS_HXX__ #ifdef WIN32 -# ifdef SALOMELAUNCHER_EXPORTS +# if defined SALOMELAUNCHER_EXPORTS || defined SalomeLauncher_EXPORTS # define SALOMELAUNCHER_EXPORT __declspec(dllexport) # else # define SALOMELAUNCHER_EXPORT __declspec(dllimport) diff --git a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx index b2c653586..3f80d7453 100644 --- a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx @@ -31,6 +31,11 @@ using namespace std; +/*! \class SALOME_FileTransferCORBA + \brief A class to manage file transfer in SALOME (CORBA context) + +*/ + //============================================================================= /*! * Default constructor, not for use. @@ -43,8 +48,8 @@ SALOME_FileTransferCORBA::SALOME_FileTransferCORBA() } //============================================================================= -/*! - * Constructor to use when we get a fileRef CORBA object from a component. +/*! \brief Constructor to use when we get a fileRef CORBA object from a component + * * \param aFileRef file reference CORBA object */ //============================================================================= @@ -57,9 +62,9 @@ SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(Engines::fileRef_ptr } //============================================================================= -/*! - * Constructor to use when we have the file name and machine from which to - * copy, plus an optional Container name on the machine. +/*! \brief Constructor to use when we have the file name and machine from which to + * copy, plus an optional Container name on the machine. + * * \param refMachine the machine on which is the file to transfer * \param origFileName abolute file path on refMachine * \param containerName default container name used (FactoryServer) if empty @@ -93,8 +98,9 @@ SALOME_FileTransferCORBA::~SALOME_FileTransferCORBA() } //============================================================================= -/*! - * CORBA method: get a local copy of the reference file. +/*! \brief Get a local copy of the reference file + * + * CORBA method * \param localFile optional absolute path to store the copy * \return the file name (absolute path) of the copy, may be different from * localFile parameter if the copy was already done before the call diff --git a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx index 522ca0faa..223a71511 100644 --- a/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_FileTransferCORBA.hxx @@ -36,7 +36,7 @@ #include #ifdef WIN32 -# if defined LIFECYCLECORBA_EXPORTS +# if defined LIFECYCLECORBA_EXPORTS || defined SalomeLifeCycleCORBA_EXPORTS # define LIFECYCLECORBA_EXPORT __declspec( dllexport ) # else # define LIFECYCLECORBA_EXPORT __declspec( dllimport ) diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index e6e5936e7..a9ab219c8 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -64,6 +64,11 @@ IncompatibleComponent::IncompatibleComponent(const IncompatibleComponent &ex): { } +/*! \class SALOME_LifeCycleCORBA + \brief A class to manage life cycle of SALOME components. + +*/ + //============================================================================= /*! * Constructor @@ -112,15 +117,14 @@ SALOME_LifeCycleCORBA::~SALOME_LifeCycleCORBA() } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance. +/*! \brief Find an already existing and registered component instance. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance * \return a CORBA reference of the component instance, or _nil if not found */ //============================================================================= - Engines::Component_ptr SALOME_LifeCycleCORBA::FindComponent(const Engines::MachineParameters& params, const char *componentName, @@ -144,8 +148,8 @@ SALOME_LifeCycleCORBA::FindComponent(const Engines::MachineParameters& params, } //============================================================================= -/*! Public - - * Load a component instance on a container defined by machine parameters +/*! \brief Load a component instance on a container defined by machine parameters + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance @@ -178,9 +182,9 @@ SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params, } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance or load a new - * component instance on a container defined by machine parameters. +/*! \brief Find an already existing and registered component instance or load a new + * component instance on a container defined by machine parameters. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance @@ -220,9 +224,9 @@ FindOrLoad_Component(const Engines::MachineParameters& params, } //============================================================================= -/*! Public - - * Find and aready existing and registered component instance or load a new - * component instance on a container defined by name +/*! \brief Find an already existing and registered component instance or load a new + * component instance on a container defined by name + * * \param containerName the name of container, under one of the forms * - 1 aContainer (local container) * - 2 machine/aContainer (container on hostname = machine) @@ -292,8 +296,8 @@ SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName, } //============================================================================= -/*! Public - - * Check if the component class is known in module catalog +/*! \brief Check if the component class is known in module catalog + * * \param componentName the name of component class * \return true if found, false otherwise */ @@ -330,7 +334,7 @@ bool SALOME_LifeCycleCORBA::isKnownComponentClass(const char *componentName) } //============================================================================= -/*! Public - +/*! * Not so complex... useful ? */ //============================================================================= @@ -347,9 +351,8 @@ SALOME_LifeCycleCORBA::isMpiContainer(const Engines::MachineParameters& params) //============================================================================= -/*! Public - - * Pre initialisation of a given Engines::MachineParameters with default - * values. +/*! \brief Initialisation of a given Engines::MachineParameters with default values. + * * - container_name = "" : not relevant * - hostname = "" : not relevant * - OS = "" : not relevant @@ -377,7 +380,7 @@ void SALOME_LifeCycleCORBA::preSet( Engines::MachineParameters& params) } //============================================================================= -/*! Public - +/*! * \return a number of processors not 0, only for MPI containers */ //============================================================================= @@ -397,7 +400,8 @@ int SALOME_LifeCycleCORBA::NbProc(const Engines::MachineParameters& params) } //============================================================================= -/*! Public - +/*! \brief Get the container manager + * * \return the container Manager */ //============================================================================= @@ -410,7 +414,8 @@ Engines::ContainerManager_ptr SALOME_LifeCycleCORBA::getContainerManager() } //============================================================================= -/*! Public - +/*! \brief Get the resources manager + * * \return the container Manager */ //============================================================================= @@ -423,8 +428,7 @@ Engines::ResourcesManager_ptr SALOME_LifeCycleCORBA::getResourcesManager() } //============================================================================= -/*! Public - - * shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd +/*! \brief shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd */ //============================================================================= @@ -516,8 +520,7 @@ void SALOME_LifeCycleCORBA::shutdownServers() } //============================================================================= -/*! Public - - * shutdown omniNames and notifd +/*! \brief shutdown omniNames and notifd */ //============================================================================= @@ -550,15 +553,16 @@ void SALOME_LifeCycleCORBA::killOmniNames() } //============================================================================= -/*! Protected - - * Find and aready existing and registered component instance. +/*! \brief Find an already existing and registered component instance. + * + * - build a list of machines on which an instance of the component is running, + * - find the best machine among the list + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance * \param listOfMachines list of machine address * \return a CORBA reference of the component instance, or _nil if not found - * - build a list of machines on which an instance of the component is running, - * - find the best machine among the list */ //============================================================================= @@ -610,16 +614,17 @@ _FindComponent(const Engines::MachineParameters& params, } //============================================================================= -/*! Protected - - * Load a component instance. +/*! \brief Load a component instance. + * + * - Finds a container in the list of machine or start one. + * - Try to load the component library in the container, + * - then create an instance of the component. + * * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance * \param listOfMachines list of machine address * \return a CORBA reference of the component instance, or _nil if problem - * - Finds a container in the list of machine or start one. - * - Try to load the component library in the container, - * - then create an instance of the component. */ //============================================================================= @@ -646,6 +651,15 @@ _LoadComponent(const Engines::MachineParameters& params, return myInstance._retn(); } +//============================================================================= +/*! \brief Load a parallel component instance. + * + * \param params machine parameters like type or name... + * \param componentName the name of component class + * \param studyId default = 0 : multistudy instance + * \return a CORBA reference of the parallel component instance, or _nil if problem + */ +//============================================================================= Engines::Component_ptr SALOME_LifeCycleCORBA::Load_ParallelComponent(const Engines::MachineParameters& params, const char *componentName, diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx index 3c73ad3f9..dfbf3d7c9 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx @@ -41,7 +41,7 @@ #include #ifdef WIN32 -# if defined LIFECYCLECORBA_EXPORTS +# if defined LIFECYCLECORBA_EXPORTS || defined SalomeLifeCycleCORBA_EXPORTS # define LIFECYCLECORBA_EXPORT __declspec( dllexport ) # else # define LIFECYCLECORBA_EXPORT __declspec( dllimport ) diff --git a/src/Logger/SALOME_Logger_Server.hxx b/src/Logger/SALOME_Logger_Server.hxx index a20632857..b7f0b913f 100644 --- a/src/Logger/SALOME_Logger_Server.hxx +++ b/src/Logger/SALOME_Logger_Server.hxx @@ -37,7 +37,7 @@ #include "Logger.hh" #ifdef WIN32 -# if defined LOGGER_EXPORTS +# if defined LOGGER_EXPORTS || defined SalomeLoggerServer_EXPORTS # define LOGGER_EXPORT __declspec( dllexport ) # else # define LOGGER_EXPORT __declspec( dllimport ) diff --git a/src/Logger/SALOME_Trace.cxx b/src/Logger/SALOME_Trace.cxx index ce73c7f6d..3617c6c4b 100644 --- a/src/Logger/SALOME_Trace.cxx +++ b/src/Logger/SALOME_Trace.cxx @@ -144,9 +144,9 @@ void SALOME_Trace::putMessage(ostream& msg) // CORBA::String_var LogMsg = CORBA::string_dup( str() ); //Allow automatic deletion of ostrstream content - char* adt = str(); + const char* adt = str().c_str(); CORBA::String_var LogMsg = CORBA::string_dup( adt ); - rdbuf()->freeze(false); + //rdbuf()->freeze(false); //rdbuf()->sync(); // problem with gcc3.2 seekp(0); diff --git a/src/Logger/SALOME_Trace.hxx b/src/Logger/SALOME_Trace.hxx index a9d2ebd7f..261d27005 100644 --- a/src/Logger/SALOME_Trace.hxx +++ b/src/Logger/SALOME_Trace.hxx @@ -27,7 +27,7 @@ #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_) #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_ -#include +#include #include #include "Logger.hh" @@ -62,7 +62,7 @@ # endif /* WIN32 */ -class SALOME_Trace : public std::ostrstream +class SALOME_Trace : public std::ostringstream { public: virtual ~SALOME_Trace(); diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index ecdfba30c..c3fd23405 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -48,52 +48,22 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc, int argc, char *argv[]) : Engines_Container_i(orb,poa,containerName,argc,argv,false), MPIObject_i(nbproc,numproc) { - long id=0; - string IdContainerinNS; - char idc[3*sizeof(long)]; - MESSAGE("[" << numproc << "] activate object"); _id = _poa->activate_object(this); - - if(argc>1) - { - for(int i=0;iid_to_reference(*_id); + Engines::Container_var pCont = Engines::Container::_narrow(obj); + _remove_ref(); if(numproc==0){ _NS = new SALOME_NamingService(); _NS->init_orb( CORBA::ORB::_duplicate(_orb) ) ; - CORBA::Object_var obj=_poa->id_to_reference(*_id); - Engines::Container_var pCont = Engines::Container::_narrow(obj); - string hostname = Kernel_Utils::GetHostname(); _containerName = _NS->BuildContainerNameForNS(containerName,hostname.c_str()); SCRUTE(_containerName); _NS->Register(pCont, _containerName.c_str()); - // A parallel container registers in Naming Service - // on the machine where is process 0. ContainerManager does'nt know the name - // of this machine before the launch of the parallel container. So to get - // the IOR of the parallel container in Naming Service, ContainerManager - // gives a unique Id. The parallel container registers his name under - // /ContainerManager/Id directory in NamingService - - IdContainerinNS = "/ContainerManager/id"; - sprintf(idc,"%ld",id); - IdContainerinNS += idc; - SCRUTE(IdContainerinNS); - _NS->Register(pCont, IdContainerinNS.c_str()); - } // Root recupere les ior des container des autre process @@ -121,6 +91,24 @@ void Engines_MPIContainer_i::Shutdown() for(ip= 1;ip<_nbproc;ip++) (Engines::MPIContainer::_narrow((*_tior)[ip]))->Shutdown(); } + + std::map::iterator itm; + for (itm = _listInstances_map.begin(); itm != _listInstances_map.end(); itm++) + { + try + { + itm->second->destroy(); + } + catch(const CORBA::Exception& e) + { + // ignore this entry and continue + } + catch(...) + { + // ignore this entry and continue + } + } + _orb->shutdown(0); } @@ -149,7 +137,6 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) // --- try dlopen C++ component string impl_name = string ("lib") + aCompName + string("Engine.so"); - SCRUTE(impl_name); _numInstanceMutex.lock(); // lock to be alone // (see decInstanceCnt, finalize_removal)) @@ -167,12 +154,15 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) { _library_map[impl_name] = handle; _numInstanceMutex.unlock(); + MESSAGE("[" << _numproc << "] Library " << impl_name << " loaded"); + MPI_Barrier(MPI_COMM_WORLD); return true; } else { - INFOS("[" << _numproc << "] Can't load shared library : " << impl_name); - INFOS("[" << _numproc << "] error dlopen: " << dlerror()); + MESSAGE("[" << _numproc << "] Can't load shared library : " << impl_name); + MESSAGE("[" << _numproc << "] error dlopen: " << dlerror()); + MPI_Barrier(MPI_COMM_WORLD); } _numInstanceMutex.unlock(); @@ -287,17 +277,15 @@ Engines_MPIContainer_i::Lcreate_component_instance( const char* genericRegisterN //--- try C++ string impl_name = string ("lib") + genericRegisterName +string("Engine.so"); - void* handle = _library_map[impl_name]; - if ( !handle ) { - INFOS("shared library " << impl_name <<"must be loaded before instance"); - return Engines::Component::_nil() ; - } - else { - iobject = createMPIInstance(genericRegisterName, - handle, - studyId); - return iobject._retn(); - } + if (_library_map.count(impl_name) != 0) // C++ component + { + void* handle = _library_map[impl_name]; + iobject = createMPIInstance(genericRegisterName, + handle, + studyId); + return iobject._retn(); + } + } Engines::Component_ptr @@ -311,7 +299,6 @@ Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, string aGenRegisterName = genericRegisterName; string factory_name = aGenRegisterName + string("Engine_factory"); - SCRUTE(factory_name) ; typedef PortableServer::ObjectId * (*MPIFACTORY_FUNCTION) (int,int, @@ -321,17 +308,17 @@ Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, const char *, const char *) ; - MPIFACTORY_FUNCTION MPIComponent_factory - = (MPIFACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); + dlerror(); + MPIFACTORY_FUNCTION MPIComponent_factory = (MPIFACTORY_FUNCTION) dlsym(handle, factory_name.c_str()); - char *error ; - if ( (error = dlerror() ) != NULL) { - // Try to load a sequential component - MESSAGE("[" << _numproc << "] Try to load a sequential component"); - _numInstanceMutex.unlock() ; - iobject = Engines_Container_i::createInstance(genericRegisterName,handle,studyId); - if( CORBA::is_nil(iobject) ) return Engines::Component::_duplicate(iobject); - } + if ( !MPIComponent_factory ) + { + INFOS( "[" << _numproc << "] Can't resolve symbol: " + factory_name ); + SCRUTE( dlerror() ); + pobj = Engines::MPIObject::_nil(); + BCastIOR(_orb,pobj,false); + return Engines::Component::_nil(); + } // --- create instance @@ -370,8 +357,6 @@ Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, //SCRUTE(servant->pd_refCount); _listInstances_map[instanceName] = iobject; _cntInstances_map[aGenRegisterName] += 1; - SCRUTE(aGenRegisterName); - SCRUTE(_cntInstances_map[aGenRegisterName]); //SCRUTE(servant->pd_refCount); bool ret_studyId = servant->setStudyId(studyId); ASSERT(ret_studyId); @@ -387,10 +372,14 @@ Engines_MPIContainer_i::createMPIInstance(string genericRegisterName, BCastIOR(_orb,pobj,false); } - catch (...) - { - INFOS( "Container_i::createInstance exception catched" ) ; - } + catch(const POException &ex){ + INFOS( ex.msg << " on process number " << ex.numproc ) ; + return Engines::Component::_nil(); + } + catch (...){ + INFOS( "Container_i::createInstance exception catched" ) ; + return Engines::Component::_nil(); + } return iobject._retn(); } @@ -450,6 +439,7 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( string factory_name = _nameToRegister + string("Engine_factory"); MESSAGE("[" << _numproc << "] factory_name=" << factory_name) ; + dlerror(); PortableServer::ObjectId * (*MPIComponent_factory) (int,int, CORBA::ORB_ptr, PortableServer::POA_ptr, diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index f68a739b6..ff45f5e5e 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -23,10 +23,10 @@ // File : MPIObject_i.cxx // Module : SALOME // -#include #include "MPIObject_i.hxx" #include "utilities.h" using namespace std; +#define TIMEOUT 5 MPIObject_i::MPIObject_i() { @@ -65,7 +65,7 @@ void MPIObject_i::tior(const Engines::IORTab& ior) } void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, - bool amiCont) + bool amiCont) throw(POException) { int err, ip, n; char *ior; @@ -95,13 +95,14 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, } iort[ip] = orb->string_to_object(ior); delete [] ior; + if(CORBA::is_nil(iort[ip])) + throw POException(ip,"MPI Component not loaded"); } // On donne le tableau des ior a l'objet Corba du process 0 if( amiCont ) tior(*(iort._retn())); else pobj->tior(*(iort._retn())); - } else{ // Conversion IOR vers string @@ -123,3 +124,78 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj, } +#ifdef HAVE_MPI2 +MPI_Comm MPIObject_i::remoteMPI2Connect(string service) throw(POException) +{ + int i; + MPI_Comm gcom; + char port_name_clt[MPI_MAX_PORT_NAME]; + + _srv = 0; + _service = service; + + MPI_Barrier(MPI_COMM_WORLD); + + MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); + if( _numproc == 0 ){ + /* rank 0 try to be a server. If service is already published, try to be a cient */ + MPI_Open_port(MPI_INFO_NULL, _port_name); + if ( MPI_Publish_name((char*)_service.c_str(), MPI_INFO_NULL, _port_name) == MPI_SUCCESS ) { + _srv = 1; + MESSAGE("[" << _numproc << "] service " << _service << " available at " << _port_name << "\n"); + } + else if ( MPI_Lookup_name((char*)_service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ){ + MESSAGE("[" << _numproc << "] I get the connection with " << _service << " at " << port_name_clt << "!\n"); + MPI_Close_port( _port_name ); + } + else{ + /* Throw exception */ + MESSAGE("[" << _numproc << "] Error on connection with " << _service << " at " << port_name_clt << "!\n"); + throw POException(_numproc,"Error on connection with " + _service + " at " + port_name_clt); + } + } + else{ + i=0; + /* Waiting rank 0 publish name and try to be a client */ + while ( i != TIMEOUT ) { + sleep(1); + if ( MPI_Lookup_name((char*)_service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ){ + MESSAGE("[" << _numproc << "] I get the connection with " << _service << " at " << port_name_clt << "!\n"); + break; + } + i++; + } + if(i==TIMEOUT){ + /* Throw exception */ + MESSAGE("[" << _numproc << "] Error on connection with " << _service << " at " << port_name_clt << "!\n"); + throw POException(_numproc,"Error on connection with " + _service + " at " + port_name_clt); + } + } + MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); + + /* If rank 0 is server, all processes call MPI_Comm_accept */ + /* If rank 0 is not server, all processes call MPI_Comm_connect */ + MPI_Bcast(&_srv,1,MPI_INT,0,MPI_COMM_WORLD); + if ( _srv ) + MPI_Comm_accept( _port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &gcom ); + else + MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &gcom ); + + /* only rank 0 can be server for unpublish name */ + if(_numproc != 0) _srv = 0; + + return gcom; + +} + +void MPIObject_i::remoteMPI2Disconnect(MPI_Comm gcom) +{ + MPI_Comm_disconnect( &gcom ); + if ( _srv ) { + MPI_Unpublish_name((char*)_service.c_str(), MPI_INFO_NULL, _port_name); + MESSAGE("[" << _numproc << "] " << _service << ": close port " << _port_name << "\n"); + MPI_Close_port( _port_name ); + } +} +#endif + diff --git a/src/MPIContainer/MPIObject_i.hxx b/src/MPIContainer/MPIObject_i.hxx index 21ea9d84c..641cb1138 100644 --- a/src/MPIContainer/MPIObject_i.hxx +++ b/src/MPIContainer/MPIObject_i.hxx @@ -26,8 +26,19 @@ #ifndef _SALOME_POBJECT_I_H_ #define _SALOME_POBJECT_I_H_ +#include +#include #include #include CORBA_SERVER_HEADER(SALOME_MPIObject) +#define defaultService "SERVER" + +class POException +{ +public: + const std::string msg; + const int numproc; + POException(const int ip,const std::string m) : numproc(ip),msg(m) {} +}; class MPIObject_i: public POA_Engines::MPIObject { @@ -47,7 +58,19 @@ class MPIObject_i: public POA_Engines::MPIObject // IOR des objets paralleles sur tous les process mpi Engines::IORTab* _tior; // Echange des IOR de l'objet entre process - void BCastIOR(CORBA::ORB_ptr orb,Engines::MPIObject_ptr pobj,bool amiCont); + void BCastIOR(CORBA::ORB_ptr orb,Engines::MPIObject_ptr pobj,bool amiCont) throw(POException); +#ifdef HAVE_MPI2 + // MPI2 connection + MPI_Comm remoteMPI2Connect(std::string service=defaultService) throw(POException); + // MPI2 disconnection + void remoteMPI2Disconnect(MPI_Comm gcom); +#endif + +private: + int _srv; + char _port_name[MPI_MAX_PORT_NAME]; + std::string _service; + } ; #endif diff --git a/src/MPIContainer/SALOME_MPIContainer.cxx b/src/MPIContainer/SALOME_MPIContainer.cxx index 647e54470..c288ec8cf 100644 --- a/src/MPIContainer/SALOME_MPIContainer.cxx +++ b/src/MPIContainer/SALOME_MPIContainer.cxx @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) } MESSAGE("[" << numproc << "] MPIContainer: load MPIContainer servant"); - myContainer = new Engines_MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName,argc,argv); + new Engines_MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName,argc,argv); pman->activate(); @@ -106,13 +106,11 @@ int main(int argc, char* argv[]) INFOS("Caught unknown exception."); } - if(myContainer) - delete myContainer; + MPI_Finalize(); END_OF("[" << numproc << "] " << argv[0]); - // delete myThreadTrace; - MPI_Finalize(); + exit(0); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog.hxx index bb8a2320a..d70e2aa77 100755 --- a/src/ModuleCatalog/SALOME_ModuleCatalog.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog.hxx @@ -27,7 +27,7 @@ #define _SALOME_ModuleCatalog_HXX_ #ifdef WIN32 -# ifdef MODULECATALOG_EXPORTS +# if defined MODULECATALOG_EXPORTS || defined SalomeCatalog_EXPORTS # define MODULECATALOG_EXPORT __declspec( dllexport ) # else # define MODULECATALOG_EXPORT __declspec( dllimport ) diff --git a/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx b/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx index cc18e0448..710c575f4 100755 --- a/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx +++ b/src/NOTIFICATION_SWIG/SALOME_NOTIFICATION_SWIG.hxx @@ -27,7 +27,7 @@ #define _SALOME_NOTIFICATION_SWIG_HXX_ #ifdef WIN32 -# ifdef NOTIFICATION_SWIG_EXPORTS +# if defined NOTIFICATION_SWIG_EXPORTS || defined _libNOTIFICATION_EXPORTS # define NOTIFICATION_SWIG_EXPORT __declspec( dllexport ) # else # define NOTIFICATION_SWIG_EXPORT __declspec( dllimport ) diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index be057c0f8..33e94851b 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -36,6 +36,11 @@ using namespace std; +/*! \class SALOME_NamingService + \brief A class to manage the SALOME naming service + +*/ + // ============================================================================ /*! \brief Default Constructor without ORB reference. * @@ -513,7 +518,8 @@ SALOME_NamingService::ResolveComponent(const char* hostname, else { SCRUTE(name); - if (Change_Directory(name.c_str())) + string basename = name; + if (Change_Directory(basename.c_str())) { vector contList = list_subdirs(); @@ -537,6 +543,8 @@ SALOME_NamingService::ResolveComponent(const char* hostname, if ( !CORBA::is_nil(obj) ) return obj; + else + Change_Directory(basename.c_str()); } } diff --git a/src/NamingService/SALOME_NamingServicePy.py b/src/NamingService/SALOME_NamingServicePy.py index 1a41f7ddb..3797ae961 100644 --- a/src/NamingService/SALOME_NamingServicePy.py +++ b/src/NamingService/SALOME_NamingServicePy.py @@ -26,6 +26,11 @@ # Module : SALOME # $Header$ # +## @package SALOME_NamingServicePy +# \brief Module to manage SALOME naming service from python +# +# + import sys import time from omniORB import CORBA @@ -37,6 +42,9 @@ from SALOME_utilities import * #============================================================================= class SALOME_NamingServicePy_i(object): + """ + A class to manage SALOME naming service from python code + """ _orb = None _root_context=None _current_context=None @@ -45,13 +53,18 @@ class SALOME_NamingServicePy_i(object): #------------------------------------------------------------------------- def __init__(self, orb): + """ + Standard Constructor, with ORB reference. + + Initializes the naming service root context + """ #MESSAGE ( "SALOME_NamingServicePy_i::__init__" ) self._orb = orb # initialize root context and current context - ok = 0 - steps = 240 - while steps > 0 and ok == 0: - try: + ok = 0 + steps = 240 + while steps > 0 and ok == 0: + try: obj =self._orb.resolve_initial_references("NameService") self._root_context =obj._narrow(CosNaming.NamingContext) self._current_context = self._root_context @@ -60,13 +73,13 @@ class SALOME_NamingServicePy_i(object): if self._root_context is None : #MESSAGE ( "Name Service Reference is invalid" ) #sys.exit(1) - MESSAGE(" Name service not found") - else: - ok = 1 - except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE): - MESSAGE(" Name service not found") - time.sleep(0.25) - steps = steps - 1 + MESSAGE(" Name service not found") + else: + ok = 1 + except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE): + MESSAGE(" Name service not found") + time.sleep(0.25) + steps = steps - 1 if steps == 0 and self._root_context is None: MESSAGE ( "Name Service Reference is invalid" ) sys.exit(1) @@ -180,6 +193,10 @@ class SALOME_NamingServicePy_i(object): #------------------------------------------------------------------------- def Create_Directory(self,ObjRef, Path): + """ ns.Create_Directory(ObjRef, Path) + + create a sub directory + """ MESSAGE ( "SALOME_NamingServicePy_i::Create_Directory" ) _not_exist = 0 path_list = list(Path) @@ -205,6 +222,10 @@ class SALOME_NamingServicePy_i(object): MESSAGE ( "Create_Directory : CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE" ) def Destroy_Name(self,Path): + """ ns.Destroy_Name(Path) + + remove a name in naming service + """ resolve_path=string.split(Path,'/') if resolve_path[0] == '': del resolve_path[0] dir_path=resolve_path[:-1] @@ -221,6 +242,10 @@ class SALOME_NamingServicePy_i(object): return def Destroy_FullDirectory(self,Path): + """ ns.Destroy_FullDirectory(Path) + + remove recursively a directory + """ context_name=[] for e in string.split(Path,'/'): if e == '':continue diff --git a/src/NamingService/SALOME_NamingService_defs.hxx b/src/NamingService/SALOME_NamingService_defs.hxx index 061d2f9ce..81dbae46e 100644 --- a/src/NamingService/SALOME_NamingService_defs.hxx +++ b/src/NamingService/SALOME_NamingService_defs.hxx @@ -29,7 +29,7 @@ #define SALOME_NAMINGSERVICE_DEFS_HXX #ifdef WIN32 -# ifdef NAMINGSERVICE_EXPORTS +# if defined NAMINGSERVICE_EXPORTS || defined SalomeNS_EXPORTS # define NAMINGSERVICE_EXPORT __declspec( dllexport ) # else # define NAMINGSERVICE_EXPORT __declspec( dllimport ) diff --git a/src/Notification/SALOME_NOTIFICATION.hxx b/src/Notification/SALOME_NOTIFICATION.hxx index 8dad9d8cc..faa40bfbf 100755 --- a/src/Notification/SALOME_NOTIFICATION.hxx +++ b/src/Notification/SALOME_NOTIFICATION.hxx @@ -27,7 +27,7 @@ #define _SALOME_NOTIFICATION_HXX_ #ifdef WIN32 -# ifdef NOTIFICATION_EXPORTS +# if defined NOTIFICATION_EXPORTS || defined SalomeNotification_EXPORTS # define NOTIFICATION_EXPORT __declspec( dllexport ) # else # define NOTIFICATION_EXPORT __declspec( dllimport ) diff --git a/src/Registry/SALOME_Registry.hxx b/src/Registry/SALOME_Registry.hxx index a4c234a29..665220457 100755 --- a/src/Registry/SALOME_Registry.hxx +++ b/src/Registry/SALOME_Registry.hxx @@ -27,7 +27,7 @@ #define _SALOME_Registry_HXX_ #ifdef WIN32 -# ifdef REGISTRY_EXPORTS +# if defined REGISTRY_EXPORTS || defined Registry_EXPORTS # define REGISTRY_EXPORT __declspec( dllexport ) # else # define REGISTRY_EXPORT __declspec( dllimport ) diff --git a/src/ResourcesManager/ResourcesManager_Defs.hxx b/src/ResourcesManager/ResourcesManager_Defs.hxx index 8613c4b9d..c6d0c25e9 100755 --- a/src/ResourcesManager/ResourcesManager_Defs.hxx +++ b/src/ResourcesManager/ResourcesManager_Defs.hxx @@ -23,7 +23,7 @@ #define __RESOURCESMANAGER_DEFS_HXX__ #ifdef WIN32 -# ifdef RESOURCESMANAGER_EXPORTS +# if defined RESOURCESMANAGER_EXPORTS || defined ResourcesManager_EXPORTS # define RESOURCESMANAGER_EXPORT __declspec( dllexport ) # else # define RESOURCESMANAGER_EXPORT __declspec( dllimport ) diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 1602fcce9..a80bc83bf 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -317,7 +317,11 @@ void SALOME_ResourcesCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) { _resources_list[_resource.HostName] = _resource; if(_resource.HostName == "localhost") - _resources_list[Kernel_Utils::GetHostname()] = _resource; + { + _resource.HostName = Kernel_Utils::GetHostname(); + _resource.DataForSort._hostName = Kernel_Utils::GetHostname(); + _resources_list[Kernel_Utils::GetHostname()] = _resource; + } } } else @@ -332,6 +336,7 @@ void SALOME_ResourcesCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) iter != _resources_list.end(); iter++) { + std::cerr << (*iter).first << std::endl; std::cerr << (*iter).second.HostName << std::endl; std::cerr << (*iter).second.Alias << std::endl; std::cerr << (*iter).second.UserName << std::endl; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.hxx b/src/ResourcesManager/SALOME_ResourcesManager.hxx index 959822e49..9fcf8a1c6 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.hxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.hxx @@ -36,7 +36,7 @@ #ifdef WIN32 -# ifdef SALOMERESOURCESMANAGER_EXPORTS +# if defined SALOMERESOURCESMANAGER_EXPORTS || defined SalomeResourcesManager_EXPORTS # define SALOMERESOURCESMANAGER_EXPORT __declspec( dllexport ) # else # define SALOMERESOURCESMANAGER_EXPORT __declspec( dllimport ) diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx index 992bd9163..01a3f03bd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx @@ -29,7 +29,7 @@ #include "Utils_ExceptHandlers.hxx" #include -#include +#include #include #include diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx index 9a4de029d..30ee7075b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx @@ -26,7 +26,7 @@ #include "SALOMEDS_AttributeTableOfReal_i.hxx" #include "SALOMEDS.hxx" -#include +#include #include #include diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx index 56a29f66a..ebc8ebd76 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx @@ -26,7 +26,7 @@ #include "SALOMEDS_AttributeTableOfString_i.hxx" #include "SALOMEDS.hxx" -#include +#include #include #include diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index 63bd4acd8..c579fa47f 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -41,7 +41,7 @@ #include "Basics_Utils.hxx" #include "SALOME_GenericObj_i.hh" -#include +#include #include #include diff --git a/src/SALOMEDS/SALOME_DriverPy.py b/src/SALOMEDS/SALOME_DriverPy.py index f59953f84..c47e814b9 100644 --- a/src/SALOMEDS/SALOME_DriverPy.py +++ b/src/SALOMEDS/SALOME_DriverPy.py @@ -19,11 +19,17 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +## @package SALOME_DriverPy +# \brief python implementation of SALOMEDS::Driver interface +# +# import SALOMEDS__POA +## Python implementation of generic SALOMEDS::Driver. +# +# class SALOME_DriverPy_i(SALOMEDS__POA.Driver): """ - Python implementation of generic SALOMEDS driver. Should be inherited by any Python module's engine to provide persistence mechanism. """ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index 441e578a1..9f012789c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -27,7 +27,7 @@ #include #include -#include +#include #include using namespace std; @@ -710,7 +710,7 @@ void SALOMEDSImpl_AttributeParameter::Load(const string& theValue) _realarrays.clear(); _intarrays.clear(); - istrstream buffer(theValue.c_str(), theValue.size()); + istringstream buffer(theValue.c_str()); int size, val, ival; double val2; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx index d15a29561..d0a564c89 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx @@ -307,7 +307,7 @@ void SALOMEDSImpl_AttributeStudyProperties::Load(const string& value) strncpy(aName, &(aCopy[anIndex]), aNameSize); aName[aNameSize] = 0; SetModification(aName,aMinute,aHour,aDay,aMonth,aYear); - delete(aName); + delete [] (aName); anIndex += aNameSize + 1; } if (aCopy[1] == 'l') { diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index da906393c..24a21d772 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -24,7 +24,7 @@ // Module : SALOME // #include "SALOMEDSImpl_AttributeTableOfInteger.hxx" -#include +#include using namespace std; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index 1b9dd68c6..af1baaacd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -25,7 +25,7 @@ // #include "SALOMEDSImpl_AttributeTableOfReal.hxx" #include -#include +#include using namespace std; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index f5872c4ad..c73f7c730 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -26,7 +26,7 @@ #include "SALOMEDSImpl_AttributeTableOfString.hxx" #include #include -#include +#include using namespace std; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx index aace61317..91c4560c5 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx @@ -443,7 +443,7 @@ string SALOMEDSImpl_AttributeTreeNode::Type() char* aNodeName = new char[127]; sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str()); string ret(aNodeName); - delete aNodeName; + delete [] aNodeName; return ret; } @@ -462,7 +462,7 @@ string SALOMEDSImpl_AttributeTreeNode::Save() char* aResult = new char[aLength]; sprintf(aResult, "%s %s %s %s", aFather.c_str(), aPrevious.c_str(), aNext.c_str(), aFirst.c_str()); string ret(aResult); - delete aResult; + delete [] aResult; return ret; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx index 3149d8738..619e22ccc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx @@ -24,6 +24,8 @@ #include "SALOMEDSImpl_ScalarVariable.hxx" #include "SALOMEDSImpl_GenericVariable.hxx" #include +#include + using namespace std; //============================================================================ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 2b88c9b89..063562ae3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -767,7 +767,7 @@ bool SALOMEDSImpl_Study::IsModified() _errorCode = ""; // True if is modified - if (_doc->IsModified()) return true; + if (_doc && _doc->IsModified()) return true; return false; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index 823cde555..ee5457b34 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -125,9 +125,9 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aUrl.c_str()); aC_HDFUrl = new char[strlen(aResultPath) + 19]; sprintf(aC_HDFUrl, "%shdf_from_ascii.hdf", aResultPath); - delete(aResultPath); + delete [] (aResultPath); aHDFUrl = aC_HDFUrl; - delete aC_HDFUrl; + delete [] aC_HDFUrl; } else { aHDFUrl = aUrl; } @@ -1195,7 +1195,7 @@ static void ReadAttributes(SALOMEDSImpl_Study* theStudy, } else if (!strcmp(hdf_dataset->GetName(),"AttributeReference") || !strcmp(hdf_dataset->GetName(),"Reference")) { // Old format maintainance theStudy->NewBuilder()->Addreference(aSO, theStudy->CreateObjectID(current_string)); - delete(current_string); + delete [] (current_string); hdf_dataset->CloseOnDisk(); return; } else { @@ -1206,7 +1206,7 @@ static void ReadAttributes(SALOMEDSImpl_Study* theStudy, anAttr->Load(current_string); } - delete(current_string); + delete [] (current_string); hdf_dataset->CloseOnDisk(); } @@ -1319,7 +1319,7 @@ void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) new_dataset->CloseOnDisk(); new_dataset = 0; //will be deleted by hdf_sco_group destructor order = atoi(currentVarIndex); - delete currentVarIndex; + delete [] currentVarIndex; } else order = iVar; @@ -1337,14 +1337,14 @@ void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) SALOMEDSImpl_GenericVariable::VariableTypes aVarType = SALOMEDSImpl_GenericVariable::String2VariableType(string(currentVarType)); - delete currentVarType; + delete [] currentVarType; //Create variable and add it in the study SALOMEDSImpl_GenericVariable* aVariable = new SALOMEDSImpl_ScalarVariable(aVarType,string(aVarName)); aVariable->Load(string(currentVarValue)); aVarsMap.insert(make_pair(order,aVariable)); - delete currentVarValue; + delete [] currentVarValue; } } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx index 4a0b2ef77..b98a47364 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx @@ -29,7 +29,7 @@ #include "SALOMEDSImpl_Defines.hxx" // std C++ headers -#include +#include #include #include diff --git a/src/SALOMELocalTrace/SALOME_LocalTrace.hxx b/src/SALOMELocalTrace/SALOME_LocalTrace.hxx index 663bdb57f..568bd2d36 100755 --- a/src/SALOMELocalTrace/SALOME_LocalTrace.hxx +++ b/src/SALOMELocalTrace/SALOME_LocalTrace.hxx @@ -27,7 +27,7 @@ #define _SALOME_LOCALTRACE_HXX_ #ifdef WIN32 -# ifdef SALOMELOCALTRACE_EXPORTS +# if defined SALOMELOCALTRACE_EXPORTS || defined SALOMELocalTrace_EXPORTS # define SALOMELOCALTRACE_EXPORT __declspec( dllexport ) # else # define SALOMELOCALTRACE_EXPORT __declspec( dllimport ) diff --git a/src/SALOMETraceCollector/SALOMETraceCollector.hxx b/src/SALOMETraceCollector/SALOMETraceCollector.hxx index 5b32f4480..3fa09fabf 100644 --- a/src/SALOMETraceCollector/SALOMETraceCollector.hxx +++ b/src/SALOMETraceCollector/SALOMETraceCollector.hxx @@ -36,7 +36,7 @@ //! for usage without CORBA #ifdef WIN32 -# ifdef SALOMETRACECOLLECTOR_EXPORTS +# if defined SALOMETRACECOLLECTOR_EXPORTS || defined with_loggerTraceCollector_EXPORTS # define SALOMETRACECOLLECTOR_EXPORT __declspec( dllexport ) # else # define SALOMETRACECOLLECTOR_EXPORT diff --git a/src/TestContainer/SALOME_TestComponent.hxx b/src/TestContainer/SALOME_TestComponent.hxx index fc0f0bb29..8246ffe04 100644 --- a/src/TestContainer/SALOME_TestComponent.hxx +++ b/src/TestContainer/SALOME_TestComponent.hxx @@ -27,7 +27,7 @@ #define SALOME_TESTCOMPONENT_HXX #ifdef WIN32 -# if defined TESTCONTAINER_EXPORTS +# if defined TESTCONTAINER_EXPORTS || defined SalomeTestComponentEngine_EXPORTS # define TESTCONTAINER_EXPORT __declspec( dllexport ) # else # define TESTCONTAINER_EXPORT __declspec( dllimport ) diff --git a/src/Utils/SALOME_Utils.hxx b/src/Utils/SALOME_Utils.hxx index d3d3184b7..805a8e830 100755 --- a/src/Utils/SALOME_Utils.hxx +++ b/src/Utils/SALOME_Utils.hxx @@ -27,7 +27,7 @@ #define _SALOME_UTILS_HXX_ #ifdef WIN32 -# if defined UTILS_EXPORTS +# if defined UTILS_EXPORTS || defined OpUtil_EXPORTS # define UTILS_EXPORT __declspec( dllexport ) # else # define UTILS_EXPORT __declspec( dllimport ) diff --git a/src/Utils/Utils_Identity.py b/src/Utils/Utils_Identity.py index 489060f8c..26d5a21ee 100644 --- a/src/Utils/Utils_Identity.py +++ b/src/Utils/Utils_Identity.py @@ -26,19 +26,25 @@ # Module : SALOME # $Header$ # +## @package Utils_Identity +# \brief Module to get information about user and version +# +# + import sys import os import socket if not sys.platform == "win32": import pwd - + import time import string def getShortHostName(): """ gives Hostname without domain extension. + SALOME naming service needs short Hostnames (without domain extension). HOSTNAME is not allways defined in environment, socket.gethostname() gives short or complete Hostname, depending on @@ -51,18 +57,18 @@ class Identity: self._name = name self._pid = os.getpid() self._machine = socket.gethostname() - self._adip = socket.gethostbyname(self._machine) # IP adress + self._adip = socket.gethostbyname(self._machine) # IP adress if sys.platform == "win32": - self._uid = os.getpid() - self._pwname = os.environ["USER"] - else: - self._uid = os.getuid() - list = pwd.getpwuid(self._uid) - self._pwname = list[0] # user name + self._uid = os.getpid() + self._pwname = os.environ["USER"] + else: + self._uid = os.getuid() + list = pwd.getpwuid(self._uid) + self._pwname = list[0] # user name - self._tc_start = time.time() + self._tc_start = time.time() self._cstart = time.ctime(self._tc_start) - self._cdir = os.getcwd() + self._cdir = os.getcwd() def getapplipath(): """ diff --git a/src/Utils/Utils_SALOME_Exception.hxx b/src/Utils/Utils_SALOME_Exception.hxx index c093e05c5..30d378266 100644 --- a/src/Utils/Utils_SALOME_Exception.hxx +++ b/src/Utils/Utils_SALOME_Exception.hxx @@ -46,7 +46,7 @@ //therefore (temporary solution) defines are placed below #ifdef WIN32 -# ifdef UTILS_EXPORTS +# if defined UTILS_EXPORTS || defined OpUtil_EXPORTS # define UTILS_EXPORT __declspec( dllexport ) # else # define UTILS_EXPORT __declspec( dllimport )