Salome HOME
Merge from V6_main 13/12/2012 BR_KERNEL_REFACTORING V7_1_0_pre
authorvsr <vsr@opencascade.com>
Thu, 13 Dec 2012 13:15:16 +0000 (13:15 +0000)
committervsr <vsr@opencascade.com>
Thu, 13 Dec 2012 13:15:16 +0000 (13:15 +0000)
25 files changed:
Makefile.am
YACS_version.h.in [new file with mode: 0644]
clean_configure
configure.in.base
doc/Doxyfile
doc/Makefile.am
doc/calculator.rst
doc/conf.py.in
doc/principes.rst
doc/resource.rst [new file with mode: 0644]
doc/using.rst
src/bases/ThreadPT.cxx
src/bases/ThreadPT.hxx
src/engine/Executor.cxx
src/engine/Executor.hxx
src/engine/Runtime.cxx
src/engine/VisitorSaveState.cxx
src/runtime/Makefile.am
src/runtime/RuntimeSALOME.cxx
src/runtime/RuntimeSALOME.hxx
src/runtime/SalomeProc.cxx
src/salomegui/Yacsgui.cxx
src/salomegui/resources/SalomeApp.xml.in
src/yacsloader/LoadState.cxx
src/yacsorb/YACS.py

index 1504843f72bc608f83a9b688486877d822fbbf47..548aef3f1528e28ab894bdca6a4901b315bdc8ba 100644 (file)
@@ -44,3 +44,4 @@ EXTRA_DIST = Misc \
             configure.in.base \
             rfind
 
+salomeinclude_HEADERS = YACS_version.h
diff --git a/YACS_version.h.in b/YACS_version.h.in
new file mode 100644 (file)
index 0000000..665c6df
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 2006-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#if !defined(__YACS_VERSION_H__)
+#define __YACS_VERSION_H__
+
+/*
+  YACS_VERSION is (major << 16) + (minor << 8) + patch.
+*/
+
+#define YACS_VERSION_STR "@VERSION@"
+#define YACS_VERSION     @XVERSION@
+#define YACS_DEVELOPMENT @VERSION_DEV@
+
+#endif // __YACS_VERSION_H__
index aa98965bc11020b42ce09a993fe4884b10be0d0b..db4a6350100e74cf867cd6241cbcad8c045d5d62 100755 (executable)
@@ -32,7 +32,8 @@ TO_CLEAN=${TO_CLEAN}' yacs_config.h.in'
 
 rm -rf $TO_CLEAN > /dev/null
 
-find . -name "Makefile.in" -or -name "*~" -exec rm -f {} \;
+find . -name "Makefile.in" -exec rm -f {} \;
+find . -name "*~" -exec rm -f {} \;
 find . -name "semantic.cache" -exec rm {} \;
 find . -name "*.pyc" -exec rm {} \;
 rm -f src/salomegui_swig/doc.i
index aebf911563479386322fb2f23973c6bce88d1456..ffb518804d5ed937490ad7cf226ef2b393473256 100644 (file)
@@ -35,6 +35,8 @@ SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
 AC_SUBST(SHORT_VERSION)
 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
 AC_SUBST(XVERSION)
+VERSION_DEV=1
+AC_SUBST(VERSION_DEV)
 
 RELEASE=$VERSION
 AC_SUBST(RELEASE)
