Salome HOME
Merge 'master' branch into 'V9_dev' branch
authorrnv <rnv@opencascade.com>
Thu, 18 Jan 2018 17:26:12 +0000 (20:26 +0300)
committerrnv <rnv@opencascade.com>
Thu, 18 Jan 2018 17:26:12 +0000 (20:26 +0300)
59 files changed:
ChangeLog
bin/salomeContext.py
doc/salome/examples/example19
doc/salome/install.dox
doc/salome/kernel_services.dox
doc/salome/python_doc_compl.dox
doc/salome/running_salome.dox
doc/salome/unittests.dox
idl/DSC_Engines.idl
idl/SALOMEDS_Attributes.idl
idl/SALOME_Component.idl
idl/SALOME_Launcher.idl
idl/SALOME_SDS.idl
salome_adm/unix/DEPRECATED/Doxyfile
salome_adm/unix/config_files/DEPRECATED/config.guess
salome_adm/unix/config_files/DEPRECATED/ltmain.sh
src/Basics/BasicsGenericDestructor.hxx
src/DF/testDF.cxx
src/DSC/DSC_User/Superv_Component_i.hxx
src/HDFPersist/HDFascii.cc
src/KERNEL_PY/__init__.py
src/KERNEL_PY/kernel/CMakeLists.txt
src/KERNEL_PY/kernel/enumerate.py
src/KERNEL_PY/kernel/services.py
src/KERNEL_PY/salome_iapp.py
src/KERNEL_PY/salome_test.py
src/Launcher/SALOME_LauncherServer.cxx
src/Launcher/Test/test_launcher.py
src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx
src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx
src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake
src/MPIContainer/MPIObject_i.cxx
src/MPIContainer/MPIObject_i.hxx
src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/NamingService/SALOME_NamingService.cxx
src/NamingService/Test/NamingServiceTest.cxx
src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
src/ResourcesManager/ResourcesManager.cxx
src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx
src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx
src/SALOMEDS/SALOMEDS_StudyBuilder.cxx
src/SALOMEDS/Test/TestSALOMEDS.cxx
src/SALOMELocalTrace/FileTraceCollector.cxx
src/SALOMELocalTrace/LocalTraceCollector.cxx
src/SALOMESDS/CMakeLists.txt
src/SALOMESDS/SALOMESDS_DataScopeServer.cxx
src/SALOMESDS/SALOMESDS_DataScopeServer.hxx
src/SALOMESDS/SALOMESDS_DataServerManager.cxx
src/SALOMESDS/SALOMESDS_DataServerManager.hxx
src/SALOMESDS/SALOMESDS_KeyWaiter.cxx
src/SALOMESDS/SALOMESDS_PickelizedPyObjRdExtServer.cxx
src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx
src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx [new file with mode: 0644]
src/SALOMESDS/SALOMESDS_RequestSwitcher.hxx [new file with mode: 0644]
src/SALOMESDS/TestSalomeSDS.py
src/SALOMETraceCollector/SALOMETraceCollector.cxx
src/Utils/Test/UtilsTest.cxx
src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx

index c2524f47ef1d1c450b2cbba4e21ab30caa90390e..a768ca08232a92c8114f79e2390555c22cb20efc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * src/ResourcesManager/: ResourcesManager.cxx:
 
-       Remove debug output from terminal. Avoid using "utilities.h" in standalone (non-CORBA) classes (requested by B.Sécher via mail)
+       Remove debug output from terminal. Avoid using "utilities.h" in standalone (non-CORBA) classes (requested by B.Scher via mail)
 
 2008-09-08 08:35  vsr
 
        * src/Launcher/: Launcher.cxx, SALOME_LauncherServer.cxx:
 
-       Remove debug output from terminal. Avoid using "utilities.h" in standalone (non-CORBA) classes (requested by B.Sécher via mail)
+       Remove debug output from terminal. Avoid using "utilities.h" in standalone (non-CORBA) classes (requested by B.Scher via mail)
 
 2008-09-05 13:27  vsr
 
 
        * idl/Makefile.am, salome_adm/Makefile.am:
 
-       Gestion des tailles illimités des noms de fichiers (tar au cours du make dist)
+       Gestion des tailles illimits des noms de fichiers (tar au cours du make dist)
 
 2007-03-22 16:36  fayolle
 
        * idl/: Calcium_Ports.idl, SALOME_Ports.idl:
 
-       Ajout des types CORBA/CALCIUM pour la gestion des propriétées
+       Ajout des types CORBA/CALCIUM pour la gestion des propri�t�es
 
 2007-03-22 15:25  fayolle
 
        * configure.ac:
 
-       Gestion de le taille de nom fichiers illimité pour la commande tar (make dist)
+       Gestion de le taille de nom fichiers illimit pour la commande tar (make dist)
        Modification du nom du maintainer de paquet.
 
 2007-03-22 15:24  fayolle
          Datastream/Calcium/test_DataIdContainer.cxx:
 
        Ajout des properties
-       Création de la classe calcium_provides_port (pour appeler directement les
-       méthodes de paramétrage des ports calcium)
+       Cration de la classe calcium_provides_port (pour appeler directement les
+       m�thodes de param�trage des ports calcium)
 
 2007-03-16 10:37  abd
 
          salome_adm/unix/DEPRECATED/make_module.in,
          salome_adm/unix/DEPRECATED/make_omniorb.in:
 
-       Modifications pour gestion des fichiers obsolètes de salome_adm
+       Modifications pour gestion des fichiers obsoltes de salome_adm
 
 2006-02-06 15:33  srn
 
          src/TestMPIContainer/Makefile.in, src/UnitTests/Makefile.am,
          src/UnitTests/Makefile.in:
 
-       - Traitement des Makefile.in modifiés depuis V310a2,
-       - Prise en compte des répertoires de test + nouveaux répertoires
+       - Traitement des Makefile.in modifis depuis V310a2,
+       - Prise en compte des r�pertoires de test + nouveaux r�pertoires
 
 2006-01-31 13:52  jfa
 
 
        * src/Basics/Makefile.am:
 
-       Suppression du subdir Test car il est prévu par le Makefile.am principal (src).
+       Suppression du subdir Test car il est prvu par le Makefile.am principal (src).
 
 2006-01-26 08:10  srn
 
          salome_adm/unix/config_files/check_openpbs.m4,
          salome_adm/unix/config_files/check_local.m4:
 
-       Intégration bibliothèque Batch version 0.3.0 (avec gestionnaire local)
+       Int�gration biblioth�que Batch version 0.3.0 (avec gestionnaire local)
        Finalisation de la partie swig.
 
 2005-12-14 15:42  jfa
          src/SALOMELocalTrace/Test/Makefile.in,
          src/SALOMETraceCollector/Makefile.am:
 
-       Complétude passage automake:
+       Compltude passage automake:
        - bin
        - resources
        - idl
        * bin/: Makefile.am, runIDLparser.in:
 
        Gestion par Makefile.am
-       runIDLParser est ramené dans le répertoire courant.
+       runIDLParser est ramen� dans le r�pertoire courant.
 
 2005-12-07 14:10  jfa
 
          src/TOOLSDS/Makefile.in, src/TestContainer/Makefile.am,
          src/TestContainer/Makefile.in:
 
-       Première version avec la totalité des packages sources en automake.
-       Les répertoires tests ne sont pas encore traités.
-       La compilation et installation sont menées à termes, mais le produit n'est pas validé par la mise en fonctionnement avec le GUI et les autres modules (prochaine étape).
+       Premi�re version avec la totalit� des packages sources en automake.
+       Les r�pertoires tests ne sont pas encore trait�s.
+       La compilation et installation sont men�es � termes, mais le produit n'est pas valid� par la mise en fonctionnement avec le GUI et les autres modules (prochaine �tape).
 
 2005-12-02 14:07  jfa
 
          src/SALOMETraceCollector/Makefile.in, src/Utils/Makefile.am,
          src/Utils/Makefile.in:
 
-       Version avec Traitement d'une interface swig (NOTIFICATION_SWIG). Le KERNEL est transformé jusque Container (reste TestContainer LifeCycleCORBA, ...).
+       Version avec Traitement d'une interface swig (NOTIFICATION_SWIG). Le KERNEL est transform jusque Container (reste TestContainer LifeCycleCORBA, ...).
 
 2005-12-01 10:19  jfa
 
          src/SALOMELocalTrace/Makefile.am,
          src/SALOMELocalTrace/Makefile.in:
 
