#
# 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
#
# 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
#
# 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
#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 , ' &']
#
# 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 *
# -----------------------------------------------------------------------------
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
# --------------------------------------------------------------------------
def showNS(self):
- """ Show the content of NS"""
+ """ Show the content of SALOME naming service """
self.showNScontext(self.rootContext)
# --------------------------------------------------------------------------
#
# 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
#
# 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
class SalomeSession(object):
+ """Salome session launcher"""
import runSalome
import killSalomeWithPort
import killSalome
# 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
#
# 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()
#
# 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()
#
# 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
#
# 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")
# ================================================================
#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, ...
# ---- 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)
# ----------------------------------------------------------------------------
CHECK_LIBXML
-if test x$WITHONLYLAUNCHER = xno; then
+if test x$with_onlylauncher = xno; then
echo
echo ---------------------------------------------
echo testing HDF5
# --------------------------------------
-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
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:
summary $htmldoc_products
echo
-if test x$WITHONLYLAUNCHER = xno; then
+if test x$with_onlylauncher = xno; then
echo
echo "Default ORB : $DEFAULT_ORB"
echo
./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 \
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
#
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 \
--- /dev/null
+
+# 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"
--- /dev/null
+
+# 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"
+
--- /dev/null
+
+# 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"
--- /dev/null
+
+#--------------------------------------------------------------------------
+# 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"
+
--- /dev/null
+
+#--------------------------------------------------------------------------
+# 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"
+
--- /dev/null
+
+#--------------------------------------------------------------------------
+# 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"
+
--- /dev/null
+
+# 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"
+
--- /dev/null
+
+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!"
+
--- /dev/null
+
+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"
+
--- /dev/null
+
+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()
+
--- /dev/null
+
+#======================================================================
+#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"
+
--- /dev/null
+
+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)
+
--- /dev/null
+
+# 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()
+
--- /dev/null
+
+# 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()
+
--- /dev/null
+
+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")
+
--- /dev/null
+
+# 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)
+
--- /dev/null
+
+# 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"
+
--- /dev/null
+
+# 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"
+
--- /dev/null
+
+# 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"
+
--- /dev/null
+
+# 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"
--- /dev/null
+
+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"
+
--- /dev/null
+
+# 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"
+
--- /dev/null
+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
+
--- /dev/null
+# 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
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+</head>
+<body>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;">Copyright © 2003-2007 CEA, EDF<br>
+</div>
+</body>
+</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>$title</title>
+ <link href="tabs.css" rel="stylesheet" type="text/css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<hr>
+<center>
+SALOME documentation central
+</center>
+<hr>
/*!
\page INSTALL Installation instructions
-<b>NOT UP TO DATE %SALOME 4</b>
-<b>WORK in PROGRESS, INCOMPLETE DOCUMENT</b>
+<b>NOT UP TO DATE AND INCOMPLETE DOCUMENT BUT CAN BE HELPFUL</b>
-You'll find here generic instructions for installing the SALOME2 platform.
+You'll find here generic instructions for installing the SALOME platform.
\section Summary
-<ol>
-<li> \ref S1_install </li>
-<li> \ref S2_install </li>
-<li> \ref S3_install </li>
-<li> \ref S4_install </li>
-<li> \ref S5_install </li>
-<li> \ref S6_install </li>
-<li> \ref S7_install </li>
-<li> \ref S8_install </li>
-</ol>
+-# \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
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 <kernel_build>
\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 (<COMPONENT>_ROOT_DIR,
OMNIORB_CONFIG)
In the following, we assume that all the third-party softwares are
installed in the same root directory, named <salomeroot>/prerequis.
-Then, your file system should probably look like::
+Then, your file system should probably look like:
\code
<salomeroot>/prerequis/Python-2.2.2
\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.
We use here the notation <kernel_src> 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:
\endcode
If it doesn't work, check your system automake tools as specified in
- section [2].
+ section \ref S2_install.
<b>STEP 3:</b>
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 <kernel_build>
Note that <kernel_install> 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
---------------------------------------------
<b>STEP 4 :</b>
Building the binary files
- Execute make in the <kernel_build> directory::
+ Execute make in the <kernel_build> directory:
\code
$ make
<b>STEP 5:</b>
Installing binary files, scripts and documentation
- Execute install target in the <kernel_build> directory::
+ Execute install target in the <kernel_build> directory:
\code
$ make install
\section S6_install Installing the SALOME components
-TInstalling a component <COMPONENT> is done by following the same
+Installing a component <COMPONENT> is done by following the same
instructions as given for the KERNEL, replacing KERNEL by
<COMPONENT> (build_configure, configure, make, make install).
- 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.
\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 <COMPONENT>_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=<kernel_install>
$ export MED_ROOT_DIR=<med_install>
- 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
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
<salomeroot>.
- 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
<salomeroot>:
-
\code
$ cp <kernel_src>/prerequis.sh <rundir>/.
$ cp <kernel_install>/bin/salome/runSalome <rundir>/.
\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 <COMPONENT>_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 <salomeroot>/prerequis.sh
$ source <salomeroot>/envSalome.sh
$ ./runSalome
\endcode
+
*/
/*!
-\page kernel_resources SALOME Kernel resources for developer
+\page kernel_resources Salome Kernel resources for developer
-<b>WORK in PROGRESS, INCOMPLETE DOCUMENT</b>
-\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
execution at debug time, in order to validate all parts
of code.
-<ol>
-<li>
-<b>Two modes: debug and release</b>
+\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
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.
-</li>
-<li>
-<b>C++ Macros for trace and debug</b>
+
+\subsection subsection22 C++ Macros for trace and debug
%SALOME provides C++ macros for trace and debug. These
macros are in:
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
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.
-<ol>
-<li>
-<b>Macros defined in debug and release modes</b>
-\n
-<b>INFOS_COMPILATION</b>
+\subsection subsection23 Macros defined in debug and release modes
+- <b>INFOS_COMPILATION</b>\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)
INFOS_COMPILATION;
...
}
-INFOS(str)
\endcode
-\n
-<b>INFOS</b>
+- <b>INFOS</b>\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)
return 0;
}
\endcode
-
Displays:
-
\code
main.cxx [5] : NORMAL END OF THE PROCESS
\endcode
-\n
-<b>INTERRUPTION(str)</b>
+- <b>INTERRUPTION(str)</b>\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.
-<b>IMMEDIATE_ABORT(str)</b>
-
+- <b>IMMEDIATE_ABORT(str)</b>\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.
-</li>
-<li>
-<b>Macros defined only in debug mode</b>
-\n
-<b>MESSAGE(str)</b>
+\subsection subsection24 Macros defined only in debug mode
+- <b>MESSAGE(str)</b>\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 <string>
}
\endcode
-
Displays:
-
\code
- Trace main.cxx [8] : Salome
- Trace main.cxx [12] : Aster and CASTEM
\endcode
-\n
-<b>BEGIN_OF(func_name)</b>
-
+- <b>BEGIN_OF(func_name)</b>\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)
return 0;
}
\endcode
-
Displays:
-
\code
- Trace main.cxx [3] : Begin of a.out
\endcode
-\n
-<b>END_OF(func_name)</b>
+- <b>END_OF(func_name)</b>\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)
return 0;
}
\endcode
-
Displays:
-
\code
- Trace main.cxx [4] : Normal end of a.out
\endcode
-\n
-<b>SCRUTE(var)</b>
+- <b>SCRUTE(var)</b>\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)
return 0;
}
\endcode
-
Displays:
-
\code
- Trace main.cxx [5] : i=999
\endcode
-\n
-<b>ASSERT(condition)</b>
+- <b>ASSERT(condition)</b>\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"
...
cout << table[k];
\endcode
-</li>
-</ol>
-</li>
-</ol>
-
\section S3_kernel_res Exceptions
-<ol>
-<li>
-<b>C++ exceptions: class SALOME_Exception</b>
+\subsection subsection31 C++ exceptions: class SALOME_Exception
-<ol>
-<li>
-<b>definition</b>
+\subsubsection subsubsection311 Definition
The class SALOME_Exception provides a generic method to
send a message, with optional source file name and line
The class SALOME_Exception inherits its behavior from
the STL class exception.
-</li>
-<li>
-<b>usage</b>
+
+\subsubsection subsubsection312 Usage
The header %SALOME/src/utils/utils_SALOME_Exception.hxx
must be included in the C++ source, when raised or trapped:
\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:
The what() method overrides the one defined in the STL
exception class.
-</li>
-</ol>
-</li>
-<li>
-<b>CORBA exceptions</b>
-<ol>
-<li>
-<b>definition</b>
+\subsection subsection32 CORBA exceptions
+
+\subsubsection subsubsection321 Definition
The idl SALOME_Exception provides a generic CORBA
exception for %SALOME, with an attribute that gives an
packages used within %SALOME, such as OmniORB
exceptions, must be handled separately.
-</li>
-<li>
-<b>usage</b>
-<ol>
-<li>
+\subsubsection subsubsection322 Usage
<b>CORBA servant, C++</b>
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"
SALOME::BAD_PARAM);
\endcode
-</li>
-<li>
-<b>CORBA Client, GUI Qt C++</b>
-
- <b>NO MORE AVAILABLE in %SALOME 3.x</b>
+<b>CORBA Client, GUI Qt C++ (NO MORE AVAILABLE in %SALOME 3.x and later)</b>
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"
}
\endcode
-</li>
-<li>
<b>CORBA Client, C++, without GUI</b>
Nothing specific has been provided to the developer
SALOMEGUI_QtCatchCorbaException.hxx to see how to get
the information given by the exception %object.
-</li>
-</ol>
-</li>
-</ol>
-</ol>
-
\section S4_kernel_res Miscellaneous tools
-<ol>
-<li>
-<b>Singleton</b>
-<ol>
-<li>
-<b>Definition</b>
+\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
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.
-</li>
-<li>
-<b>Usage</b>
+\subsubsection subsubsection412 Usage
To create a single instance of a POINT %object:
assert(p1==p2)
\endcode
-</li>
-<li>
-<b>Design description</b>
+\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_<TYPE>::Instance()`` which
+ class method SINGLETON_<TYPE>::Instance() which
returns a pointer to the single %object ;
-
-- to create an %object, ``SINGLETON_<TYPE>::Instance()``
+- to create an %object, SINGLETON_<TYPE>::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_()``.
-
-</li>
-</ol>
-</li>
-</ol>
*/
/*!
\page KERNEL_Services KERNEL Services for end user (Python interface)
-<b>WORK in PROGRESS, INCOMPLETE DOCUMENT</b>
-
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,
\section S1_kernel_ser General purpose services
-<ol>
-<li>
-<b>%SALOME services access from a Python shell</b>
+\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
do it several times, so it is preferable to add these instructions
systematically in your scripts, to allow them to work in all configurations.
-</li>
-<li>
-<b>Container and component instanciation</b>
+\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
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:
SalomeAppEngine.object
\endcode
-</li>
-<li>
-<b>File transfer service</b>
+\subsection subsection13 File transfer service
See SALOME_FileTransferCORBA for the C++ interface (Python interface obtained with
SWIG is very similar).
localFile=aFileTransfer.getLocalFile()
\endcode
-</li>
-<li>
-<b>CORBA Naming service access</b>
+\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.
-</li>
-<li>
-<b>Batch services</b>
-
-See \ref batch_page documentation (in french only).
+\subsection subsection5 Batch services
-</li>
-</ol>
+See <a href="Batch.html/index.html"> Batch documentation </a> (in french only).
\section S2_kernel_ser All IDL Interfaces
-<ol>
-<li>
-<b>Containers and component life cycle, File transfer service</b>
-
-- 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
-
-</li>
-<li>
-<b>Study management</b>
-
-- SALOMEDS : SALOMEDS CORBA module
-- SALOMEDS.idl
-- SALOMEDS_Attributes.idl
-
-</li>
-<li>
-<b>High speed transfer, object life cycle, exceptions, GUI interface...</b>
-
-- SALOME : %SALOME CORBA module
-- SALOME_Comm.idl
-- SALOME_GenericObj.idl
-- SALOME_Exception
-- SALOME_Session.idl
-
-</li>
-<li>
-<b>Miscelleanous</b>
-
-- SALOME_ModuleCatalog
-- SALOME_RessourcesCatalog
-- SALOME_Registry.idl
-- Logger.idl
-
-<b>Other idl for test purposes</b>
-\n
-- nstest.idl
-- SALOME_TestComponent.idl
-- SALOME_TestModuleCatalog.idl
-- SALOME_TestMPIComponent.idl
-- TestNotif.idl
+-# <b>Containers and component life cycle, File transfer service</b>
+ - 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
+ .
+-# <b>Study management</b>
+ - SALOMEDS : SALOMEDS CORBA module
+ - SALOMEDS.idl : \copybrief SALOMEDS.idl
+ - SALOMEDS_Attributes.idl : \copybrief SALOMEDS_Attributes.idl
+ .
+-# <b>High speed transfer, object life cycle, exceptions, GUI interface...</b>
+ - 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
+ .
+-# <b>Miscelleanous</b>
+ - SALOME_ModuleCatalog : \copybrief SALOME_ModuleCatalog
+ - SALOME_RessourcesCatalog : \copybrief SALOME_RessourcesCatalog
+ - Registry : \copybrief Registry
+ - SALOME_Logger : \copybrief SALOME_Logger
+ .
+-# <b>Other idl for test purposes</b>
+ - 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
+ .
+-# <b>Some useful command scripts </b>
+ - 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
+*/
+
/*! \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
-<ol>
- <li>
- <b>How to configure a %SALOME application</b>
- \n The end user may have to configure his own %SALOME application by selection of a
+-# <b>How to configure a %SALOME application</b>\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.
- </li>
- <li>
- <b>How to launch %SALOME in a %SALOME application</b>
- \n See \ref SALOME_Application.
- </li>
- <li>
- <b>How to use KERNEL services in Python scripts</b>
- \n The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services.
- </li>
-</ol>
+-# <b>How to launch %SALOME in a %SALOME application</b>\n
+ See \ref SALOME_Application.
+-# <b>How to use KERNEL services in Python scripts</b>\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.
-<ol>
- <li>
- <b>How to install %SALOME</b>
- \n See \subpage INSTALL for general information on required configuration and
+-# <b>How to install %SALOME</b>\n
+ See \subpage INSTALL for general information on required configuration and
prerequisites, compilation procedure, setting environment principles.
- </li>
- <li>
- <b>How to configure a %SALOME application</b>
- \n See \ref SALOME_Application to define your own configuration of %SALOME and run it
+-# <b>How to configure a %SALOME application</b>\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.
- </li>
-</ol>
- \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.
-<ol>
- <li>
- <b>Source code structuration and Unit Tests</b>
- \n See \subpage UnitTests for general information on code directories structure,
+-# <b>Source code structuration and Unit Tests</b>\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.
- </li>
- <li>
- <b>Some development utilities</b>
- \n See \subpage kernel_resources for information on basic utilities for C++ and Python
+-# <b>Some development utilities</b> \n
+ See \subpage kernel_resources for information on basic utilities for C++ and Python
development, like trace and debug, exceptions, singleton.
- </li>
-</ol>
- \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.
+ - <a href="Batch.html/index.html"> Batch documentation </a>
*/
/*!
- \page SALOME_Application SALOME Application Concept
+ \page SALOME_Application Salome Application Concept
- <b>Configuration for one or more computers</b>
-
-
-<b> **WORK in PROGRESS, INCOMPLETE DOCUMENT** </b>
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
\section S2_sal_appl Application Directory
-There are two ways for creation of an application directory, <b>the recommended way is
-the second, easier to configure.</b>
-
-<ol>
- <li>
- <b>First way - references to different module directories</b>
-
-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
-
- </li>
- <li>
- <b>Second and easiest way - one single virtual install directory</b>
-
-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 <KERNEL_ROOT_DIR>/bin/salome/appli_gen.py --prefix=<install directory> --config=<configuration file>
\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.
-<b>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</b>
+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).
- </li>
-</ol>
\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.
<ol>
<li>
<b>env.d scripts</b>
-With the first way of installation, each user **must define** his own
-configuration for these scripts, following the above rules.
-<b>With the virtual installation (second way, above), env.d
-scripts are built automatically.</b>
-
- **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.
+<b>env.d scripts are built automatically.</b>
- 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.
</li>
<li>
<b>User run scripts</b>
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
<li>
<b>%SALOME internal run scripts</b>
-- 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.
<li>
<b>Other configuration files</b>
-- 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
</li>
</ol>
<li>
<b>Launch a %SALOME session with a GUI interface</b>
-Launch is done with a command like::
+Launch is done with a command like:
\code
./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::
+There are a lot of options, a complete list is given by:
\code
./runAppli --help
<b>Close a %SALOME session, kill all the servers</b>
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 <b>all the sessions</b> on a given computer:
\code
./runSession killSalome.py
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
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
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
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
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). <b>AVOID modifications with GUI when a Python script
+is running</b>. Not all the modules are protected against concurrent actions...
</li>
<li>
<b>Different uses of the runSession shell interpreter</b>
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$
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
\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 <b>name</b> and a <b>path</b>.
There is two different cases when a file is added :
};
\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.
-
*/
#
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`
-
-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 ;
-
-KERNEL/main.html:../main.dox
- cp -fr $(srcdir)/KERNEL/* ./INPUT; \
- cd ./INPUT; \
- pwd; ls;\
+dev_docs:
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; \
+ sed 's|python_extension_must_be_here|*.py|' ./doxyfile > ./doxyfile1; \
+ $(DOXYGEN) -u ./doxyfile1; \
else \
- sed 's|python_extension_must_be_here||' ./doxyuser > ./doxyuser1; \
+ sed 's|python_extension_must_be_here||' ./doxyfile > ./doxyfile1; \
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; \
+ sed -e 's|BUILTIN_STL_SUPPORT = NO|BUILTIN_STL_SUPPORT = YES|' ./doxyfile1 > ./doxyfile2; \
+ mv -f doxyfile2 doxyfile1; \
fi; \
- $(DOXYGEN) ./doxyuser1; \
- cd ..;
+ $(DOXYGEN) ./doxyfile1
+
+clean-local:
+ -rm -fr KERNEL log.txt doxyfile1.bak doxyfile1
-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
+
+EXTRA_DIST=static KERNEL/exemple
+
+dist-hook:
+ rm -rf $(distdir)/static/CVS ; \
+ rm -rf $(distdir)/KERNEL/exemple/CVS
-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;
--- /dev/null
+# 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 = 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@/src/DSC
+FILE_PATTERNS = *.idl *.cxx *.hxx *.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 =
+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
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+</head>
+<body>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;">Copyright © 2003-2007 CEA, EDF<br>
+</div>
+</body>
+</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>$title</title>
+ <link href="tabs.css" rel="stylesheet" type="text/css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<hr>
+<center>
+SALOME documentation central
+</center>
+<hr>
\section S1_unit SALOME KERNEL source code structuration
-<ol>
-<li> <b>General structure of KERNEL_SRC</b>
+\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)
-</li>
-<li>
-<b>Directory src: C++ and Python source code</b>
+\subsection sub12 Directory src: C++ and Python source code
<ol>
<li>
<b>Basic services non related to CORBA</b>
-- 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.
</li>
<li>
<b>Basic CORBA services</b>
-- 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.
<li>
<b>Miscellaneous CORBA servers</b>
-- %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
- SALOMEDSImpl
-- SALOMEDS
+- %SALOMEDS
</li>
<li>
\section S2_unit Tools and principles used for Unit testing
-<b>**TO BE COMPLETED**</b>
+<b>TO BE COMPLETED</b>
Unit Testing rely on cppunit package for C++ testing, and on unittest module
for Python. See these products for general principles of unit testing.
//
// 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_
#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;
#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 {
/*--------------------------------------------------------------------------------------------*/
/*-------------------------------------- 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.
*/
typedef sequence<Ports::Port> 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.
*/
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.
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
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
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
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.
*/
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.
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.
*/
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.
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.
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.
*/
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.
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.
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();
};
*/
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.
#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();
};
};
//
// 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_
#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 {
*/
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.
/*! \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.
// 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
*/
#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<string> ListOfOpenStudies;
-/*! List of file names
-*/
+//! List of file names
typedef sequence<string> ListOfFileNames;
-/*! List of modification dates of a study
-*/
+//! List of modification dates of a study
typedef sequence<string> ListOfDates ;
-/*! An unbounded sequence of strings
-*/
+//! An unbounded sequence of strings
typedef sequence<string> ListOfStrings ;
-/*! An unbounded sequence of sequence of strings
-*/
+//! An unbounded sequence of sequence of strings
typedef sequence<ListOfStrings> 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<octet> TMPFile;
// Reference to other objects is treated with function AddReference
interface UseCaseIterator;
interface UseCaseBuilder;
-/*! List of attributes of %SObjects
-*/
+//! List of attributes of %SObjects
typedef sequence<GenericAttribute> 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 {};
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()
This is equivalent to the methods setID() & getID()
*/
attribute short StudyId;
-/*! Sequence containing %SObjects
-*/
+//! Sequence containing %SObjects
typedef sequence<SObject> 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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
+
*/
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
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
-
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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 <VAR>anObjectName</VAR>.
\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.
-<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+ \param thePath String parameter defining the context of the study.
+<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetContext(in string thePath);
-/*!
- Gets the context of the %Study.
+/*! \brief Get the context of the %Study.
-<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
-
+<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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 <VAR>theContext</VAR> 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 <VAR>theContext</VAR> 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 <VAR>theContext</VAR> 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 <VAR>theContext</VAR> 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.
-<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+ \return A new %StudyBuilder.
+<em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
*/
StudyBuilder NewBuilder() ;
/*! \brief Labels dependency
/*! \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.
-<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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;
\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);
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
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")
*/
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.
*/
boolean RemoveVariable( in string theVarName );
-/*! \brief Renaming variable
+/*! \brief Rename a variable
Rename variable with the specified name within the study.
*/
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.
Creates a new %SComponent
\param ComponentDataType Data type of the %SComponent which will be created.
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
*/
SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
\param theFatherObject The father %SObject under which this one should be created.
\return New %SObject
-<BR><VAR>See also <A href="exemple/Example18.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example18 for an example of this method usage in batchmode of %SALOME application.</em>
*/
/*!
Loads a %SComponent.
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
\param anObject The %SObject corresponding to the attribute which is looked for.
\param aTypeOfAttribute Type of the attribute.
- <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
GenericAttribute FindOrCreateAttribute(in SObject anObject,
\param anObject The %SObject corresponding to the attribute.
\param aTypeOfAttribute Type of the attribute.
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void RemoveAttribute(in SObject anObject,
in string aTypeOfAttribute) raises(LockProtection);
Adds a directory in the %Study.
\param theName String parameter defining the name of the directory.
-<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void AddDirectory(in string theName) raises(LockProtection);
Creates a new command which can contain several different actions.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void NewCommand(); // command management
\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
-<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void CommitCommand() raises(LockProtection); // command management
Cancels all actions declared within the command.
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void AbortCommand(); // command management
/*! \brief Undolimit
\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
-<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void Undo() raises (LockProtection);
\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
- <BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void Redo() raises (LockProtection);
/*!
Returns True if at this moment there are any actions which can be canceled.
- <BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean GetAvailableUndos();
/*!
Returns True if at this moment there are any actions which can be redone.
- <BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean GetAvailableRedos();
\param study_name String parameter defining the name of the study
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
*/
Study NewStudy(in string study_name);
\param aStudyUrl The path to the study
\warning This method doesn't activate the corba objects. Only a component can do it.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
\param theMultiFile If this parameter is True the study will be saved in several files.
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean Save(in Study aStudy, in boolean theMultiFile);
\param aStudy The study which will be saved
\param theMultiFile If this parameter is True the study will be saved in several files.
- <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean SaveAs(in URL aUrl, // if the file already exists
in Study aStudy,
\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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean FindAttribute(out GenericAttribute anAttribute,
in string aTypeOfAttribute);
\return The list of all attributes of the given %SObject.
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
*/
ListOfAttributes GetAllAttributes();
*/
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
//==========================================================================
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.
*/
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.
- <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
SComponent Value();
{
/*!
-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();
};
\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
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
*/
\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
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
*/
TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
//
// 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_
module SALOMEDS
{
-/*! Sequence of double values
-*/
+//! Sequence of double values
typedef sequence <double> DoubleSeq;
-/*! Sequence of long values
-*/
+//! Sequence of long values
typedef sequence <long> LongSeq;
-/*! Sequence of string values
-*/
+//! Sequence of string values
typedef sequence <string> 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;
};
//==========================================================================
interface AttributeReal : GenericAttribute
{
+//! Returns the value of this attribute.
/*!
- Returns the value of this attribute.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
double Value();
+ //! Sets the value of this attribute.
/*!
- Sets the value of this attribute.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in double value);
//==========================================================================
interface AttributeInteger : GenericAttribute
{
+ //! Returns the value of this attribute
/*!
- Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
long Value();
+
+ //! Sets the value of this attribute
/*!
- Sets the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in long value);
};
//==========================================================================
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
long Length();
//==========================================================================
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
long Length();
interface AttributeName : GenericAttribute
{
-/*!
- Returns the value of this attribute
+/*! \brief Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
//==========================================================================
interface AttributeComment : GenericAttribute
{
-/*!
- Returns the value of this attribute
+/*! \brief Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
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.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
/*!
Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string Value();
/*!
Sets the value of this attribute
\param value This parameter defines the value of this attribute - IOR of a %SObject.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
/*!
Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string Value();
/*!
Sets the value of this attribute
\param value This parameter defines the value of this attribute.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
{
/*!
Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string Value();
/*!
Sets the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
{
/*!
Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string Value();
/*!
Sets the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
/*!
Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
-<BR><VAR>See also <A href="exemple/Example8.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean IsDrawable();
\param value If the value of this boolean parameter is TRUE (default) the item will be drawable.
-<BR><VAR>See also <A href="exemple/Example8.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetDrawable(in boolean value);
Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
-<BR><VAR>See also <A href="exemple/Example9.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean IsSelectable();
\param value If the value of this parameter is TRUE (the default) the item will be set as selectable.
-<BR><VAR>See also <A href="exemple/Example9.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetSelectable(in boolean value);
/*!
Returns TRUE if this item is expandable even when it has no children.
-<BR><VAR>See also <A href="exemple/Example10.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean IsExpandable();
\param value If the value of this boolean parameter is TRUE, this item will be set as expandable.
-<BR><VAR>See also <A href="exemple/Example10.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetExpandable(in boolean value);
/*!
Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
-<BR><VAR>See also <A href="exemple/Example11.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
*/
boolean IsOpened();
\param value If the value of this boolean parameter is TRUE this item will be set as open,
and as closed if FALSE.
-<BR><VAR>See also <A href="exemple/Example11.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetOpened(in boolean value);
/*!
Returns the color of an item.
-<BR><VAR>See also <A href="exemple/Example12.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
*/
Color TextColor();
\param value This parameter defines the color of the item.
-<BR><VAR>See also <A href="exemple/Example12.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetTextColor(in Color value);
-<BR><VAR>See also <A href="exemple/Example13.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
*/
Color TextHighlightColor();
Sets the highlight color of an item.
\param value This parameter defines the highlight color of the item.
-<BR><VAR>See also <A href="exemple/Example13.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetTextHighlightColor(in Color value);
/*!
Returns the name of the icon in the format of a string.
-<BR><VAR>See also <A href="exemple/Example14.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string GetPixMap();
Sets the name of the icon.
\param value This string parameter defines the name of the icon.
-<BR><VAR>See also <A href="exemple/Example14.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetPixMap(in string value);
tree whith its own structure and identifier. The quantity of such trees with different
identifiers can be arbitrary.
-<BR><VAR>See also <A href="exemple/Example18.html"> an example </A> of usage of the methods of this interface in batchmode of %SALOME application.</VAR>
+<em>See \ref example18 for an example of usage of the methods of this interface in batchmode of %SALOME application.</em>
*/
//==========================================================================
/*!
Deletes a tree node.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void Remove();
/*!
Returns the value of this attribute.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
long Value();
/*!
\param value This parameter defines the local ID which will be set.
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in long value);
};
/*!
Returns the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
string Value();
/*!
Sets the value of this attribute
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void SetValue(in string value);
};
/*!
Adds a %SObject to the list of %SObjects which refer to this %SObject.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void Add(in SObject anObject);
/*!
Deletes a %SObject from the list of %SObjects which refer to this %SObject.
-<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
*/
void Remove(in SObject anObject);
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.
-<BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
+<em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
*/
//==========================================================================
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
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.
-<BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
+<em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
*/
//==========================================================================
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
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.
-<BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
+<em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
*/
//==========================================================================
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
This attribute allows to store study properties: user name, creation date, creation
mode, modified flag, locked flag.
-<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
+<em>See \ref example20 for an example of usage of these methods in batchmode of %SALOME application.</em>
*/
//==========================================================================
#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_ };
#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
*/
typedef sequence<octet> 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;
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
*/
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,
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,
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
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...
*/
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
*/
fileRef createFileRef(in string origFileName);
+ //! Create a Salome_file
/*!
returns a Salome_file object if origFileName exists and is readable
else returns null object.
*/
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
*/
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)
*/
long getStudyId();
+ //! Remove component instance from container
/*!
Deactivates the %Component.
-- TO BE USED BY CONTAINER ONLY (Container housekeeping) --
*/
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.
*/
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.
*/
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
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.
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.
*/
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
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.
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.
*/
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
*/
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
*/
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
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<octet> fileBlock;
/*! \brief Interface of fileTransfer.
*/
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.
*/
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.
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<Engines::file> 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
*/
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.
*/
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.
*/
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.
/**************/
+ //! 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.
*/
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.
*/
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.
*/
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.
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.
/**************/
+ //! 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.
*/
/**************/
+ //! Remove a file of the Salome_file.
/*!
- Remove a file of the Salome_file.
\param file_name name of the file.
*/
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.
*/
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.
*/
*/
interface fileRef
{
+ //! the original file
readonly attribute string origFileName;
+ //! the machine of the original file
readonly attribute string refMachine;
Container getContainer();
#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<string> MachineList;
+//! components list
typedef sequence<string> CompoList;
+//! files list
typedef sequence<string> FilesList;
+//! modules list
typedef sequence<string> ModulesList;
-/*!
- Type to describe properties of resource.
-*/
+//! Type to describe properties of a resource.
struct MachineParameters
{
string container_name;
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
*/
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.
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();
} ;
*/
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 );
} ;
// 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
#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; /*!<Type of the exception.*/
string sourceFile; /*!<The source file where the exception is raised.*/
unsigned long lineNumber; /*!<Number of the line of the source file where the exception is raised.*/
};
-/*!
-The main exception in %SALOME application.
+/*! \brief The main exception 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
+ handled in a single catch.
*/
exception SALOME_Exception
{
//
#ifndef _SALOME_GENERICOBJ_IDL_
#define _SALOME_GENERICOBJ_IDL_
-/*!
-This is a package of interfaces used for providing of common bechavior
-of SALOME transient CORBA objects in %SALOME application.
+/*! \file SALOME_GenericObj.idl \brief interface for common behavior of %SALOME transient CORBA objects
*/
+
module SALOME{
+/*! \brief interface for common behavior of %SALOME transient CORBA objects
+*/
interface GenericObj{
- /*! Increase the reference count (mark as used by another object).*/
+ /*! \brief Increase the reference count (mark as used by another object).*/
void Register();
- /*! Decrease the reference count (release by another object).*/
+ /*! \brief Decrease the reference count (release by another object).*/
void Destroy();
};
};
#include "SALOME_Component.idl"
#include "SALOME_MPIObject.idl"
+/*! \file SALOME_MPIContainer.idl \brief interfaces for parallel container
+*/
+
module Engines
{
+ /*! \brief Interface of the MPI parallel container.
+ This interface defines the process of loading and registration
+ of new components in %SALOME application
+ */
+
interface MPIContainer:Container,MPIObject
{
// asynchronous version to load and remove parallel component in parallel
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File : MPIObject.idl
+// File : SALOME_MPIObject.idl
//
#ifndef _SALOME_MPIOBJECT_IDL_
#define _SALOME_MPIOBJECT_IDL_
+/*! \file SALOME_MPIObject.idl \brief interfaces for parallel (MPI) objects
+*/
+
module Engines
{
typedef sequence<Object> IORTab;
+ /*! \brief Interface of a parallel %object for the MPI parallel container.
+ */
interface MPIObject
{
attribute IORTab tior;
// 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, /*!<Module %GEOM */
SUPERV, /*!<Module %SUPERVISION */
OTHER /*!<Any other type of module */
} ;
-/*!
-This struct contains fields defining the parameter of the service.
-*/
-
+//! This struct contains fields defining the parameter of the service.
struct ServicesParameter
{
- string Parametertype; /*!<Type of the parameter.*/
- string Parametername; /*!<Name of the parameter.*/
+ string Parametertype; /*!<Parameter type name.*/
+ string Parametername; /*!<Parameter name.*/
} ;
+//! enumeration to define datastream ports dependency
enum DataStreamDependency {
- DATASTREAM_UNDEFINED,
- DATASTREAM_TEMPORAL,
- DATASTREAM_ITERATIVE
+ DATASTREAM_UNDEFINED, /*!< dependency not defined */
+ DATASTREAM_TEMPORAL, /*!< time dependency */
+ DATASTREAM_ITERATIVE /*!< iterative dependency */
} ;
+//! struct to define datastream ports
struct ServicesDataStreamParameter
{
- string Parametertype; /*!<Type of the parameter.*/
- string Parametername; /*!<Name of the parameter.*/
+ string Parametertype; /*!<Parameter type name.*/
+ string Parametername; /*!<Parameter name.*/
DataStreamDependency Parameterdependency; /*!<Temporal or iterative dependency.*/
} ;
-/*!
-The list of the parameters of service.
-*/
-
+//! The list of the parameters of service.
typedef sequence<ServicesParameter> ListOfServicesParameter;
+//! The list of datastream parameters of service.
typedef sequence<ServicesDataStreamParameter> ListOfServicesDataStreamParameter;
+//! a string list
typedef sequence<string> 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<MemberDefinition> 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<TypeDefinition> ListOfTypeDefinition;
-/*!
-This struct contains fields completely defining each service.
-*/
-
+//! This struct contains fields defining each service.
struct Service
{
string ServiceName; /*!<Name of the service.*/
boolean Servicebydefault; /*!<True if the service is taken with its default fields.*/
boolean TypeOfNode; /*!<True is the service is a factory node. Otherwise, it's a compute node.*/
} ;
-/*!
-List of services of the interface.
-*/
+//! List of services of the interface.
typedef sequence<Service> ListOfInterfaceService;
-/*!
-List of services.
-*/
+//! List of services.
typedef sequence<string> ListOfServices ;
-/*!
-This struct contains fields defining each interface.
-*/
+//! This struct contains fields defining each interface.
struct DefinitionInterface
{
string interfacename ; /*!<Name of the interface.*/
ListOfInterfaceService interfaceservicelist ; /*!<List of services of the interface.*/
} ;
-/*!
-List of interface definitions.
-*/
+//! List of interface definitions.
typedef sequence<DefinitionInterface> ListOfDefInterface ;
-/*!
-List of names of interfaces.
-*/
+//! List of interface names.
typedef sequence<string> ListOfInterfaces ;
-/*!
-PathPrefix : association of a machine name and
+/*! \brief PathPrefix : association of a machine name and
a path to a component
*/
struct PathPrefix {
string path;
};
-/*!
-List of path prefixes
-*/
+//! List of path prefixes
typedef sequence<PathPrefix> 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;
PathPrefixes paths;
};
-/*!
-List of names of components.
-*/
+//! List of component names.
typedef sequence<string> ListOfComponents ;
-/*!
-List of names of computers.
-*/
+//! List of computer names.
typedef sequence<string> 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; /*!<Name of the module.*/
string moduleversion; /*!<Version of the module.*/
string modulecomment; /*!<Comment to the module.*/
};
-/*!
-List of pair GUI elements (component name, component icone)
+/*! \brief List of pair GUI elements (component name, component icone)
+
used for representation of the module in %IAPP component.
*/
typedef sequence<IAPP_Affich> 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 ; /*!<Indicates if it's a %component, a %service or a % pathPrefix.*/
} ;
- /*!
- This interface provides the common funcionality information of corresponding component.
+ /*! \brief This interface provides the common functionality information of corresponding component.
+
Information is loaded from specific xml files.
*/
interface Acomponent
{
- // GetInterfaceList : operation to get a list of the interfaces name of
- // a component
- /*!
- Gets the list of names of interfaces of the component
+ /*! \brief Get the list of interface names of the component
+
\return a list of interfaces of the component
*/
ListOfInterfaces GetInterfaceList() ;
- // GetInterface : operation to get one interface of a component
-
- /*!
- Gets a definite interface of the component
+ /*! \brief Get an interface of the component
+
\note <BR>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 <BR>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
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 <BR>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 <BR>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 <BR>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;
/*! \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();
} ;
};
#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.
*/
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.
*/
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.
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.
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);
};
# 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;
string ior; // client
};
+ //! a list of informations
typedef sequence<Infos> 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();
} ;
} ;
// 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<proc_info> 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<ContainerType> ListOfContainerType;
+ //! a list of computer names
typedef sequence<string> 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);
};
};
//
#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
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
/*! \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).
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
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
//
#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);
};
};
+
#include "SALOME_Component.idl"
#include "SALOME_MPIObject.idl"
+/*! \file SALOME_TestMPIComponent.idl \brief interface to test MPIObject and MPIContainer
+*/
+
module Engines
{
#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 ;
# ifndef __TESTNOTIF_IDL_
# define __TESTNOTIF_IDL_
+/*! \file TestNotif.idl \brief for testing notification service
+*/
+
+/* \brief interface to test notification service
+*/
interface Solver
{
boolean Connect();
#ifndef _SALOME_TYPEDATA_IDL_
#define _SALOME_TYPEDATA_IDL_
+/*! \file TypeData.idl \brief data definition for tests
+*/
+
module Engines
{
#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
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)
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",
"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",
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
pass
pass
# --
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
# --
pass
# --
''')
# --
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":
SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD")
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)
''')
# --
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)
# --
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)
''')
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})
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})
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)
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)
# --
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="-DOMPI_IGNORE_CXX_SEEK -DWITHOPENMPI $CPPFLAGS"
AC_MSG_RESULT(yes)
else
mpi_ok=no
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
}
//=============================================================================
-/*!
- * 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)
* \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)
*/
//=============================================================================
PortableServer::ObjectId * contId,
const char *instanceName,
const char *interfaceName,
- bool notif) :
+ bool notif,
+ bool regist ) :
_instanceName(instanceName),
_interfaceName(interfaceName),
_myConnexionToRegistry(0),
_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)
}
-//=============================================================================
-/*!
- * 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.
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 *) ; }
map<std::string, void *> 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
//=============================================================================
Engines_Container_i::Engines_Container_i () :
-_numInstance(0)
+_numInstance(0),_id(0),_NS(0)
{
}
bool activAndRegist,
bool isServantAloneInProcess
) :
-_numInstance(0),_isServantAloneInProcess(isServantAloneInProcess)
+ _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess),_id(0),_NS(0)
{
_pid = (long)getpid();
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)
*/
}
//=============================================================================
+//! Get container working directory
/*!
* CORBA attribute: Container working directory
*/
}
//=============================================================================
+//! Get container log file name
/*!
* CORBA attribute: Container log file name
*/
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)
*/
}
//=============================================================================
+//! Get container PID
/*!
* CORBA method: Get the PID (process identification) of the Container
*/
}
//=============================================================================
+//! Ping the servant to check it is still alive
/*!
* CORBA method: check if servant is still alive
*/
}
//=============================================================================
+//! Shutdown the container
/*!
* CORBA method, oneway: Server shutdown.
* - Container name removed from naming service,
//=============================================================================
+//! load a new component class
/*!
* CORBA method: load a new component class (Python or C++ implementation)
* \param componentName like COMPONENT
}
//=============================================================================
+//! Create a new component instance
/*!
* CORBA method: Creates a new servant instance of a component.
* The servant registers itself to naming service and Registry.
}
//=============================================================================
+//! 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,
}
//=============================================================================
+//! 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
//=============================================================================
+//! Remove the component instance from container
/*!
* CORBA method: Stops the component servant, and deletes all related objects
* \param component_i Component to be removed
}
//=============================================================================
+//! Unload component libraries from the container
/*!
* CORBA method: Discharges unused libraries from the container.
*/
}
//=============================================================================
+//! Kill the container
/*!
* CORBA method: Kill the container process with exit(0).
* To remove : never returns !
}
//=============================================================================
+//! 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
}
//=============================================================================
+//! Get a fileTransfer reference
/*!
* CORBA method:
* \return a reference to the fileTransfer object
}
+//! Create a Salome file
Engines::Salome_file_ptr
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.
* \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;
}
//=============================================================================
+//! Create a new component instance
/*!
* C++ method: create a servant instance of a component.
* \param genericRegisterName Name of the component instance to register
* \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)
{
}
//=============================================================================
+//! 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;
}
//=============================================================================
+//! Indicate if container is a python one
/*!
* Retrieves only with container naming convention if it is a python container
*/
# Module : SALOME
# $Header$
#
+## @package SALOME_ComponentPy
+# \brief python implementation of component interface for Kernel
+#
+#
+
import os
import sys
import time
_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
def getStudyId(self):
return self._studyId
+
+ #-------------------------------------------------------------------------
+
+ def hasObjectInfo(self):
+ return 0
+
+ #-------------------------------------------------------------------------
+
+ def getObjectInfo(self, studyId, entry):
+ return ""
+
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,
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();
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; }
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:
# Module : SALOME
# $Header$
#
+## @package SALOME_Container
+# \brief python implementation of container interface for Kernel
+#
+#
+
import os
import sys
import string
MESSAGE("constructor");
_NS = ns;
_ResManager = rm;
- _id=0;
PortableServer::POAManager_var pman = poa->the_POAManager();
_orb = CORBA::ORB::_duplicate(orb) ;
}
//=============================================================================
+//! 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
*/
}
//=============================================================================
-/*! 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)
*/
//=============================================================================
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 " <<
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 : " <<
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());
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{
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
*/
//=============================================================================
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 - "<<exc.what());
- }
+ {
+ INFOS("Caught std::exception - "<<exc.what());
+ }
catch(...)
- {
- INFOS("Caught unknown exception.");
- }
+ {
+ INFOS("Caught unknown exception.");
+ }
INFOS("[FindOrStartParallelContainer] node " << name << " deployed");
}
else {
INFOS("[FindOrStartParallelContainer] Currently parallel containers are launched only on the local host");
}
}
-}
-return ret;
+ }
+ return ret;
}
#else
//=============================================================================
#endif
//=============================================================================
+//! Give a suitable Container for a list of components with constraints and a policy
/*! CORBA Method:
- * Give 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
*/
//=============================================================================
Engines::Container_ptr
SALOME_ContainerManager::
GiveContainer(const Engines::MachineParameters& params,
- Engines::ResPolicy policy,
- const Engines::CompoList& componentList)
+ Engines::ResPolicy policy,
+ const Engines::CompoList& componentList)
{
char *valenv=getenv("SALOME_BATCH");
if(valenv)
return obj;
}
-//=============================================================================
-/*!
- * 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
- */
-//=============================================================================
-
-
-long SALOME_ContainerManager::GetIdForContainer(void)
-{
- _id++;
- return _id;
-}
-
void SALOME_ContainerManager::fillBatchLaunchedContainers()
{
_batchLaunchedContainers.clear();
string
SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer
(const string& machine,
- const Engines::MachineParameters& params, const long id,const std::string& container_exe)
+ const Engines::MachineParameters& params, const std::string& container_exe)
{
string command;
int nbproc;
- char idc[3*sizeof(long)];
if ( ! _isAppliSalomeDefined )
command = BuildTempFileToLaunchRemoteContainer(machine, params);
}
// "ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
- // SALOME_Container containerName &"
+ // SALOME_Container containerName &"
if (resInfo.Protocol == rsh)
command = "rsh ";
command += o.str();
#ifdef WITHLAM
command += "-x PATH,LD_LIBRARY_PATH,OMNIORB_CONFIG,SALOME_trace ";
+#elif defined(WITHOPENMPI)
+ if( getenv("OMPI_URI_FILE") == NULL )
+ command += "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace";
+ else{
+ command += "-x PATH -x LD_LIBRARY_PATH -x OMNIORB_CONFIG -x SALOME_trace -ompi-server file:";
+ command += getenv("OMPI_URI_FILE");
+ }
#endif
command += " SALOME_MPIContainer ";
}
command += " " +container_exe+ " ";
command += _NS->ContainerName(params);
- command += " -id ";
- sprintf(idc,"%ld",id);
- command += idc;
command += " -";
AddOmninamesParams(command);
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() );
#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
}
-
- /*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();
*/
//=============================================================================
-void SALOME_ContainerManager::RmTmpFile()
+void SALOME_ContainerManager::RmTmpFile(std::string& tmpFileName)
{
- int lenght = _TmpFileName.size();
+ int lenght = tmpFileName.size();
if ( lenght > 0)
{
#ifdef WIN32
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
//=============================================================================
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;
+}
//=============================================================================
//=============================================================================
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;
+}
//=============================================================================
/*!
//=============================================================================
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;
+}
//=============================================================================
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
}
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
// Nodes case
command = "mpirun -np " + string(buffer) + " ";
-// command += "gdb --args ";
+ // command += "gdb --args ";
command += real_exe_name;
command += " " + _NS->ContainerName(rtn);
command += " " + parallelLib;
}
}
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());
+ }
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()
_MpiStarted = true;
}
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;
+}
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,
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;
std::string BuildTemporaryFileName() const;
+ std::string GetMPIZeroNode(std::string machine);
+
// Parallel extension
std::string BuildCommandToLaunchLocalParallelContainer(const std::string& exe_name,
const Engines::MachineParameters& params,
void startMPI();
bool _MpiStarted;
- long _id;
CORBA::ORB_var _orb;
PortableServer::POA_var _poa;
#include "SALOME_FileTransfer_i.hxx"
#include "utilities.h"
+/*! \class fileTransfer_i
+ \brief A class to manage file transfer in SALOME
+
+*/
+
//=============================================================================
/*!
* Default constructor,
//=============================================================================
-/*!
- * 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.
}
//=============================================================================
-/*!
+/*! \brief close a file
+ *
* CORBA method: close the file associated to the fileId given at open.
* \param fileId got in return from open method
*/
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
*/
//=============================================================================
-#define FILEBLOCK_SIZE 256*1024
-
Engines::fileBlock* fileTransfer_i::getBlock(CORBA::Long fileId)
{
MESSAGE("fileTransfer_i::getBlock");
# include <windows.h>
#endif
+/*! \class Salome_file_i
+ * \brief A class to manage file transfer in %SALOME
+ *
+ */
+
//=============================================================================
/*!
/*! \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
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.
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.
#
# 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.
"""
char* name = makeName(hdf_group->GetName());
fprintf(fp, "%s %i\n", name, nbsons+nbAttr);
- delete name;
+ delete [] name;
for(unsigned j=0; j<nbAttr; j++) {
name = hdf_group->GetAttributeName(j);
HDFattribute *hdf_attribute = new HDFattribute(name, hdf_group);
- delete name;
+ delete [] name;
SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1);
hdf_attribute = 0;
}
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);
}
fprintf(fp, "\n");
- delete dim;
+ delete [] dim;
fprintf(fp, "%li %i:", size, order);
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);
}
else fprintf(fp," ");
}
- delete val;
+ delete [] val;
} else if(type == HDF_INT64) {
hdf_int64* val = new hdf_int64[size];
hdf_dataset->ReadFromDisk(val);
j = 0;
}
}
- delete val;
+ delete [] val;
} else if(type == HDF_INT32) {
hdf_int32* val = new hdf_int32[size];
hdf_dataset->ReadFromDisk(val);
j = 0;
}
}
- delete val;
+ delete [] val;
}
fprintf(fp, "\n");
{
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;
}
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];
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);
HDFgroup* hdf_group = new HDFgroup(new_name, father);
- delete new_name;
+ delete [] new_name;
hdf_group->CreateOnDisk();
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();
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; i<size; i++) {
read_float64(fp, &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
} else if(type == HDF_INT64) {
hdf_int64* val = new hdf_int64[size];
for(i=0; i<size; i++) {
fscanf(fp, " %li", &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
} else if(type == HDF_INT32) {
hdf_int32* val = new hdf_int32[size];
for(i=0; i<size; i++) {
fscanf(fp, " %i", &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
}
char token[MAX_ID_SIZE];
hdf_attribute->CreateOnDisk();
- delete new_name;
+ delete [] new_name;
if (type == HDF_STRING) {
char tmp;
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);
# 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 *
# Module : SALOME
# $Header$
#
+## @package salome_iapp
+# Module salome gives access to Salome GUI ressources (if GUI has been launched).
+#
+
import salome_ComponentGUI
#--------------------------------------------------------------------------
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 ""
using namespace std;
+/*! \class SALOME_FileTransferCORBA
+ \brief A class to manage file transfer in SALOME (CORBA context)
+
+*/
+
//=============================================================================
/*!
* Default constructor, not for use.
}
//=============================================================================
-/*!
- * 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
*/
//=============================================================================
}
//=============================================================================
-/*!
- * 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
}
//=============================================================================
-/*!
- * 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
{
}
+/*! \class SALOME_LifeCycleCORBA
+ \brief A class to manage life cycle of SALOME components.
+
+*/
+
//=============================================================================
/*!
* Constructor
}
//=============================================================================
-/*! 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,
}
//=============================================================================
-/*! 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
}
//=============================================================================
-/*! 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
}
//=============================================================================
-/*! 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)
}
//=============================================================================
-/*! 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
*/
}
//=============================================================================
-/*! Public -
+/*!
* Not so complex... useful ?
*/
//=============================================================================
//=============================================================================
-/*! 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
}
//=============================================================================
-/*! Public -
+/*!
* \return a number of processors not 0, only for MPI containers
*/
//=============================================================================
}
//=============================================================================
-/*! Public -
+/*! \brief Get the container manager
+ *
* \return the container Manager
*/
//=============================================================================
}
//=============================================================================
-/*! Public -
+/*! \brief Get the resources manager
+ *
* \return the container Manager
*/
//=============================================================================
}
//=============================================================================
-/*! 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
*/
//=============================================================================
}
//=============================================================================
-/*! Public -
- * shutdown omniNames and notifd
+/*! \brief shutdown omniNames and notifd
*/
//=============================================================================
}
//=============================================================================
-/*! 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
*/
//=============================================================================
}
//=============================================================================
-/*! 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.
*/
//=============================================================================
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,
// File : MPIContainer_i.cxx
// Module : SALOME
//
-#include <iostream.h>
+#include <iostream>
#include <dlfcn.h>
#include <stdio.h>
#include "Basics_Utils.hxx"
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;i<argc;i++)
- {
- if(strcmp(argv[i],"-id")==NULL)
- {
- id = atoi(argv[i+1]);
- continue;
- }
- }
- }
- SCRUTE(id);
+ CORBA::Object_var obj=_poa->id_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
for(ip= 1;ip<_nbproc;ip++)
(Engines::MPIContainer::_narrow((*_tior)[ip]))->Shutdown();
}
+
+ std::map<std::string, Engines::Component_var>::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);
}
// --- 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))
{
_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();
//--- 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
string aGenRegisterName = genericRegisterName;
string factory_name = aGenRegisterName + string("Engine_factory");
- SCRUTE(factory_name) ;
typedef PortableServer::ObjectId * (*MPIFACTORY_FUNCTION)
(int,int,
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
//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);
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();
}
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,
// File : MPIObject_i.cxx
// Module : SALOME
//
-#include <mpi.h>
#include "MPIObject_i.hxx"
#include "utilities.h"
using namespace std;
+#define TIMEOUT 5
MPIObject_i::MPIObject_i()
{
}
void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_ptr pobj,
- bool amiCont)
+ bool amiCont) throw(POException)
{
int err, ip, n;
char *ior;
}
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
}
+#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
+
#ifndef _SALOME_POBJECT_I_H_
#define _SALOME_POBJECT_I_H_
+#include <mpi.h>
+#include <string>
#include <SALOMEconfig.h>
#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
{
// 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
}
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();
INFOS("Caught unknown exception.");
}
- if(myContainer)
- delete myContainer;
+ MPI_Finalize();
END_OF("[" << numproc << "] " << argv[0]);
- // delete myThreadTrace;
- MPI_Finalize();
+ exit(0);
}
using namespace std;
+/*! \class SALOME_NamingService
+ \brief A class to manage the SALOME naming service
+
+*/
+
// ============================================================================
/*! \brief Default Constructor without ORB reference.
*
else
{
SCRUTE(name);
- if (Change_Directory(name.c_str()))
+ string basename = name;
+ if (Change_Directory(basename.c_str()))
{
vector<string> contList = list_subdirs();
if ( !CORBA::is_nil(obj) )
return obj;
+ else
+ Change_Directory(basename.c_str());
}
}
# Module : SALOME
# $Header$
#
+## @package SALOME_NamingServicePy
+# \brief Module to manage SALOME naming service from python
+#
+#
+
import sys
import time
from omniORB import CORBA
#=============================================================================
class SALOME_NamingServicePy_i(object):
+ """
+ A class to manage SALOME naming service from python code
+ """
_orb = None
_root_context=None
_current_context=None
#-------------------------------------------------------------------------
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
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)
#-------------------------------------------------------------------------
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)
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]
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
{
_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
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;
#
# 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.
"""
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') {
char* aNodeName = new char[127];
sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str());
string ret(aNodeName);
- delete aNodeName;
+ delete [] aNodeName;
return ret;
}
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;
}
#include "SALOMEDSImpl_ScalarVariable.hxx"
#include "SALOMEDSImpl_GenericVariable.hxx"
#include <iostream>
+#include <cstdlib>
+
using namespace std;
//============================================================================
_errorCode = "";
// True if is modified
- if (_doc->IsModified()) return true;
+ if (_doc && _doc->IsModified()) return true;
return false;
}
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;
}
} 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 {
anAttr->Load(current_string);
}
- delete(current_string);
+ delete [] (current_string);
hdf_dataset->CloseOnDisk();
}
new_dataset->CloseOnDisk();
new_dataset = 0; //will be deleted by hdf_sco_group destructor
order = atoi(currentVarIndex);
- delete currentVarIndex;
+ delete [] currentVarIndex;
}
else
order = iVar;
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<int,SALOMEDSImpl_GenericVariable*>(order,aVariable));
- delete currentVarValue;
+ delete [] currentVarValue;
}
}
#ifndef _SALOME_TESTCOMPONENT_I_HXX_
#define _SALOME_TESTCOMPONENT_I_HXX_
-#include <iostream.h>
+#include <iostream>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_TestMPIComponent)
#include "SALOME_Component_i.hxx"
# 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
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():
"""