@@ -166,6 +168,7 @@ fi
 
 AC_OUTPUT([ \
   Makefile \
+  YACS_version.h \
   Demo/Makefile \
   doc/Makefile \
   idl/Makefile \
index 189f40e98b431417b1905962480d4837a1934c69..0dca9891cef1ad75a5f386b59fb5d6bb0cf3c4c5 100644 (file)
@@ -23,8 +23,8 @@
 #---------------------------------------------------------------------------
 #
 PROJECT_NAME           = YACS
-PROJECT_NUMBER         = 0.0.1
-OUTPUT_DIRECTORY       = /home/prascle/SALOME2/YACS/BR_V0_0_1_PR/doc/
+PROJECT_NUMBER         = 0.1
+OUTPUT_DIRECTORY       = .
 CREATE_SUBDIRS         = NO
 OUTPUT_LANGUAGE        = English
 USE_WINDOWS_ENCODING   = NO
@@ -44,7 +44,7 @@ ABBREVIATE_BRIEF       = "The $name class" \
 ALWAYS_DETAILED_SEC    = NO
 INLINE_INHERITED_MEMB  = NO
 FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = /home/prascle/SALOME2/YACS/BR_V0_0_1_PR
+STRIP_FROM_PATH        = 
 STRIP_FROM_INC_PATH    = 
 SHORT_NAMES            = NO
 JAVADOC_AUTOBRIEF      = NO
@@ -101,15 +101,26 @@ WARN_LOGFILE           =
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 INPUT                  =  \
-   /home/prascle/SALOME2/YACS/BR_V0_0_1_PR/YACS_SRC/src/bases \
-   /home/prascle/SALOME2/YACS/BR_V0_0_1_PR/YACS_SRC/src/data \
-   /home/prascle/SALOME2/YACS/BR_V0_0_1_PR/YACS_SRC/src/engine \
-   /home/prascle/SALOME2/YACS/BR_V0_0_1_PR/YACS_SRC/src/runtime
+   ../doc/ref      \
+   ../idl \
+   ../src/bases \
+   ../src/engine \
+   ../src/runtime \
+   ../src/yacsloader \
+   ../src/yacsorb \
+   ../src/hmi \
+   ../src/salomewrap \
+   ../src/genericgui \
+   ../src/salomegui \
+   ../src/salomewrap \
+   ../src/pyqt
+
 FILE_PATTERNS          = *.c \
                          *.cc \
                          *.cxx \
                          *.cpp \
                          *.c++ \
+                         *.py \
                          *.d \
                          *.java \
                          *.ii \
@@ -145,13 +156,13 @@ FILE_PATTERNS          = *.c \
                          *.M \
                          *.MM
 RECURSIVE              = YES
-EXCLUDE                = 
+EXCLUDE                = ../src/yacsloader/tools 
 EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       = */Test/*
 EXAMPLE_PATH           = 
 EXAMPLE_PATTERNS       = *
 EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = 
+IMAGE_PATH             = ../doc
 INPUT_FILTER           = 
 FILTER_PATTERNS        = 
 FILTER_SOURCE_FILES    = NO
@@ -159,7 +170,7 @@ FILTER_SOURCE_FILES    = NO
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 SOURCE_BROWSER         = YES
-INLINE_SOURCES         = NO
+INLINE_SOURCES         = YES
 STRIP_CODE_COMMENTS    = YES
 REFERENCED_BY_RELATION = YES
 REFERENCES_RELATION    = YES
@@ -167,17 +178,17 @@ VERBATIM_HEADERS       = YES
 #---------------------------------------------------------------------------
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 2
 IGNORE_PREFIX          = 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 GENERATE_HTML          = YES
-HTML_OUTPUT            = html
+HTML_OUTPUT            = htmldev
 HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
+HTML_HEADER            = ../doc/sources/header.html
+HTML_FOOTER            = ../doc/sources/footer.html
 HTML_STYLESHEET        = 
 HTML_ALIGN_MEMBERS     = YES
 GENERATE_HTMLHELP      = NO
@@ -264,13 +275,13 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool   
 #---------------------------------------------------------------------------
 CLASS_DIAGRAMS         = YES
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
+HIDE_UNDOC_RELATIONS   = NO
+HAVE_DOT               = YES
 CLASS_GRAPH            = YES
 COLLABORATION_GRAPH    = YES
 GROUP_GRAPHS           = YES
 UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
+TEMPLATE_RELATIONS     = YES
 INCLUDE_GRAPH          = YES
 INCLUDED_BY_GRAPH      = YES
 CALL_GRAPH             = NO
index ca3523a00de8aa601656450c074b6eda93120643..2487b52734fb18ae9ebb82a178dd1d98e3212be0 100644 (file)
@@ -39,7 +39,7 @@ DOXFILES= ref/bases.dox ref/engine.dox ref/hmi.dox ref/python.dox ref/runtime.do
 EXTRA_DIST= _static exemples $(DOXFILES)
 
 yacsdocdir=$(docdir)/gui/YACS
-yacsdevdocdir=$(docdir)/gui/YACS/dev
+yacsdevdocdir=$(docdir)/tui/YACS
 
 SPHINXOPTS      =
 SOURCEDIR       = $(srcdir)
@@ -116,7 +116,7 @@ optimizer.rst      \
 yacsgen.rst
 
 
-EXTRA_DIST+= $(RSTFILES) images                 
+EXTRA_DIST+= $(RSTFILES) images
 
 EXTRA_DIST+= \
 ref/classDiagram.png \
index 3126f3fad70b716004d6edb1e4cc8faacc57c04b..bebb02a4e8f11c7425633fd1f14e8bbf6d427cd7 100644 (file)
@@ -2,7 +2,7 @@
 .. _calculator:
 
 MEDCoupling Calculator Component
-=========================
+===================================
 This example is the following of the HELLO component. It's purpose is to show how to quickly create a new SALOME module, to introduce the use of MEDCoupling objects within  SALOME/Corba context, to demonstrate the mechanism of exceptions, and to introduce the use of  SALOME supervisor.
 
 The MED libraries
index 362c3d7e106e13f290d00cad3524247738b80fd9..b5a525db2c7b35eaaf53ea43cec2e8f1b2ff80bc 100644 (file)
@@ -41,7 +41,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = 'yacs'
-copyright = '2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE, C. Caremoli, N. Crouzet, P. Rascle, A. Ribes, E. Fayolle, M. Tajchman'
+copyright = '2007-2012 CEA/DEN, EDF R&D.'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
index 72e2cfafadc03325ddf41c7bfa88248098ba9960..4a1b70d9e1de870b1824723538e600f0856eb263 100644 (file)
@@ -291,7 +291,7 @@ Data nodes
 A Data node is used to define data (DataIn node) or to collect results (DataOut node) of a calculation scheme.
 
 DataIn node
-++++++++++++++++++
+...................
 A DataIn node has output data ports only that are used to define input data for the calculation scheme. These data have a name (the port name), a type (the port type) and an initial value.
 
 To create this type of node:
@@ -301,7 +301,7 @@ To create this type of node:
 - from python interface, see :ref:`py_datain`
 
 DataOut node
-++++++++++++++++++
+...................
 A DataOut node only has input data ports that are used to store output results from the calculation scheme.  These results have a name (the port name) and a type (the port type).  If the result is a file, a name can be given to the file into which the result file will be copied.
 
 All values of node results can be saved in a file at the end of the calculation.
@@ -317,7 +317,7 @@ Study nodes
 A Study node is used to relate the elements of a SALOME study to the data and results of a calculation scheme.
 
 StudyIn node
-++++++++++++++++++
+...................
 A StudyIn node has output data ports only. It is used to define data in the calculation scheme originating from a SALOME study. The associated study is given by its SALOME StudyID.
 
 A port corresponds to data stored in the associated study.  The data has a name (the port name), a type (the port type), and a reference that gives the entry into the study.  This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1).
@@ -329,7 +329,7 @@ To create this type of node:
 - from python interface, see :ref:`py_studyin`
 
 StudyOut node
-++++++++++++++++++
+...................
 A StudyOut node only has input data ports.  It is used to store results in a SALOME study.  The associated study is given by its SALOME StudyID.
 
 A port corresponds to a result to be stored in an associated study.  The result has a name (the port name), a type (the port type), and a reference that gives the entry into the study.  This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1).
@@ -408,7 +408,7 @@ of the input port.  There are three forms of compatibility:
  - type conversion (for example int -> double)
 
 Compatibility by conversion
-+++++++++++++++++++++++++++++++
+......................................
 Compatibility by conversion is applicable to basic types and to their derivatives (sequence, structure).  
 The following conversions are accepted:
 
@@ -424,7 +424,7 @@ sequence of doubles.  YACS controls the conversion.  This is also applicable to
 of structure, sequence of structure structures and types, etc.
 
 Compatibility by specialization
-+++++++++++++++++++++++++++++++
+......................................
 The compatibility rule is expressed differently for data (or dataflow) links and datastream links.
 
 For data (or dataflow) links, the type of output data port must be derived from (or identical to) the type of input 
@@ -613,6 +613,8 @@ nb_component_nodes    int          ??
 parallelLib           string       ??
 =================== ============= =============================================
 
+.. _catalogResources:
+
 The resources catalog
 ''''''''''''''''''''''''''''''''''''''''''
 The list of resources (machines and SALOME installations) known to SALOME is given in the resources catalog, the CatalogResources.xml file 
@@ -853,13 +855,6 @@ the trace in an another file by setting the DSC_TRACE environment variable to 1
 In this case the trace is written in a file with name : $SALOME_TMP_DIR/<container identification>.tce.
 
 
-Execution of concurrent branches
--------------------------------------
-YACS can execute calculation nodes of a scheme simultaneously.  
-However, simultaneous execution of a large number of nodes can saturate the system.  
-The maximum number of simultaneous executions can be controlled by fixing the maximum number of threads used with the 
-YACS_MAX_THREADS environment variable. By default, this value is equal to 50.
-
 Schema shutdown
 -----------------
 When YACS executes a schema, it starts new containers or uses existing containers. When the execution is finished, YACS can shutdown (or stop)
diff --git a/doc/resource.rst b/doc/resource.rst
new file mode 100644 (file)
index 0000000..8a40e38
--- /dev/null
@@ -0,0 +1,35 @@
+.. _resource:
+
+*******************************************************
+Concurrent branches and multiple machine execution
+*******************************************************
+
+.. _concurrent:
+
+Execution of concurrent branches
+===================================
+YACS can execute calculation nodes of a scheme simultaneously.  
+However, simultaneous execution of a large number of nodes can saturate the system.  
+The maximum number of simultaneous executions can be controlled by fixing the maximum number of threads used with the 
+YACS_MAX_THREADS environment variable. By default, this value is equal to 50.
+
+Each of these threads needs some memory (stack) for its execution. If too much stack is allocated for each thread,
+the system can run out of memory. If too little stack is allocated, you can experience some random crashes as the
+thread writes to memory outside its allocated stack. The stack size for YACS threads can be controlled with the
+YACS_THREADS_STACK_SIZE environment variable. It defines the size of the stack for each thread in bytes. The
+default value is 1048576 (1MB).
+
+
+.. _multi:
+
+Execution on multiple machines
+===================================
+YACS can execute the nodes of a scheme on several machines where SALOME is
+already installed.
+Each machine is a resource which has to be declared in the resources catalog
+(see :ref:`catalogResources`).
+
+Every node is executed by a container.
+Containers use a set of constraints and rules for choosing the resource where
+the node will be executed (see :ref:`containers`).
+
index 502b208baf207b295196a54bb95a69ec170eaa4a..ebcbeda32cf8d563747f663bb570789a6e857350 100644 (file)
@@ -58,4 +58,5 @@ generates the necessary SALOME embedment starting from a brief description of th
    python
    batch
    optimizer
+   resource
 
index 7e6133cc4fc4d446f7849af9f0d02c0bf9d4dd51..83a73c54e23ac49ee6a5d549993360d517909bbe 100644 (file)
 
 using namespace YACS::BASES;
 
-ThreadPT::ThreadPT(ThreadJob funcPtr, void *stack)
+ThreadPT::ThreadPT(ThreadJob funcPtr, void *stack, size_t stackSize)
 {
   int err;
   void **stackT=(void **) stack;
-  err=pthread_create(&_threadId,0,funcPtr,stackT);
+  pthread_attr_t attr;
+  pthread_attr_init(&attr);
+  if (stackSize > 0)
+    {
+      err = pthread_attr_setstacksize(&attr, stackSize);
+      if (err != 0) throw Exception("Error when setting thread stack size");
+    }
+  err = pthread_create(&_threadId, &attr, funcPtr, stackT);
+  pthread_attr_destroy(&attr);
   if(err!=0)throw Exception("Error in thread creation");
 }
 
index 97252651374b1e918e7c782c848d64b967d38fcb..c2d464aef8c79e1fcb84cb83a9d2833a815358b3 100644 (file)
@@ -33,7 +33,7 @@ namespace YACS
     public:
       typedef void *(*ThreadJob)(void*);
     public:
-      ThreadPT(ThreadJob funcPtr, void *stack);
+      ThreadPT(ThreadJob funcPtr, void *stack, size_t stackSize = 0);
       bool operator==(const ThreadPT& other);
       void join();
       static void detach();
index 615beff1fd5e17bcc3cd3482522e5f9d2ca67a3c..3f1e07d4a968c6071ff2f3efd89e0ce7ebc222b5 100644 (file)
@@ -70,6 +70,7 @@ using YACS::BASES::Semaphore;
 #include "YacsTrace.hxx"
 
 int Executor::_maxThreads(50);
+size_t Executor::_threadStackSize(1048576); // Default thread stack size is 1MB
 
 Executor::Executor():_nbOfConcurrentThreads(0), _semForMaxThreads(_maxThreads)
 {
@@ -1035,7 +1036,7 @@ void Executor::launchTask(Task *task)
     task->begin(); //change state to ACTIVATED
     _mutexForSchedulerUpdate.unlock();
   } // --- End of critical section
-  Thread(functionForTaskExecution,args);
+  Thread(functionForTaskExecution, args, _threadStackSize);
 }
 
 //! wait until a running task ends
index 83e63cc40e83b255926e3e8985ff95867a1c3be1..60410a58b090a0d0944dfe7bacbbacde5c96de0a 100644 (file)
@@ -113,6 +113,7 @@ namespace YACS
       void unsetStopOnError();
       void waitPause();
       static int _maxThreads;
+      static size_t _threadStackSize;
     protected:
       bool checkBreakPoints();
       void waitResume();
index 61a354fdd3af003a08761f2fe99c6cb6b502256e..1e27ac9c736dfef370646349d39b4589fb049c9a 100644 (file)
@@ -123,11 +123,21 @@ Runtime::Runtime()
 
   // Get max threads number
   char *maxThreadStr = getenv("YACS_MAX_THREADS");
-  if (!maxThreadStr) return;
-  int maxThreads = atoi(maxThreadStr);
-  DEBTRACE("maxThreads = " << maxThreads);
-  if (maxThreads <1) return;
-  Executor::_maxThreads = maxThreads;
+  if (maxThreadStr != NULL)
+    {
+      int maxThreads = atoi(maxThreadStr);
+      DEBTRACE("maxThreads = " << maxThreads);
+      if (maxThreads > 0) Executor::_maxThreads = maxThreads;
+    }
+
+  // Get thread stack size
+  char *threadStackSizeStr = getenv("YACS_THREADS_STACK_SIZE");
+  if (threadStackSizeStr != NULL)
+    {
+      size_t threadStackSize = strtoul(threadStackSizeStr, NULL, 0);
+      DEBTRACE("threadStackSize = " << threadStackSize);
+      if (threadStackSize > 0) Executor::_threadStackSize = threadStackSize;
+    }
 }
 
 void Runtime::removeRuntime()
index b4de6249aefa35ea3e934b5cdae12f6fb8ade815..7abdd7da855a10499f243571e446e79c64bd639d 100644 (file)
@@ -119,6 +119,26 @@ void VisitorSaveState::visitElementaryNode(ElementaryNode *node)
         }
       _out << "    </inputPort>" << endl;
     }
+
+  list<OutputPort *> setOfOutputPort = node->getSetOfOutputPort();
+  list<OutputPort *>::iterator oiter;
+  for(oiter = setOfOutputPort.begin(); oiter != setOfOutputPort.end(); oiter++)
+    {
+      _out << "    <outputPort>" << endl;
+      _out << "      <name>" << (*oiter)->getName() << "</name>" << endl;
+      try
+        {
+          _out << "      ";
+          _out << (*oiter)->dump();
+        }
+      catch (YACS::Exception &e)
+        {
+          DEBTRACE("caught YACS:Exception: " << e.what());
+          _out << "<value><error><![CDATA[" << e.what() << "]]></error></value>" << endl;
+        }
+      _out << "    </outputPort>" << endl;
+    }
+
   _out << "  </node>" << endl;
 }
 
index ef9450e2749d85c785ea856c899daef54373f887..62ab7db6fdb501af92c2222d18a93b8539a3277f 100644 (file)
@@ -127,6 +127,7 @@ AM_CXXFLAGS = \
        -I$(srcdir)/../bases \
        -I$(srcdir)/../engine \
        -I../../idl \
+       -I../.. \
        $(LIBXML_INCLUDES)
 
 include $(top_srcdir)/adm/unix/make_end.am
index 4cc1b231fe5aba0e86a286c5fab28d4c0312c81c..cacfd292e89f21e3d6a0e9192bf299a673f674f2 100644 (file)
@@ -28,6 +28,7 @@
 #endif
 
 #include "yacsconfig.h"
+#include "YACS_version.h"
 #include "RuntimeSALOME.hxx"
 #include "SALOMEDispatcher.hxx"
 #include "Proc.hxx"
@@ -401,6 +402,15 @@ void RuntimeSALOME::fini()
     }
 }
 
+std::string RuntimeSALOME::getVersion() const
+{
+#if YACS_DEVELOPMENT
+  return CORBA::string_dup(YACS_VERSION_STR"dev");
+#else
+  return CORBA::string_dup(YACS_VERSION_STR);
+#endif
+}
+
 Proc* RuntimeSALOME::createProc(const std::string& name)
 {
   return new SalomeProc(name);
index 472d429ab81358e725ba8e1896c93614744dea65..04c0c31e7f3aad76b1f02679b519ab33c834765f 100644 (file)
@@ -89,6 +89,8 @@ namespace YACS
       static void setRuntime(long flags = UsePython+UseCorba+UseXml+UseCpp+UseSalome); // singleton creation
       
       friend RuntimeSALOME* getSALOMERuntime();
+      
+      virtual std::string getVersion() const;
 
       virtual void init(long flags);
       virtual void fini();
index 17af4d3604f75600a600dea1db1320ab77604fe6..6fe9303713c940008087c958579f4cac3e07e81e 100644 (file)
@@ -33,7 +33,7 @@ SalomeProc::SalomeProc(const std::string& name):Proc(name)
 {
   // create default container with some default properties
   Container* cont=createContainer("DefaultContainer");
-  cont->setProperty("name",Kernel_Utils::GetHostname());
+  cont->setProperty("name", "localhost");
   cont->setProperty("container_name","FactoryServer");
   cont->decrRef();
 }
index f9ee254e7691f065f0893bf9151a203b906b9c7f..3d460cb0f1d3e93e742bdf049af470e5434134c4 100644 (file)
@@ -29,7 +29,7 @@
 #include <SUIT_ViewManager.h>
 #include <SUIT_ViewWindow.h>
 #include <SalomeApp_Application.h>
-#include <SalomeApp_Engine_i.hxx>
+#include <SalomeApp_Engine_i.h>
 #include <QxScene_ViewManager.h>
 #include <QxScene_ViewModel.h>
 #include <QxScene_ViewWindow.h>
index f0201f272320f18d93f23763b25a10c2b93bd3f3..848f31132dfcebefb86007e530254cd4673dc9a2 100644 (file)
@@ -33,6 +33,7 @@
   <section name="yacs_help">
     <parameter name="sub_menu"     value="%1 module"/>
     <parameter name="User's Guide" value="%YACS_ROOT_DIR%/share/doc/salome/gui/YACS/index.html"/>
+    <parameter name="Developer's Guide" value="%YACS_ROOT_DIR%/share/doc/salome/tui/YACS/index.html"/>
   </section>
   <section name="YACS" >
     <!-- Module preferences -->
index bb57af20fdbf662dfe04db10c7408c1d4248569c..d3f340977ada6c78594e9e0791101fa28a610b96 100644 (file)
@@ -181,6 +181,52 @@ void graphParser::onEnd   (const XML_Char* name)
 
 // ----------------------------------------------------------------------------
 
+class outputParser: public stateParser
+{
+public:
+  virtual void init(const xmlChar** p, xmlParserBase* father=0)
+  {
+    //DEBTRACE("outputParser::init()");
+    _state = XMLNOCONTEXT;
+    _father = father;
+    YASSERT( dynamic_cast<nodeParser*> (father));
+    _stackState.push(_state);
+    if (p) getAttributes(p);
+  }
+  virtual void onStart (const XML_Char* elem, const xmlChar** p)
+  {
+    //DEBTRACE("outputParser::onStart" << elem);
+    string element(elem);
+    stateParser *parser = 0;
+    if      (element == "name")      parser = new attrParser();
+    else if (element == "value")     parser = new valueParser();
+    else
+    { 
+      _what = "expected name or value, got <" + element + ">";
+      _state = XMLFATALERROR;
+      stopParse(_what);
+    }
+    if (parser)
+    {
+      _stackParser.push(parser);
+      XML_SetUserData(_xmlParser, parser);
+      parser->init(p, this);
+    }
+  }
+  virtual void onEnd   (const XML_Char* name)
+  {
+    //DEBTRACE("outputParser::onEnd" << elem);
+    //DEBTRACE("portName: " << _mapAttrib["name"] << "value: " << _data );
+    stateParser::onEnd(name);
+  }
+  virtual void addData(std::string /*value*/)
+  {
+    //DEBTRACE("outputParser::addData" << elem);
+  }
+};
+
+// ----------------------------------------------------------------------------
+
 void nodeParser::init(const xmlChar** p, xmlParserBase* father)
 {
   DEBTRACE("nodeParser::init()");
@@ -202,7 +248,7 @@ void nodeParser::onStart (const XML_Char* elem, const xmlChar** p)
   else if (element == "nsteps")    parser = new attrParser();
   else if (element == "nbdone")    parser = new attrParser();
   else if (element == "condition") parser = new attrParser();
-  else if (element == "inputPort") parser = new portParser();
+  else if (element == "outputPort") parser = new outputParser();
   else
     { 
       _what = "expected name, state or inputPort, got <" + element + ">";
index 36ca3a2900a2d43e8cf03a8f8a9a0cb05be3eee4..1261558c2f2408dd5f9bce1a68d32e55df9b79a9 100644 (file)
@@ -259,6 +259,18 @@ class YACS(YACS_ORB__POA.YACS_Gen,
         except :
           pass
 
+    """
+    Get version information.
+    """
+    def getVersion( self ):
+        try:
+            rt = SALOMERuntime.getSALOMERuntime()
+            version = rt.getVersion()
+        except:
+            version = ""
+            pass
+        return version
+
     def LoadProc(self,xmlFile):
         """
         load an XML graph in a YACS::ENGINE::proc, create a CORBA servant