-       Adaptation pour le passage en automake. Seuls les 5 premiers paquets des sources sont passés et le répertoire idl
+       Adaptation pour le passage en automake. Seuls les 5 premiers paquets des sources sont pass�s et le r�pertoire idl
 
 2005-11-18 19:40  boulant
 
          salome_adm/unix/config_files/DEPRECATED/check_java.m4,
          salome_adm/unix/config_files/DEPRECATED/check_mico.m4:
 
-       Epuration des éléments obsolètes après analyse de la procédure de construction.
+       Epuration des �l�ments obsol�tes apr�s analyse de la proc�dure de construction.
 
 2005-11-18 19:35  boulant
 
          salome_adm/unix/config_files/check_htmlgen.m4,
          salome_adm/unix/config_files/check_mpi.m4:
 
-       Epuration des éléments obsolètes après analyse de la procédure de construction.
+       Epuration des �l�ments obsol�tes apr�s analyse de la proc�dure de construction.
 
 2005-11-18 12:21  mkr
 
          Utils_DESTRUCTEUR_GENERIQUE.hxx, Utils_ORB_INIT.cxx,
          Utils_SINGLETON.hxx:
 
-       PR: remove explicit calls to Trace mecanism to avoid problems when trace classes are deleted early (temporary fix)
+       PR: remove explicit calls to Trace mechanism to avoid problems when trace classes are deleted early (temporary fix)
 
 2005-10-03 11:47  prascle
 
 
        Fix on previous integration, that was associated with CCRT_Port_V220.
        The regression was caused by customisation of compilation between PCLINUX and OSF1 platforms for KERNEL/MEDWrapper library.
-       By the fix we define corresponded C++ preprocessor variable (MACHINE) at configuration step of KERNEL module in SALOMEconfig.h header file. So, every client of KERNEL module will automaticaly be customizing by including of this header file.
+       By the fix we define corresponded C++ preprocessor variable (MACHINE) at configuration step of KERNEL module in SALOMEconfig.h header file. So, every client of KERNEL module will automatically be customizing by including of this header file.
 
 2005-03-17 12:57  apo
 
 
        Fix on previous integration, that was associated with CCRT_Port_V220.
        The regression was caused by customisation of compilation between PCLINUX and OSF1 platforms for KERNEL/MEDWrapper library.
-       By the fix we define corresponded C++ preprocessor variable (MACHINE) at configuration step of KERNEL module in SALOMEconfig.h header file. So, every client of KERNEL module will automaticaly be customizing by including of this header file.
+       By the fix we define corresponded C++ preprocessor variable (MACHINE) at configuration step of KERNEL module in SALOMEconfig.h header file. So, every client of KERNEL module will automatically be customizing by including of this header file.
 
 2005-03-17 09:59  prascle
 
 
        * salome_adm/unix/config_files/: ac_cxx_warnings.m4, production.m4:
 
-       rationalisation des contrôles des options du compilateurs c++
+       rationalisation des contrles des options du compilateurs c++
 
 2004-11-12 14:05  prascle
 
 
        * src/Makefile.in:
 
-       Bibliothèque de classes Batch (new)
+       Bibliothque de classes Batch (new)
 
 2004-10-07 09:21  dutka
 
        * salome_adm/unix/: config_files/check_openpbs.m4,
          config_files/check_boost.m4, make_commence.in:
 
-       Bibliothèque de classes Batch (new)
+       Bibliothque de classes Batch (new)
 
 2004-10-07 09:17  dutka
 
 
        * build_configure, salome_adm/unix/make_commence.in:
 
-       Modification des options de l'appel à la commande aclocal.
+       Modification des options de l'appel  la commande aclocal.
 
 2003-05-16 12:27  secher
 
index aa8ce10a654fc742b830fca5b18045e52178084f..8e40e820ae49c19febfd0cd198d75ab059b0fd3a 100644 (file)
@@ -64,7 +64,7 @@ Command options:
 --config=<file,folder,...>
 ==========================
     Initialize SALOME context from a list of context files and/or a list
-    of folders containing context files. The list is comma-separated, whithout
+    of folders containing context files. The list is comma-separated, without
     any blank characters.
 '''
 
index afa10acb7b2898cb7bb2c7de04af2e2ef4ebc125..45785ad4cf1edbfa643ffe4493a0e459c06d4731 100644 (file)
@@ -304,7 +304,7 @@ ior = batchmode_geompy.orb.object_to_string(myGraph.G)
 addStudy(ior)
 
 GraphName = myGraph.Name()
-print("Befor save ",)
+print("Before save ",)
 nodes = myGraph.Nodes()
 length_bs = len(nodes)
 print("ListOfNodes length = ", length_bs)
@@ -427,7 +427,7 @@ if res :
         length_as= len(ListOfNodes)
         print("ListOfNodes length = ", length_as)
         if length_as != length_bs:
-                raise RuntimeErrror, "defferent length of nodes after study open"
+                raise RuntimeErrror, "different length of nodes after study open"
 #aChildIterator.Next()
 
 Names = []
@@ -436,7 +436,7 @@ for node in ListOfNodes:
 names.sort()
 Names.sort()
 if names != Names :
-        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
+        raise RuntimeError, "List of dataflow nodes after save differs from one before save operation"
 
 #==================================================
 #4. Save
@@ -527,7 +527,7 @@ if res :
         length_as= len(ListOfNodes)
         print("ListOfNodes length = ", length_as)
         if length_as != length_bs:
-                raise RuntimeErrror, "defferent length of nodes after study open"
+                raise RuntimeErrror, "different length of nodes after study open"
 #aChildIterator.Next()
 
 Names = []
@@ -536,5 +536,5 @@ for node in ListOfNodes:
 names.sort()
 Names.sort()
 if names != Names :
-        raise RuntimeError, "List of dataflow nodes after save differs from one befor save operation"
+        raise RuntimeError, "List of dataflow nodes after save differs from one before save operation"
 
index f145e4aa7b60ea21f306318d7d195245eb12913f..0b2980769d717dd2dc961fcde3b2ba9a278fcb8f 100644 (file)
@@ -88,11 +88,11 @@ which are not Debian packages):
 - SWIG-1.3.24          SWIG library
 - boost-1_32_0         C++ library (only include templates are used)
 - hdf5-1.6.2           Files Database library
-- med-2.2.2            MED Data Format support for file records 
+- med-2.2.2            MED Data Format support for file records
 - omniORB-4.0.5                ORB used in %SALOME
 - qt-x11-free-3.3.3    Qt library
 - qwt-4.2              Graph components for Qt
-- sip4-4.1.1           langage binding software 
+- sip4-4.1.1           language binding software
 
 And, in order to build the documentation:
 
@@ -100,7 +100,7 @@ And, in order to build the documentation:
 - graphviz-2.2.1
 
 
-Additional software may be installed for optional features: 
+Additional software may be installed for optional features:
 
 - netgen4.3 + patch
 - tix8.1.4
@@ -191,7 +191,7 @@ $ cd <kernel_build>
 $ cmake -DCMAKE_BUILD_TYPE=<Mode> -DCMAKE_INSTALL_PREFIX=<kernel_install> ../<kernel_src>
   \endcode
 
-  Where <Mode> is build mode(Release or Debug), <kernel_install> 
+  Where <Mode> is build mode(Release or Debug), <kernel_install>
   is a destination folder to install KERNEL module of SALOME.
   Note that <kernel_install> must be an absolute path.
 
@@ -201,7 +201,7 @@ $ cmake -DCMAKE_BUILD_TYPE=<Mode> -DCMAKE_INSTALL_PREFIX=<kernel_install> ../<ke
   If a software get a status "not found", then it is not "seen" in the system:
 
 - the software is not installed, or
-- the shell environment is not set correctly. 
+- the shell environment is not set correctly.
 
 <b>STEP 3 :</b>
   Building the binary files
@@ -295,7 +295,7 @@ For convenience or customization, we suggest the following organisation:
 
 - install the %SALOME components in a sub-directory "SALOME2"
 
-- make personnal copies of the files prerequis.sh and %runSalome in
+- make personal copies of the files prerequis.sh and %runSalome in
   <salomeroot>:
   \code
 $ cp <kernel_src>/prerequis.sh <rundir>/.
index 84d9c08a72572ffc737917e64f3b1bf7dafb3581..19b96a54d786b0151438b918707bd633341ba39c 100644 (file)
@@ -2,7 +2,7 @@
   \page KERNEL_Services KERNEL Services for end user (Python interface)
 
 In a %SALOME application, distributed components, servers and clients use
-the CORBA middleware for comunication. CORBA interfaces are defined via idl
+the CORBA middleware for communication. CORBA interfaces are defined via idl
 files. All the different CORBA interfaces are available for users in Python,
 see CORBA interfaces below.
 
index adad79d25c6c3cf6565274dab10b116f575fd298..fa29dcab3e8c8eda06a05059001002fb2bdaa383 100644 (file)
@@ -40,7 +40,7 @@ named salome, and then sub-packages could be created for each
 The motivations of this objective are twice:
 
 - Definitively prevent the risk of naming conflict between python
-  modules coming from different %SALOME modules. Today, the developper
+  modules coming from different %SALOME modules. Today, the developer
   of a module has to take care of the names used in other modules to
   choose a name.
 - Integrate in %SALOME some python modules initially developed in the
index 366bec62dff76ec1e3fc8dced6704ba743b7f2f0..109563c15132d61d23e3735fe0fba04c3f2689d3 100644 (file)
@@ -39,7 +39,7 @@ Print version of %SALOME platform.
 
 - \c --gui or \c -g
 
-Launch %SALOME sesssion in GUI mode (with GUI desktop).
+Launch %SALOME session in GUI mode (with GUI desktop).
 
 - \c --terminal or \c -t
 
index 1011835692d6604d7f98c223c289668be8408dbb..5ff444c09cd6d41c907a9e18357d94ad2f7a39a9 100644 (file)
@@ -22,7 +22,7 @@ the unit tests.
 - KERNEL_SRC/doc :\n
    Kit for KERNEL end user documentation production:
    public interfaces, Python, CORBA.
-   Integrator and Developper documentation.
+   Integrator and Developer documentation.
 
 - KERNEL_SRC/idl :\n
    All CORBA interfaces from KERNEL are regrouped here.
index 0e2431c0a8ac2de85240ffc5ae1280fa1c62ec75..a06f63fc7bab6948a3dcb4efc6b3256736660cd7 100644 (file)
@@ -157,7 +157,7 @@ module Engines {
     /*! 
       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
+      If it's the framework that wants the port, the reference has to be given
       even if the port is not connected (boolean connection_error to false).
       Contrary, if it's the component that wants the port, the port is given
       in most of cases only if it is connected (boolean connection_error to true). 
@@ -318,7 +318,7 @@ module Engines {
     //!  Release a connection that has been previously created by the ConnectionManager.
     /*!
 
-      \param id The id of the connection previously gived by the connect operation
+      \param id The id of the connection previously given by the connect operation
       of the ConnectionManager.
       \param message state associated with the disconnection.
 
index 5e19155725bf55e26f8706478cc9ea33e1c2964d..3af0f0fcbbc1d82bab8ae9a6f4b762b7b6cd1498 100644 (file)
@@ -503,13 +503,13 @@ module SALOMEDS
     /*!
       \brief Test the value for the specified flag or set of flags.
       \param flags flag or set of flags being tested.
-      \return \c true if all bits correspoding to the \a flags are currently set or \c false otherwise
+      \return \c true if all bits corresponding to the \a flags are currently set or \c false otherwise
     */
     boolean Get(in long flags);
     /*!
       \brief Set/clear specific flag or set of flags.
       \param flags flag or set of flags being set / cleared
-      \param value \c true if all bits correspoding to the \a flags should be set
+      \param value \c true if all bits corresponding to the \a flags should be set
               or \c false if flag(s) should be cleared
     */
     void    Set(in long flags, in boolean value);
@@ -625,7 +625,7 @@ module SALOMEDS
   /*!
     \brief Icon attribute.
     
-    This attribute is used to specifiy the name (file name) of an icon which
+    This attribute is used to specify the name (file name) of an icon which
     should be drawn in the Object browser when rendering an item.
 
     <em>See \ref example14 for an example of this attribute usage in batchmode of %SALOME application.</em>
@@ -659,8 +659,8 @@ module SALOMEDS
     By specifying the tree node attributes for the SObjects it is possible to
     create internal auxiliary %object tree with its own structure and identifier.
 
-    Since each such tree is specfied by the unique identifier, it is possible
-    to create as many trees as it is required.
+    Since each such tree is specified by the unique identifier, it is possible
+    to create as many trees as required.
     
     <em>See \ref example18 for an example of usage of this attribute in batchmode of %SALOME application.</em>
   */
index 805e09d260fca2c6c717d47729053b485534c574..8c02315aab0b892f1e7ca0278b363b4bc366404d 100644 (file)
@@ -709,7 +709,7 @@ module Engines
      with createFileRef(in string origFileName) method.
      The fileRef object maintains a list of (machine,filename) for copies.
      If a copy exists on myMachine, getRef(myMachine) returns the file name
-     of the copy on myMachine, else returns empy string.
+     of the copy on myMachine, else returns empty string.
      If there is no copy on myMachine, method getFileTransfer() from container
      factoryServer on refMachine provides a fileTransfer object dedicated to
      CORBA file copy.
index d68a7cea743764f8a7a5190a606f616b74116d3e..a114a998251ec9a00e9dcc8a5be25a3d8fb60af8 100644 (file)
@@ -72,7 +72,7 @@ struct JobParameters
   string env_file; 
 
   //! List of local data files to be copied to #work_directory.
-  /*! #job_file and #env_file are automaticaly copied, without adding them
+  /*! #job_file and #env_file are automatically copied, without adding them
       to this list. If basenames are specified, then the files are supposed
       to be located in #local_directory.
   */
index 51048ba1a515716ec070f6a07c080c2b8e9ff838..1b28d56105cc49d2abef3bd74b8e38e1d1696e8c 100644 (file)
@@ -71,12 +71,27 @@ module SALOME
   {
     void shutdown();
   };
-  
-  interface RequestSwitcher
+
+  interface RequestSwitcherBase
   {
     void holdRequests();
     void activeRequests();
   };
+  
+  interface RequestSwitcher : RequestSwitcherBase
+  {
+    StringVec listVars();
+    ByteVec fetchSerializedContent(in string varName) raises (SALOME::SALOME_Exception);
+    void fetchAndGetAccessOfVar(in string varName, out string access, out ByteVec data) raises (SALOME::SALOME_Exception);
+  };
+
+  interface DataScopeServerTransaction;
+  
+  interface RequestSwitcherDSM : RequestSwitcherBase
+  {
+    StringVec listScopes();
+    DataScopeServerTransaction giveADataScopeTransactionCalled(in string scopeName, out boolean isCreated) raises (SALOME::SALOME_Exception);
+  };
 
   interface DataScopeServerBase
   {
@@ -88,7 +103,6 @@ module SALOME
     boolean shutdownIfNotHostedByDSM(out DataScopeKiller killer) raises (SALOME::SALOME_Exception);
     ByteVec fetchSerializedContent(in string varName) raises (SALOME::SALOME_Exception);
     SeqOfByteVec getAllKeysOfVarWithTypeDict(in string varName) raises (SALOME::SALOME_Exception);
-    RequestSwitcher getRequestSwitcher();
     void takeANap(in double napDurationInSec) raises (SALOME::SALOME_Exception);
   };
 
@@ -139,6 +153,7 @@ module SALOME
     void atomicApply(in ListOfTransaction transactions) raises (SALOME::SALOME_Exception);
     ByteVec waitForMonoThrRev(in KeyWaiter kw) raises (SALOME::SALOME_Exception);
     ByteVec waitForAndKill(in KeyWaiter kw) raises (SALOME::SALOME_Exception);
+    RequestSwitcher getRequestSwitcher();
   };
 
   interface DataServerManager
@@ -158,5 +173,6 @@ module SALOME
     void removeDataScope(in string scopeName) raises (SALOME::SALOME_Exception);
     void cleanScopesInNS();
     void shutdownScopes() raises (SALOME::SALOME_Exception);
+    RequestSwitcherDSM getRequestSwitcher();
   };
 };
index ee9c57bb4993f14f3dfaf651534b472abcf81daa..ebb1e9fcd2a34fd23cbf4c3ede37ec952ac0a081 100644 (file)
@@ -189,7 +189,7 @@ SHOW_INCLUDE_FILES     = YES
 # will interpret the first line (until the first dot) of a JavaDoc-style 
 # comment as the brief description. If set to NO, the JavaDoc 
 # comments  will behave just like the Qt-style comments (thus requiring an 
-# explict @brief command for a brief description.
+# explicit @brief command for a brief description.
 
 JAVADOC_AUTOBRIEF      = NO
 
@@ -585,7 +585,7 @@ COMPACT_RTF            = NO
 RTF_HYPERLINKS         = NO
 
 # Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assigments. You only have to provide 
+# config file, i.e. a series of assingments. You only have to provide 
 # replacements, missing definitions are set to their default value.
 
 RTF_STYLESHEET_FILE    = 
index 6e0d66cdc4369098be8d361ea4ef79833f919212..84f12a025c4d49c921044e3ad38e0cf3340c29b8 100755 (executable)
@@ -69,7 +69,7 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # Netbsd (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
index 700bdeb560adb5042939eed617a6b98d370712bb..098e61a5b1bed3f46903220bd4795be3ab1b5620 100644 (file)
@@ -626,7 +626,7 @@ compiler."
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
       # which system we are compiling for in order to pass an extra
-      # flag for every libtool invokation.
+      # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
index b93b17c13c50060d627b4eef221b668d9ee822f8..22122c62a8bc9f2f33b240613695764d1039a254 100644 (file)
@@ -67,7 +67,7 @@
  * This class is utilised with GENERIC_DESTRUCTOR and DESTRUCTOR_OF, 
  * to program automatic deletion of objects at the end of the process, while
  * keeping the possibility of an early destruction, if required. This is used
- * for unit testing and trace mecanism.
+ * for unit testing and trace mechanism.
  */ 
 // ============================================================================
 
index ef357ec9a891a6135f951cc11f073b047336bc68..9475183ed0704e4090f29a9e7682dd2ea34bacbe 100644 (file)
@@ -248,7 +248,7 @@ int main (int argc, char * argv[])
   std::string s("012-56");
   
   int pos = s.find('-');
-  std::cout << "Fisrt part : " << s.substr(0, pos) << std::endl;
+  std::cout << "First part : " << s.substr(0, pos) << std::endl;
   std::cout << "Last part : " << s.substr(pos+1, s.size()) << std::endl;
 
   std::vector<std::string> vs = splitString("/dn20/salome/srn/salome2/", '/');
index 64099d0cf0cc4062f75f5e793db334f581100ff1..0c7e39be2d213abb86d0f51472ed479bfc3b2bcc 100644 (file)
@@ -42,7 +42,7 @@
  *  \brief This class implements DSC_User component.
  *
  *  This class allows a higher programming level than DSC_Basic. It enables
- *  a programming level for service's developpers who want to use DSC ports.
+ *  a programming level for service's developers who want to use DSC ports.
  *
  *  This class has two level for using and declare ports. The higher level proposes
  *  operations to add ports that are provided by default by SALOME like Calcium ports.
index 3060d9a242c8133cc0851a09f7bac64597005bf7..410446bb7c909b3f27d0547a343a0675cc871fd8 100644 (file)
@@ -723,7 +723,7 @@ std::string GetTmpDir()
   }
 
 #ifdef WIN32
-  //fuction CreateDirectory create only final directory, but not intermediate
+  //function CreateDirectory create only final directory, but not intermediate
   CreateDirectory(aTmpDir.c_str(), NULL);
   CreateDirectory(aDir.c_str(), NULL);
 #else
index 08c13f38ddba527704a17a79c9469b979951dbc3..9c78533a928ebd85c6d974dc7b957636d5e8f2bc 100755 (executable)
@@ -167,7 +167,7 @@ myStudy, myStudyName=None,None
 salome_initial=1
 def salome_init(embedded=0):
     """
-    Performs only once SALOME general purpose initialization for scripts.
+    Performs only once SALOME general purpose initialisation for scripts.
     Provides:
     orb             reference to CORBA
     lcc             a LifeCycleCorba instance
index 00f0e331a01fce81f1ba87cbc38c4d008af2cb40..540d1cce94f9252dfb9458d33b071a352d222c36 100755 (executable)
@@ -23,7 +23,7 @@ SALOME_CONFIGURE_FILE(logconfig.py.in logconfig.py)
 SALOME_CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh)
 
 # This first set of modules could be used in any context, you just
-# have to get a python environement.
+# have to get a python environment.
 SET(mypkgpython_PYTHON
     __init__.py
     deprecation.py
index ad04448afe98395c7bca4dc6b855c9570af58bd5..2ff423acaabbf5f37ccddfec9427c9c73c28a15d 100644 (file)
@@ -65,12 +65,12 @@ class Enumerate(object):
         return key in self._dict_keynumbers
 
     ## Returns true if the specified integer value is defined as an identifier
-    #  in this enumarate.
+    #  in this enumerate.
     #  \param value a value to test
     def isValid(self, value):
         """
         Returns true if the specified integer value is defined as an identifier
-        in this enumarate.
+        in this enumerate.
         @value a value to test
         """
         return value in self._dict_numberkeys
index e14023b7e84afbae17d12aebe9fde18408c7ce7b..31038407cb42185ad0616797a62beb34c2c0537a 100644 (file)
@@ -120,7 +120,7 @@ def getComponentList():
     obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
     catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
     if not catalog:
-        raise RuntimeError("Can't accesss module catalog")
+        raise RuntimeError("Can't access module catalog")
     return catalog.GetComponentList()
 
 import SALOMEDS
index 4a2521a60a24ba586e99f2c8bdf546053d2385e8..24deed4111d47b32031ea73a31bde64692d08dda 100755 (executable)
@@ -89,13 +89,13 @@ class SalomeOutsideGUI(object):
     
     def SelectedCount(self):
         """Get the number of active selections"""
-        print("SalomeOutsideGUI: no selection mecanism available outside GUI")
+        print("SalomeOutsideGUI: no selection mechanism available outside GUI")
         return 0
     
     def getSelected(self, i):
         """Get the selection number i """
-        print("SalomeOutsideGUI: no selection mecanism available outside GUI")
-        return None
+        print("SalomeOutsideGUI: no selection mechanism available outside GUI")
+        return none
     
     def AddIObject(self, Entry):
         """Add an entry"""
index 15fa6891737eff0277de6a923105502e9d655b5a..4c4c05110c2e0c75c31f833b4801ab8c4480bc2d 100755 (executable)
@@ -54,7 +54,8 @@ print("======================================================================")
 obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
 catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
 if not catalog:
-    raise RuntimeError("Can't accesss module catalog")
+
+    raise RuntimeError("Can't access module catalog")
 print("OK")
 
 print()
index a82d900507122e508994a4c6c3b250d748e4d640..e7da460f6bbecc86e6a3eaf99eb254fac26569a7 100644 (file)
@@ -76,8 +76,19 @@ int main(int argc, char* argv[])
   PortableServer::POA_var root_poa;
   PortableServer::POAManager_var pman;
   CORBA::Object_var obj;
-
-  CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
+  CORBA::ORB_var orb;
+  {
+    int myArgc(argc+2);
+    char **myArgv(new char *[myArgc]);
+    for(int i=0;i<argc;i++)
+      myArgv[i]=strdup(argv[i]);
+    myArgv[argc+0]=strdup("-ORBsupportCurrent");
+    myArgv[argc+1]=strdup("0");
+    orb = CORBA::ORB_init( myArgc , myArgv ) ;
+    for(int i=0;i<myArgc;i++)
+      free(myArgv[i]);
+    delete [] myArgv;
+  }
   //  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   INFOS_COMPILATION;
   BEGIN_OF(argv[0]);
index 2c41aaeb154fadcbccddc5ce9aa4de2fa013eca1..41c2d079a41bb99831b336e928cdb2bfe9f0a5fc 100755 (executable)
@@ -25,7 +25,7 @@ def mkdir_p(path):
 # You can use the environment variable USER_CATALOG_RESOURCES_FILE in order to
 # define a customised resource catalog.
 # If YACS_ROOT_DIR is not set, the test of submitting a YACS schema will be
-# skiped.
+# skipped.
 class TestCompo(unittest.TestCase):
   @classmethod
   def setUpClass(cls):
@@ -179,7 +179,7 @@ f.close()
     f.close()
     os.chmod(abs_script_file, 0o755)
 
-    #environement script
+    #environment script
     env_file = "myEnv.sh"
     env_text = """export ENV_TEST_VAR="expected"
 """
@@ -263,7 +263,7 @@ f.close()
     case_test_dir = os.path.join(TestCompo.test_dir, "yacs")
     mkdir_p(case_test_dir)
 
-    #environement script
+    #environment script
     env_file = "myEnv.sh"
     env_text = """export ENV_TEST_VAR="expected"
 """
@@ -459,7 +459,7 @@ f.close()
                       expected_result)
 
 if __name__ == '__main__':
-    # creat study
+    # create study
     import salome
     salome.salome_init()
     unittest.main()
index 4033c40717cb80d7267b29cee0d857f7c6cee7ee..14c0976556df58f10f23a41eea600333fc9847bc 100644 (file)
@@ -66,7 +66,7 @@ SALOME_FileTransferCORBA::SALOME_FileTransferCORBA(Engines::fileRef_ptr
  *         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 origFileName  absolute file path on refMachine
  *  \param containerName default container name used (FactoryServer) if empty
  */
 //=============================================================================
index 8f4c19fe5380d21c015da32602828c2c7e5e3f45..d2b0fe65b4fe62581ec038ec8a72bbd3b9cf140d 100644 (file)
@@ -59,7 +59,7 @@ LifeCycleCORBATest::_getTraceFileName()
 
 // ============================================================================
 /*!
- * Set Trace mecanism
+ * Set Trace mechanism
  * - delete preexisting trace classes if any
  * - set trace on file
  * Get or initialize the orb
index 41193da891ee25774fe84139931ca82d71c71bf4..4de1ab6b34e26186aac48e70d38c94d1154d5f90 100644 (file)
@@ -31,7 +31,7 @@ IF(NOT WIN32)
       )
   ENDFOREACH()
 
-  # resource manager test needs specific CatalogResouces file in test directory
+  # resource manager test needs specific CatalogResources file in test directory
   SET(TEST_NAME ${COMPONENT_NAME}_LC_testresourcemanager)
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testresourcemanager.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
index fb75ad1509eff57a83cbff906d64c9ae90394391..6223c5d9e48cf5e62c5f9bbb9f111c9605c665c5 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SALOME MPIContainer : implemenation of container based on MPI libraries
+//  SALOME MPIContainer : implementation of container based on MPI libraries
 //  File   : MPIObject_i.cxx
 //  Module : SALOME
 //
index 6c6793daaaa098c4b6d63f600b9b703f2d63cf29..0f46c4bbc1f06be895d0319be0e6deac62dfdd3e 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SALOME MPIContainer : implemenation of container based on MPI libraries
+//  SALOME MPIContainer : implementation of container based on MPI libraries
 //  File   : MPIObject_i.hxx
 //  Module : SALOME
 //
index 240d60a8a4035e94cacb9694ae1c57f7af9717ef..9e574d2747cca4c8d965122c71e9b0b0cfc20c20 100644 (file)
@@ -42,9 +42,9 @@ static int MYDEBUG = 0;
 //----------------------------------------------------------------------
 // Function : SALOME_ModuleCatalog_AcomponentImpl
 // Purpose  : Constructor
-//            Affect the component name, type,icone
+//            Affect the component name, type,icon
 //            Affect too the constraint and the interfaces of the component
-//            and the pathes prefixes for all computers
+//            and the path prefixes for all computers
 //----------------------------------------------------------------------  
 SALOME_ModuleCatalog_AcomponentImpl::SALOME_ModuleCatalog_AcomponentImpl
 (SALOME_ModuleCatalog::ComponentDef &C) : _Component(C)
@@ -293,7 +293,7 @@ SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename
       if (strcmp(interfacename, _Component.interfaces[ind].interfacename) == 0)
         {
           // wanted interface
-          // looking for the defautl service of the wanted interface
+          // looking for the default service of the wanted interface
           for (unsigned int ind1 = 0; ind1 <  _Component.interfaces[ind].interfaceservicelist.length() ; ind1++)
             {
               if (_Component.interfaces[ind].interfaceservicelist[ind1].Servicebydefault)
index d38704ceaa2558f4f6e6b4471e2ff708d1a564df..9924f6687c304acafaa6060ef54f543ea70674d6 100644 (file)
@@ -141,8 +141,8 @@ public:
   
   //! method to create the path prefix structures from the catalog parsing
   /*!
-    \param pathes ParserPathPrefixes arguments
-    \return the pathes
+    \param paths ParserPathPrefixes arguments
+    \return the paths
   */
   void duplicate(ParserPathPrefixes & p_out, const ParserPathPrefixes & P_in);
 
index b224370e086d47ab582ea07599c6963f683b98f6..a8c213b03a47f8604dfeff249cb5f0c0e7d21a8b 100644 (file)
@@ -400,9 +400,9 @@ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path)
 }
 
 // ============================================================================
-/*! \brief get the CORBA object reference associated to an uncomplete name.
+/*! \brief get the CORBA object reference associated to an incomplete name.
  *
- *  get the CORBA object reference associated to an uncomplete name with a
+ *  get the CORBA object reference associated to an incomplete name with a
  *  path. Look for the first occurrence of name*.
  *  If the NamingService is out, the exception ServiceUnreachable is thrown 
  * \param Path pathname under the form "/path/name" (Absolute reference !)
index 9daff2e34f3c77b254b5c103a128ab96e986386e..2230dd293996099fd2313d586262f89479ba666d 100644 (file)
@@ -102,7 +102,7 @@ NSTEST::echo_ptr NSTEST_aFactory_i::createInstance()
 
 // ============================================================================
 /*!
- * Set Trace mecanism
+ * Set Trace mechanism
  * - delete preexisting trace classes if any
  * - set trace on file
  * Get or initialize the orb
index afbc473cf3feadd618882eb677792f3a627752dc..3e4445d72c2ca1a9b1635a6d027f98c67ead78e5 100644 (file)
@@ -69,7 +69,7 @@ Container_proxy_impl_final:: ~Container_proxy_impl_final() {
   if (_NS)
     delete _NS;
 
-  // _fab_thread not deleted beacause fab_thread is managed
+  // _fab_thread not deleted because fab_thread is managed
   // by paco_fabrique_manager
 }
 
index 55cc8a3c755bbe386600eccacc7802bcb92f2b67..968d2ced27f90745002d1889ac1fe0b75445c33a 100644 (file)
@@ -124,7 +124,7 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException)
       user_catalog_file.open(user_file.c_str());
       if (user_catalog_file.fail())
       {
-        RES_INFOS("Error: cannot write in the user catalog resouces files");
+        RES_INFOS("Error: cannot write in the user catalog resources files");
         RES_INFOS("Error: using default CatalogResources.xml file");
         default_catalog_resource = true;
       }
index 23d234ffe37242d440477fa540cf48b1573a4831..70607183107158b35e02313087e3b49127a55702 100644 (file)
@@ -34,7 +34,7 @@
                 
                 Available attributes:
                 
-                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise).
+                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - otherwise).
                              This attribute is valid for active view only.
 */
 
index d9d7ed188a2c9eb8013108a5cc1c160cfae327b4..b8327ae0ec113f894673410909a4248e7de430e0 100644 (file)
@@ -43,7 +43,7 @@
 
                 Available attributes:
 
-                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise).
+                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - otherwise).
                              This attribute is valid for active view only.
 */
 
index d76bc47fb5e3229d72556959060b7baac40b933f..c67b195731aa66b4007ec4254b339a8da8a76140 100644 (file)
@@ -474,7 +474,7 @@ void SALOMEDS_StudyBuilder::UndoLimit(int theLimit)
  
 void SALOMEDS_StudyBuilder::CheckLocked()
 {
-  //There is only local part as CORBA part throws the correct exeception
+  //There is only local part as CORBA part throws the correct exception
   if (_isLocal) {
     SALOMEDS::Locker lock;
     try {
index 0bbe58c1f972f79e16eed1e9b816f78d5e0ee883..d47bc004fb1a66d5c3b5cdc16d2a97c514b7c7e8 100644 (file)
@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
      return 1;
   }
 
-  //Set up the environement for Embedded case
+  //Set up the environment for Embedded case
   std::string kernel_root = getenv("KERNEL_ROOT_DIR");
   CPPUNIT_ASSERT(!kernel_root.empty());
   kernel_root+="/share/salome/resources/kernel";
index 54f1463fb2fe528e13c1e2967aaee869379001dd..606b18a784b2d57967332606d8f0c4c76572db92 100644 (file)
@@ -78,7 +78,7 @@ BaseTraceCollector* FileTraceCollector::instance(const char *fileName)
 // ============================================================================
 /*!
  *  In a separate thread, loop to print traces.
- *  Mutex guarantees intialisation on instance method is done and only one run
+ *  Mutex guarantees initialisation on instance method is done and only one run
  *  allowed (double check ...)
  *  Loop until there is no more buffer to print,
  *  and no ask for end from destructor.
index 45f7389482b3ad19bbdbf4357a781db7e0600796..2495dcafb8bf6f30238e3895cb1cc4ec5d277c52 100644 (file)
@@ -68,7 +68,7 @@ BaseTraceCollector* LocalTraceCollector::instance()
 // ============================================================================
 /*!
  *  In a separate thread, loop to print traces.
- *  Mutex guarantees intialisation on instance method is done and only one run
+ *  Mutex guarantees initialisation on instance method is done and only one run
  *  allowed (double check ...)
  *  Loop until there is no more buffer to print,
  *  and no ask for end from destructor.
index 66cfb77995aefdb0cce2e648e573a1521072a2d4..a56faba1e0fc5c61d98d1416e99efc348edd0b8d 100644 (file)
@@ -39,6 +39,7 @@ SET(SalomeSDS_SOURCES
   SALOMESDS_RefCountServ.cxx
   SALOMESDS_BasicDataServer.cxx
   SALOMESDS_DataScopeServer.cxx
+  SALOMESDS_RequestSwitcher.cxx
   SALOMESDS_DataServerManager.cxx
   SALOMESDS_PickelizedPyObjServer.cxx
   SALOMESDS_PickelizedPyObjRdOnlyServer.cxx
index d1044d761c28b09b34b63967aa7bd07474ab6e7f..969b720ef53bf6ed83b6e0768254b3c418c763c5 100644 (file)
@@ -65,34 +65,23 @@ void DataScopeKiller::shutdown()
   _orb->shutdown(0);
 }
 
-RequestSwitcher::RequestSwitcher(CORBA::ORB_ptr orb)
+RequestSwitcher::RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerTransaction *ds):RequestSwitcherBase(orb),_ds(ds)
 {
-  CORBA::Object_var obj(orb->resolve_initial_references("RootPOA"));
-  PortableServer::POA_var poa(PortableServer::POA::_narrow(obj));
-  _poa_manager_under_control=poa->the_POAManager();
-  //
-  CORBA::PolicyList policies;
-  policies.length(1);
-  PortableServer::ThreadPolicy_var threadPol(poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
-  policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol);
-  // all is in PortableServer::POAManager::_nil. By specifying _nil cf Advanced CORBA Programming with C++ p 506
-  // a new POA manager is created. This POA manager is independent from POA manager of the son ones.
-  _poa_for_request_control=poa->create_POA("4RqstSwitcher",PortableServer::POAManager::_nil(),policies);
-  threadPol->destroy();
-  PortableServer::POAManager_var mgr(_poa_for_request_control->the_POAManager());
-  mgr->activate();
-  //obj=orb->resolve_initial_references ("POACurrent");// agy : usage of POACurrent breaks the hold_requests. Why ?
-  //PortableServer::Current_var current(PortableServer::Current::_narrow(obj));
 }
 
-void RequestSwitcher::holdRequests()
+SALOME::StringVec *RequestSwitcher::listVars()
 {
-  _poa_manager_under_control->hold_requests(true);
+  return _ds->listVars();
 }
 
-void RequestSwitcher::activeRequests()
+SALOME::ByteVec *RequestSwitcher::fetchSerializedContent(const char *varName)
 {
-  _poa_manager_under_control->activate();
+  return _ds->fetchSerializedContent(varName);
+}
+
+void RequestSwitcher::fetchAndGetAccessOfVar(const char *varName, CORBA::String_out access, SALOME::ByteVec_out data)
+{
+  return _ds->fetchAndGetAccessOfVar(varName,access,data);
 }
 
 DataScopeServerBase::DataScopeServerBase(CORBA::ORB_ptr orb, SALOME::DataScopeKiller_var killer, const std::string& scopeName):_globals(0),_locals(0),_pickler(0),_orb(CORBA::ORB::_duplicate(orb)),_name(scopeName),_killer(killer)
@@ -269,16 +258,6 @@ SALOME::SeqOfByteVec *DataScopeServerBase::getAllKeysOfVarWithTypeDict(const cha
   return ret;
 }
 
-SALOME::RequestSwitcher_ptr DataScopeServerBase::getRequestSwitcher()
-{
-  if(_rs.isNull())
-    {
-      _rs=new RequestSwitcher(_orb);
-    }
-  CORBA::Object_var obj(_rs->activate());
-  return SALOME::RequestSwitcher::_narrow(obj);
-}
-
 void DataScopeServerBase::takeANap(CORBA::Double napDurationInSec)
 {
   if(napDurationInSec<0.)
@@ -846,7 +825,7 @@ SALOME::ByteVec *DataScopeServerTransaction::waitForMonoThrRev(SALOME::KeyWaiter
   KeyWaiter *retc(dynamic_cast<KeyWaiter *>(ret));
   if(!retc)
     throw Exception("DataScopeServerTransaction::invokeMonoThr : internal error 1 !");
-  retc->_remove_ref();// restore the counter afer _poa_for_key_waiter->reference_to_servant(kw)
+  retc->_remove_ref();// restore the counter after _poa_for_key_waiter->reference_to_servant(kw)
   SALOME::ByteVec *zeRet(retc->waitForMonoThr());
   retc->enforcedRelease();
   return zeRet;
@@ -863,7 +842,7 @@ SALOME::ByteVec *DataScopeServerTransaction::waitForAndKill(SALOME::KeyWaiter_pt
   KeyWaiter *retc(dynamic_cast<KeyWaiter *>(ret));
   if(!retc)
     throw Exception("DataScopeServerTransaction::invokeMonoThr : internal error 1 !");
-  retc->_remove_ref();// restore the counter afer _poa_for_key_waiter->reference_to_servant(kw)
+  retc->_remove_ref();// restore the counter after _poa_for_key_waiter->reference_to_servant(kw)
   SALOME::ByteVec *zeRet(retc->waitForAndKill());
   retc->enforcedRelease();
   return zeRet;
@@ -914,3 +893,12 @@ DataScopeServerTransaction::~DataScopeServerTransaction()
 {
 }
 
+SALOME::RequestSwitcher_ptr DataScopeServerTransaction::getRequestSwitcher()
+{
+  if(_rs.isNull())
+    {
+      _rs=new RequestSwitcher(_orb,this);
+    }
+  CORBA::Object_var obj(_rs->activate());
+  return SALOME::RequestSwitcher::_narrow(obj);
+}
index 860e53d6a692a0ccdb27806874175b752a7961cb..fed46259265c0983f14143c090e71f8ace199328 100644 (file)
@@ -24,6 +24,7 @@
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(SALOME_SDS)
 
+#include "SALOMESDS_RequestSwitcher.hxx"
 #include "SALOMESDS_RefCountServ.hxx"
 #include "SALOMESDS_AutoRefCountPtr.hxx"
 #include "SALOMESDS_BasicDataServer.hxx"
@@ -45,17 +46,23 @@ namespace SALOMESDS
   private:
     CORBA::ORB_var _orb;
   };
+
+  class DataScopeServerTransaction;
   
-  class SALOMESDS_EXPORT RequestSwitcher : public POA_SALOME::RequestSwitcher, public POAHolder
+  /*!
+   * Servant activated by a specific POA (single thread) having itself its specific POA_manager.
+   * This class is able to hold/active the default POA_manager shared by other POA than this.
+   */
+  class SALOMESDS_EXPORT RequestSwitcher : public RequestSwitcherBase, public virtual POA_SALOME::RequestSwitcher
   {
   public:
-    RequestSwitcher(CORBA::ORB_ptr orb);
-    void holdRequests();
-    void activeRequests();
-    PortableServer::POA_var getPOA() const { return _poa_for_request_control; }
+    RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerTransaction *ds);
+    SALOME::StringVec *listVars();
+    SALOME::ByteVec *fetchSerializedContent(const char *varName);
+    void fetchAndGetAccessOfVar(const char *varName, CORBA::String_out access, SALOME::ByteVec_out data);
   private:
-    PortableServer::POA_var _poa_for_request_control;
-    PortableServer::POAManager_var _poa_manager_under_control;
+    //! handle on its creator to give access to services when _poa_manager_under_control is in hold mode.
+    DataScopeServerTransaction *_ds;
   };
 
   class KeyWaiter;
@@ -76,7 +83,6 @@ namespace SALOMESDS
     CORBA::Boolean shutdownIfNotHostedByDSM(SALOME::DataScopeKiller_out killer);
     SALOME::ByteVec *fetchSerializedContent(const char *varName);
     SALOME::SeqOfByteVec *getAllKeysOfVarWithTypeDict(const char *varName);
-    SALOME::RequestSwitcher_ptr getRequestSwitcher();
     void takeANap(CORBA::Double napDurationInSec);
   public:
     ~DataScopeServerBase();
@@ -114,7 +120,6 @@ namespace SALOMESDS
     std::string _name;
     std::list< std::pair< SALOME::BasicDataServer_var, BasicDataServer * > > _vars;
     SALOME::DataScopeKiller_var _killer;
-    AutoServantPtr<RequestSwitcher> _rs;
     static std::size_t COUNTER;
   };
   
@@ -162,9 +167,11 @@ namespace SALOMESDS
     SALOME::KeyWaiter_ptr waitForKeyInVar(const char *varName, const SALOME::ByteVec& keyVal);
     SALOME::KeyWaiter_ptr waitForKeyInVarAndKillIt(const char *varName, const SALOME::ByteVec& keyVal, SALOME::Transaction_out transac);
     void atomicApply(const SALOME::ListOfTransaction& transactions);
+    SALOME::RequestSwitcher_ptr getRequestSwitcher();
   private:
     PortableServer::POA_var _poa_for_key_waiter;
     std::list< KeyWaiter * > _waiting_keys;
+    AutoServantPtr<RequestSwitcher> _rs;
   };
 }
 
index 8296ba8f2f7b1fb92d0e83df930b7719d5d2ceca..9266e17f6ad52bda3e7b38b6d9825430cd39b0f8 100644 (file)
@@ -33,6 +33,16 @@ const char DataServerManager::NAME_IN_NS[]="/DataServerManager";
 
 const char DataServerManager::DFT_SCOPE_NAME_IN_NS[]="Default";
 
+SALOME::StringVec *RequestSwitcherDSM::listScopes()
+{
+  return _dsm->listScopes();
+}
+
+SALOME::DataScopeServerTransaction_ptr RequestSwitcherDSM::giveADataScopeTransactionCalled(const char *scopeName, CORBA::Boolean& isCreated)
+{
+  return _dsm->giveADataScopeTransactionCalled(scopeName,isCreated);
+}
+
 DataServerManager::DataServerManager(int argc, char *argv[], CORBA::ORB_ptr orb, PortableServer::POA_ptr poa):_orb(CORBA::ORB::_duplicate(orb))
 {
   DataScopeServer *dftScope(new DataScopeServer(orb,SALOME::DataScopeKiller::_nil(),DFT_SCOPE_NAME_IN_NS));//_remove_ref will be call by DataScopeServer::shutdownIfNotHostedByDSM
@@ -307,3 +317,13 @@ SALOME::DataScopeServerBase_var DataServerManager::getScopePtrGivenName(const st
   SALOME_NamingService ns(_orb);
   return GetScopePtrGivenName(scopeName,listOfScopesCpp(),ns);
 }
+
+SALOME::RequestSwitcherDSM_ptr DataServerManager::getRequestSwitcher()
+{
+  if(_rs.isNull())
+    {
+      _rs=new RequestSwitcherDSM(_orb,this);
+    }
+  CORBA::Object_var obj(_rs->activate());
+  return SALOME::RequestSwitcherDSM::_narrow(obj);
+}
index 8d7a9da48509b9d1ae6d051ab8a50701747b0d92..835a6e882f4546cc833b53acac4aa87382e5b310 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "SALOMESDS_AutoRefCountPtr.hxx"
 #include "SALOMESDS_DataScopeServer.hxx"
+#include "SALOMESDS_RequestSwitcher.hxx"
 
 #include "SALOMESDS_Defines.hxx"
 
@@ -35,6 +36,18 @@ class SALOME_NamingService;
 
 namespace SALOMESDS
 {
+  class DataServerManager;
+  
+  class RequestSwitcherDSM : public RequestSwitcherBase, public virtual POA_SALOME::RequestSwitcherDSM
+  {
+  public:
+    RequestSwitcherDSM(CORBA::ORB_ptr orb, DataServerManager *dsm):RequestSwitcherBase(orb),_dsm(dsm) { }
+    SALOME::StringVec *listScopes();
+    SALOME::DataScopeServerTransaction_ptr giveADataScopeTransactionCalled(const char *scopeName, CORBA::Boolean& isCreated);
+  private:
+    DataServerManager *_dsm;
+  };
+  
   class DataScopeServer;
     
   class SALOMESDS_EXPORT DataServerManager : public virtual POA_SALOME::DataServerManager
@@ -56,6 +69,7 @@ namespace SALOMESDS
     void removeDataScope(const char *scopeName);
     void cleanScopesInNS();
     void shutdownScopes();
+    SALOME::RequestSwitcherDSM_ptr getRequestSwitcher();
   public:
     CORBA::ORB_var getORB() { return _orb; }
     static std::string CreateAbsNameInNSFromScopeName(const std::string& scopeName);
@@ -71,6 +85,7 @@ namespace SALOMESDS
     CORBA::ORB_var _orb;
     //! single thread poa
     PortableServer::POA_var _poa;
+    AutoServantPtr<RequestSwitcherDSM> _rs;
   };
 }
 
index 076aec74547d11c24a0c677276a09ed1c01c4fc6..4c783e73aaeb0e06445671e52b19a2c55e0635fb 100644 (file)
@@ -33,7 +33,7 @@ KeyWaiter::KeyWaiter(PickelizedPyObjServer *var, const SALOME::ByteVec& keyVal):
   if(!var)
     throw Exception("KeyWaiter constructor : Invalid glob var is NULL !");
   if(!dynamic_cast<DataScopeServerTransaction *>(var->getFather()))
-    throw Exception("KeyWaiter constructor : Invalid glob var ! Invalid DataScope hosting it ! DataScopeServerTransaction excpected !");
+    throw Exception("KeyWaiter constructor : Invalid glob var ! Invalid DataScope hosting it ! DataScopeServerTransaction expected !");
   std::string st;
   PickelizedPyObjServer::FromByteSeqToCpp(keyVal,st);
   _ze_key=PickelizedPyObjServer::GetPyObjFromPickled(st,getDSS());
index db1b19fb726a9081be1bf671c41eb39a10c13091..11b1ea9ff48551fe3239c0edc04531339d8ab9fd 100644 (file)
@@ -65,7 +65,7 @@ SALOME::PickelizedPyObjRdExtServer_ptr PickelizedPyObjRdExtServer::invokePythonM
   Py_XDECREF(argsPy);
   if(!res)
     {
-      std::ostringstream oss; oss << "PickelizedPyObjRdExtServer::invokePythonMethodOn : Problem during invokation serverside of Method \"" << method << "\" !";
+      std::ostringstream oss; oss << "PickelizedPyObjRdExtServer::invokePythonMethodOn : Problem during invocation serverside of Method \"" << method << "\" !";
       throw Exception(oss.str());
     }
   PickelizedPyObjRdExtServer *ret(new PickelizedPyObjRdExtServer(_father,DataScopeServer::BuildTmpVarNameFrom(getVarNameCpp()),res));
index 8ffe048483d0fc476a8dabbd097138894aa895d3..0a041d09a66db15923f5f32eb84e8519176166da 100644 (file)
@@ -98,7 +98,7 @@ SALOME::PickelizedPyObjRdWrServer_ptr PickelizedPyObjRdWrServer::invokePythonMet
         }
       oss2 << " )";
       PyErr_Clear();
-      oss << "PickelizedPyObjRdWrServer::invokePythonMethodOn : Problem during invokation serverside of Method \"" << method << "\" ! Details are : " << oss2.str() << "\n\n" << "TraceBack is : " << oss3.str(); 
+      oss << "PickelizedPyObjRdWrServer::invokePythonMethodOn : Problem during invocation serverside of Method \"" << method << "\" ! Details are : " << oss2.str() << "\n\n" << "TraceBack is : " << oss3.str(); 
       throw Exception(oss.str());
     }
   PickelizedPyObjRdWrServer *ret(new PickelizedPyObjRdWrServer(_father,DataScopeServer::BuildTmpVarNameFrom(getVarNameCpp()),res));
diff --git a/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx b/src/SALOMESDS/SALOMESDS_RequestSwitcher.cxx
new file mode 100644 (file)
index 0000000..e4a0e2b
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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, or (at your option) any later version.
+//
+// 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
+//
+// Author : Anthony GEAY (EDF R&D)
+
+#include "SALOMESDS_RequestSwitcher.hxx"
+
+#include <sstream>
+
+using namespace SALOMESDS;
+
+RequestSwitcherBase::RequestSwitcherBase(CORBA::ORB_ptr orb)
+{
+  static int iii=0;
+  CORBA::Object_var obj(orb->resolve_initial_references("RootPOA"));
+  PortableServer::POA_var poa(PortableServer::POA::_narrow(obj));
+  _poa_manager_under_control=poa->the_POAManager();
+  //
+  CORBA::PolicyList policies;
+  policies.length(1);
+  PortableServer::ThreadPolicy_var threadPol(poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
+  policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol);
+  // all is in PortableServer::POAManager::_nil. By specifying _nil cf Advanced CORBA Programming with C++ p 506
+  // a new POA manager is created. This POA manager is independent from POA manager of the son ones.
+  std::ostringstream poaName;
+  poaName << "4RqstSwitcher_" << iii++;
+  _poa_for_request_control=poa->create_POA(poaName.str().c_str(),PortableServer::POAManager::_nil(),policies);
+  threadPol->destroy();
+  PortableServer::POAManager_var mgr(_poa_for_request_control->the_POAManager());
+  mgr->activate();
+  //obj=orb->resolve_initial_references ("POACurrent");// agy : usage of POACurrent breaks the hold_requests. Why ?
+  //PortableServer::Current_var current(PortableServer::Current::_narrow(obj));
+}
+
+void RequestSwitcherBase::holdRequests()
+{
+  _poa_manager_under_control->hold_requests(true);
+}
+
+void RequestSwitcherBase::activeRequests()
+{
+  _poa_manager_under_control->activate();
+}
diff --git a/src/SALOMESDS/SALOMESDS_RequestSwitcher.hxx b/src/SALOMESDS/SALOMESDS_RequestSwitcher.hxx
new file mode 100644 (file)
index 0000000..1cb7410
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 2018  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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, or (at your option) any later version.
+//
+// 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
+//
+// Author : Anthony GEAY (EDF R&D)
+
+#ifndef __SALOMESDS_REQUESTSWITCHER_HXX__
+#define __SALOMESDS_REQUESTSWITCHER_HXX__
+
+#include "SALOMEconfig.h"
+#include CORBA_SERVER_HEADER(SALOME_SDS)
+#include "SALOMESDS_AutoRefCountPtr.hxx"
+#include "SALOMESDS_Defines.hxx"
+
+namespace SALOMESDS
+{
+  /*!
+   * Servant activated by a specific POA (single thread) having itself its specific POA_manager.
+   * This class is able to hold/active the default POA_manager shared by other POA than this.
+   */
+  class SALOMESDS_EXPORT RequestSwitcherBase : public virtual POA_SALOME::RequestSwitcherBase, public POAHolder
+  {
+  public:
+    RequestSwitcherBase(CORBA::ORB_ptr orb);
+    void holdRequests();
+    void activeRequests();
+    PortableServer::POA_var getPOA() const { return _poa_for_request_control; }
+  private:
+    PortableServer::POA_var _poa_for_request_control;
+    PortableServer::POAManager_var _poa_manager_under_control;
+  };
+}
+
+#endif
index 3caceef906eb4c17a3775ac5fff76496c0b76ed6..155085b4772fc565d220972f6ae63512ced3f3e5 100644 (file)
@@ -60,16 +60,21 @@ def work(t):
       print("~~~~~~~~~~~~~~ work ~~~~~~~~~~~")
     return proc.returncode
   
-def func_test7(scopeName,l,l2,cv):
+def func_test7(scopeName,cv,cv2,cv3,sharedNum):
     salome.salome_init()
     varName="a"
     zeValue={"ab":[4,5,6]}
     dsm=salome.naming_service.Resolve("/DataServerManager")
     dss,isCreated=dsm.giveADataScopeTransactionCalled(scopeName) # should be suspended nbOfSecWait s by main process
     assert(not isCreated)
-    l.release() # tell manager that I'm ready
-    l2.acquire() # wait for manager to start micro-test1
     ######### micro-test1 - check that all requests are suspended
+    ######## Barrier
+    with cv2:
+      cv2.notify_all()
+      sharedNum.value=True
+    with cv3:
+      cv3.wait()
+    ####### End Barrier
     s=datetime.now()
     t0=dss.createRdWrVarTransac(varName,obj2Str(zeValue))
     s=(datetime.now()-s).total_seconds()
@@ -348,22 +353,38 @@ class SalomeSDSTest(unittest.TestCase):
     Warning this method expects a not overloaded machine to be run because test is based on ellapse time.
     """
     scopeName="Scope1"
+    varName="ab"
+    zeObj={"ab":[5,6]}
     dsm=salome.naming_service.Resolve("/DataServerManager")
     dsm.cleanScopesInNS()
     if scopeName in dsm.listScopes():
         dsm.removeDataScope(scopeName)
-    # l is for main process sync. to be sure to launch test when sub process is ready
-    # l2 lock is for sub process sync.
-    l=mp.Lock(); l2=mp.Lock()
-    l.acquire() ; l2.acquire()
-    cv=mp.Condition(mp.Lock())
     dss,isCreated=dsm.giveADataScopeTransactionCalled(scopeName)
-    #assert(isCreated)
-    p=mp.Process(target=func_test7,args=(scopeName,l,l2,cv))
+    self.assertTrue(isCreated)
+    cv=mp.Condition(mp.Lock())
+    cv2=mp.Condition(mp.Lock()) # sharedNum & cv2 & cv3 for the barrier
+    cv3=mp.Condition(mp.Lock())
+    sharedNum=mp.Value('b',False)
+    p=mp.Process(target=func_test7,args=(scopeName,cv,cv2,cv3,sharedNum))
     p.start()
-    l.acquire()
-    rs=dss.getRequestSwitcher() ; rs.holdRequests() # The aim of the test
-    l2.release() # tell slave process that it's ready for micro-test1
+    #
+    dss,isCreated=dsm.giveADataScopeTransactionCalled(scopeName)
+    self.assertTrue(not isCreated)
+    t0=dss.createRdWrVarTransac(varName,obj2Str(zeObj))
+    dss.atomicApply([t0])
+    rs=dss.getRequestSwitcher()
+    self.assertTrue(not isCreated)
+    ######## Barrier
+    with cv2:
+      if not sharedNum.value:
+        cv2.wait()
+      sharedNum.value=False
+      pass
+    with cv3:
+      cv3.notify_all()
+    ####### End Barrier
+    rs.holdRequests() # The aim of the test
+    self.assertEqual(rs.listVars(),[varName]) # call whereas holdRequest is called
     time.sleep(nbOfSecWait)
     rs.activeRequests() # The aim of the test
     ######### micro-test3 - check that holdRequests is able to wait for a non finished job
@@ -373,8 +394,9 @@ class SalomeSDSTest(unittest.TestCase):
       time.sleep(0.01) # let main proc the priority
       rs.holdRequests() # the aim of the test is here. main process is occupied 1s -> holdRequests is Expected to wait
       s=(datetime.now()-s).total_seconds()
+      self.assertTrue(str2Obj(rs.fetchSerializedContent(varName))==zeObj) # call whereas holdRequest is called
       rs.activeRequests()
-      assert(s>=0.99*nbOfSecWait and s<nbOfSecWait*1.01) # expect to be not locked
+      self.assertTrue(s>=0.99*nbOfSecWait and s<nbOfSecWait*1.01) # expect to be not locked
     # finishing
     p.join()
     pass
@@ -385,5 +407,6 @@ class SalomeSDSTest(unittest.TestCase):
   
   pass
 
-unittest.main()
+if __name__=="__main__":
+  unittest.main()
 
index 655230147937cfd490d521a2cbc486083459327d..dbc791758001f774110e322b04047cf89eca42ac 100644 (file)
@@ -82,7 +82,7 @@ BaseTraceCollector* SALOMETraceCollector::instance()
 // ============================================================================
 /*!
  *  In a separate thread, loop to print traces.
- *  Mutex guarantees intialisation on instance method is done and only one run
+ *  Mutex guarantees initialisation on instance method is done and only one run
  *  allowed (double check ...)
  *  Loop until there is no more buffer to print,
  *  and no ask for end from destructor.
index 8091c2f82c934eec4e006d84ae204edc9b90561d..385b25c4903dc4a16bf49457c03be47a6f3918ec 100644 (file)
@@ -37,7 +37,7 @@
 
 // ============================================================================
 /*!
- * Set Trace mecanism
+ * Set Trace mechanism
  * - delete preexisting trace classes if any
  * - set trace on file
  */
@@ -94,7 +94,7 @@ int genExcept()
 
 // ============================================================================
 /*!
- * Check basic SALOME_exception mecanism
+ * Check basic SALOME_exception mechanism
  */
 // ============================================================================
 
index c2d09d8497b8f067b1e2e600fddcb17fd9e9aa21..5fef77be5b2c2394449e9c48f4ee2a4d2a3a04a9 100644 (file)
@@ -89,7 +89,7 @@ public :
  * 
  * <B>Design description</B>
  * 
- *      The destruction object must be created dynamically because it subcribes itself in the list of
+ *      The destruction object must be created dynamically because it subscribes itself in the list of
  *      destruction to be performed at the end of the process.
  * 
  */