]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add shaper standalone executable without CORBA csgroup_IS2_lot7b
authorrraphael <raphael.raphael@c-s.fr>
Mon, 8 Feb 2021 18:32:54 +0000 (19:32 +0100)
committerrraphael <raphael.raphael@c-s.fr>
Mon, 8 Feb 2021 18:37:42 +0000 (19:37 +0100)
src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx
src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx
src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx
src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx
src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.cxx
src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx
src/TOOLSDS/CMakeLists.txt
src/TOOLSDS/SALOMEDS_Tool.cxx
src/TOOLSDS/SALOMEDS_Tool.hxx

index 804d2f053357d6323c5566d3f099a3628142fd61..476f20c555bca7784d5f5e15b81761f73813b80f 100644 (file)
@@ -34,7 +34,7 @@
 
 class SALOMEDSIMPL_EXPORT SALOMEDSImpl_ChildIterator
 {
-private:
+protected:
   DF_ChildIterator _it;
   SALOMEDSImpl_SObject _so;
 
index 9d85ce6537877684f6917f636453764a51451e0a..cfe568d2846cfa1aa7bdd06f4870b9782a27159f 100644 (file)
@@ -39,7 +39,7 @@
 
 class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SComponentIterator
 {
-private:
+protected:
 
   DF_ChildIterator        _it;
   DF_Label                _lab;
index f46495393f55fe4dad649d22ac91c877d84e380c..397d5526b8a5f771dd9ee3ab4201c53afd181469 100644 (file)
@@ -94,6 +94,15 @@ SALOMEDSImpl_UseCaseBuilder::SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocumen
   }  
 }
 
+//============================================================================
+/*! Function : copy constructor
+ *  Purpose  :
+ */
+//============================================================================
+SALOMEDSImpl_UseCaseBuilder::SALOMEDSImpl_UseCaseBuilder(SALOMEDSImpl_UseCaseBuilder* aCopy):
+  _root(aCopy->_root), _doc(aCopy->_doc), _lastChild(aCopy->_lastChild), _childIndex(aCopy->_childIndex)
+{}
+
 //============================================================================
 /*! Function : destructor
  *  Purpose  :
index 72e2216ff1db6417cbda2d574f92a695b52c8815..4fea9f8a4125c08545510a8997a8909cf851336e 100644 (file)
@@ -52,6 +52,8 @@ public:
   //! standard constructor  
   SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument);
 
+  SALOMEDSImpl_UseCaseBuilder(SALOMEDSImpl_UseCaseBuilder* aCopy);
+
   //! standard destructor
   virtual ~SALOMEDSImpl_UseCaseBuilder();
 
index 608aadcb9f0c8b281637bb400f609525c3181578..854724493d21df579634458ba4d6dbe3da854604 100644 (file)
@@ -54,6 +54,17 @@ SALOMEDSImpl_UseCaseIterator::SALOMEDSImpl_UseCaseIterator(const DF_Label& theLa
   }
 }
 
+SALOMEDSImpl_UseCaseIterator::SALOMEDSImpl_UseCaseIterator(const SALOMEDSImpl_UseCaseIterator *itr)
+  :SALOMEDSImpl_UseCaseIterator()
+{
+  if(!itr)
+    return;
+  _it = itr->_it;
+   _node = itr->_node;
+   _guid = itr->_guid;
+  _levels =  itr->_levels;
+}
+
 //============================================================================
 /*! Function : destructor
  *  Purpose  :
index cade5ce71d0b926dc28c5c06e87f74e3b3b7bf57..a6266aed03437c69fd3e312445c1299f426a8143 100644 (file)
@@ -38,7 +38,7 @@
 class  SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseIterator
 {
 
-private:
+protected:
   std::string                                _guid;
   bool                                       _levels;
   SALOMEDSImpl_AttributeTreeNode*            _node;
@@ -48,6 +48,8 @@ public:
 
   SALOMEDSImpl_UseCaseIterator();
 
+  SALOMEDSImpl_UseCaseIterator(const SALOMEDSImpl_UseCaseIterator *itr);
+
   //! standard constructor  
   SALOMEDSImpl_UseCaseIterator(const DF_Label& theLabel, 
     const std::string& theGUID, 
index 81520c256c9b81899d42091f98525715f3b4294c..06bb3fb8be4d097f9243d79be0aefbf3dea75e9c 100644 (file)
@@ -26,12 +26,14 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
+  ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl
+  ${CMAKE_CURRENT_SOURCE_DIR}/../DF
   ${PROJECT_BINARY_DIR}/idl
 )
 
 ADD_LIBRARY(TOOLSDS SALOMEDS_Tool.cxx)
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
-TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES} SalomeDSImpl)
 INSTALL(TARGETS TOOLSDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index b9f4f5e63583fcfe31a7fb28b2cbf47755b80ddc..ddae415c46cb99583c3f1af8db1ac527243c4146 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE, CSGROUP
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 
 #include <iostream> 
 #include <fstream>
+#include <cstring>
 
+#ifndef DISABLE_ORB
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-
+#endif
 bool Exists(const std::string thePath) 
 {
        return Kernel_Utils::IsExists(thePath);
@@ -168,38 +170,37 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
 //============================================================================
 namespace
 {
-  SALOMEDS::TMPFile* 
-  PutFilesToStream(const std::string& theFromDirectory,
-                   const std::vector<std::string>& theFiles,
-                   const std::vector<std::string>& theFileNames,
-                   const int theNamesOnly)
+  long filesToStream(const std::string& theFromDirectory,
+                     const std::vector<std::string>& theFiles,
+                     const std::vector<std::string>& theFileNames,
+                     const int theNamesOnly, unsigned char*& aBuffer)
   {
     int i, aLength = (int)theFiles.size(); //!< TODO: conversion from size_t to int
     if(aLength == 0)
-      return (new SALOMEDS::TMPFile);
-    
+      return 0;
+
     //Get a temporary directory for saved a file
     std::string aTmpDir = theFromDirectory;
-    
+
     long aBufferSize = 0;
     long aCurrentPos;
-    
+
     int aNbFiles = 0;
     int* aFileNameSize= new int[aLength];
     long* aFileSize= new long[aLength];
-    
+
     //Determine the required size of the buffer
-    
+
     for(i=0; i<aLength; i++) {
-      
+
       //Check if the file exists
-      
+
       if (!theNamesOnly) { // mpv 15.01.2003: if only file names must be stroed, then size of files is zero
         std::string aFullPath = aTmpDir + theFiles[i];
         if(!Exists(aFullPath)) continue;
 #ifdef WIN32
 #ifdef UNICODE
-               std::ifstream aFile(Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
+        std::ifstream aFile(Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
 #else
         std::ifstream aFile(aFullPath.c_str(), std::ios::binary);
 #endif
@@ -215,75 +216,107 @@ namespace
       aBufferSize += (theNamesOnly)?4:12;       //Add 4 bytes: a length of the file name,
       //    8 bytes: length of the file itself
       aNbFiles++;
-    } 
-    
-    if ( aNbFiles == 0 ) return (new SALOMEDS::TMPFile);
+    }
+
+    if ( aNbFiles == 0 ) return 0;
     aBufferSize += 4;      //4 bytes for a number of the files that will be written to the stream;
-       unsigned char* aBuffer = new unsigned char[aBufferSize];
+    aBuffer = new unsigned char[aBufferSize];
 
     if(aBuffer == NULL)
-      return (new SALOMEDS::TMPFile);
-    
+      return 0;
+
     //Initialize 4 bytes of the buffer by 0
-    memset(aBuffer, 0, 4); 
+    memset(aBuffer, 0, 4);
     //Copy the number of files that will be written to the stream
-    memcpy(aBuffer, &aNbFiles, ((sizeof(int) > 4) ? 4 : sizeof(int))); 
-    
-    
+    memcpy(aBuffer, &aNbFiles, ((sizeof(int) > 4) ? 4 : sizeof(int)));
+
+
     aCurrentPos = 4;
-    
+
     for(i=0; i<aLength; i++) {
-         std::ifstream *aFile;
+      std::ifstream *aFile;
       if (!theNamesOnly) { // mpv 15.01.2003: we don't open any file if theNamesOnly = true
         std::string aFullPath = aTmpDir + theFiles[i];
         if(!Exists(aFullPath)) continue;
 #ifdef WIN32
 #ifdef UNICODE
-               aFile = new std::ifstream (Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
+        aFile = new std::ifstream (Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
 #else
         aFile = new std::ifstream(aFullPath.c_str(), std::ios::binary);
 #endif
 #else
         aFile = new std::ifstream(aFullPath.c_str());
-#endif  
+#endif
       }
       //Initialize 4 bytes of the buffer by 0
-      memset((aBuffer + aCurrentPos), 0, 4); 
+      memset((aBuffer + aCurrentPos), 0, 4);
       //Copy the length of the file name to the buffer
-      memcpy((aBuffer + aCurrentPos), (aFileNameSize + i), ((sizeof(int) > 4) ? 4 : sizeof(int))); 
+      memcpy((aBuffer + aCurrentPos), (aFileNameSize + i), ((sizeof(int) > 4) ? 4 : sizeof(int)));
       aCurrentPos += 4;
-      
+
       //Copy the file name to the buffer
       memcpy((aBuffer + aCurrentPos), theFileNames[i].c_str(), aFileNameSize[i]);
       aCurrentPos += aFileNameSize[i];
-      
+
       if (!theNamesOnly) { // mpv 15.01.2003: we don't copy file content to the buffer if !theNamesOnly
         //Initialize 8 bytes of the buffer by 0
-        memset((aBuffer + aCurrentPos), 0, 8); 
+        memset((aBuffer + aCurrentPos), 0, 8);
         //Copy the length of the file to the buffer
         memcpy((aBuffer + aCurrentPos), (aFileSize + i), ((sizeof(long) > 8) ? 8 : sizeof(long)));
         aCurrentPos += 8;
-        
+
         aFile->seekg(0, std::ios::beg);
-               aFile->read((char *)(aBuffer + aCurrentPos), aFileSize[i]);
+        aFile->read((char *)(aBuffer + aCurrentPos), aFileSize[i]);
         aFile->close();
         delete(aFile);
         aCurrentPos += aFileSize[i];
       }
     }
-    
+
     delete[] aFileNameSize;
     delete[] aFileSize;
-    
+    return aBufferSize;
+  }
+#ifndef DISABLE_ORB
+  SALOMEDS::TMPFile*
+  PutFilesToStream(const std::string& theFromDirectory,
+                   const std::vector<std::string>& theFiles,
+                   const std::vector<std::string>& theFileNames,
+                   const int theNamesOnly)
+  {
+
+
+    unsigned char* aBuffer;
+    long aBufferSize = filesToStream(theFromDirectory, theFiles, theFileNames, theNamesOnly, aBuffer);
+
+    if(!aBufferSize)
+      return (new SALOMEDS::TMPFile);
     
     CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
     
     return (new SALOMEDS::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1));
   }
-  
-}
+#else
+
+SALOMEDSImpl_Tool::TMPFile*
+PutFilesToStreamImp(const std::string& theFromDirectory,
+                 const std::vector<std::string>& theFiles,
+                 const std::vector<std::string>& theFileNames,
+                 const int theNamesOnly)
+{
+
 
+  unsigned char* aBuffer;
+  long aBufferSize = filesToStream(theFromDirectory, theFiles, theFileNames, theNamesOnly, aBuffer);
+  if(!aBufferSize)
+    return nullptr;
 
+  return (new SALOMEDSImpl_Tool::TMPFile(aBufferSize, aBuffer, 1));
+}
+#endif
+}
+
+#ifndef DISABLE_ORB
 SALOMEDS::TMPFile* 
 SALOMEDS_Tool::PutFilesToStream(const std::string& theFromDirectory,
                                 const ListOfFiles& theFiles,
@@ -300,79 +333,127 @@ SALOMEDS_Tool::PutFilesToStream(const ListOfFiles& theFiles,
 {
   return ::PutFilesToStream("",theFiles,theFileNames,0);
 }
+#else
 
-//============================================================================
-// function : PutStreamToFile
-// purpose  : converts the stream "theStream" to the files
-//============================================================================
-SALOMEDS_Tool::ListOfFiles
-SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream,
-                                const std::string& theToDirectory,
+SALOMEDSImpl_Tool::TMPFile*
+SALOMEDS_Tool::PutFilesToStreamImpl(const std::string& theFromDirectory,
+                                const ListOfFiles& theFiles,
                                 const int theNamesOnly)
 {
-  ListOfFiles aFiles;
+  ListOfFiles aFileNames(theFiles);
+  return ::PutFilesToStreamImp(theFromDirectory,theFiles,aFileNames,theNamesOnly);
+}
 
-  if(theStream.length() == 0)
-    return aFiles;
+SALOMEDSImpl_Tool::TMPFile*
+SALOMEDS_Tool::PutFilesToStreamImpl(const ListOfFiles& theFiles,
+                                const ListOfFiles& theFileNames)
+{
+  return ::PutFilesToStreamImp("",theFiles,theFileNames,0);
+}
+#endif
 
-  //Get a temporary directory for saving a file
-  std::string aTmpDir = theToDirectory;
-  unsigned char *aBuffer = (unsigned char*)theStream.NP_data();
+namespace  {
+  template <typename TMPFile>
 
-  if(aBuffer == NULL)
-    return aFiles;
+  SALOMEDS_Tool::ListOfFiles  PutStreamToFiles(const TMPFile& theStream,
+                                               const std::string& theToDirectory,
+                                               const int theNamesOnly)
+  {
+    SALOMEDS_Tool::ListOfFiles aFiles;
+
+    if(theStream.length() == 0)
+      return aFiles;
+
+    //Get a temporary directory for saving a file
+    std::string aTmpDir = theToDirectory;
+    unsigned char *aBuffer = (unsigned char*)theStream.NP_data();
+
+    if(aBuffer == NULL)
+      return aFiles;
 
-  long aFileSize, aCurrentPos = 4;
-  int i, aFileNameSize, aNbFiles = 0;
+    long aFileSize, aCurrentPos = 4;
+    int i, aFileNameSize, aNbFiles = 0;
 
-  //Copy the number of files in the stream
-  memcpy(&aNbFiles, aBuffer, sizeof(int)); 
+    //Copy the number of files in the stream
+    memcpy(&aNbFiles, aBuffer, sizeof(int));
 
-  aFiles.reserve(aNbFiles);
+    aFiles.reserve(aNbFiles);
 
-  for(i=0; i<aNbFiles; i++) {
+    for(i=0; i<aNbFiles; i++) {
 
-    //Put a length of the file name to aFileNameSize
-    memcpy(&aFileNameSize, (aBuffer + aCurrentPos), ((sizeof(int) > 4) ? 4 : sizeof(int))); 
-    aCurrentPos += 4;
+      //Put a length of the file name to aFileNameSize
+      memcpy(&aFileNameSize, (aBuffer + aCurrentPos), ((sizeof(int) > 4) ? 4 : sizeof(int)));
+      aCurrentPos += 4;
 
-    char *aFileName = new char[aFileNameSize];
-    //Put a file name to aFileName
-    memcpy(aFileName, (aBuffer + aCurrentPos), aFileNameSize); 
+      char *aFileName = new char[aFileNameSize];
+      //Put a file name to aFileName
+      memcpy(aFileName, (aBuffer + aCurrentPos), aFileNameSize);
 #ifdef WIN32
-    for (int j = 0; j < strlen(aFileName); j++)
-    {
-      if (aFileName[j] == ':')
-        aFileName[j] = '_';
-    }
+      for (int j = 0; j < strlen(aFileName); j++)
+      {
+        if (aFileName[j] == ':')
+          aFileName[j] = '_';
+      }
 #endif
-    aCurrentPos += aFileNameSize;
-    //Put a length of the file to aFileSize
-    if (!theNamesOnly) {
-      memcpy(&aFileSize, (aBuffer + aCurrentPos), ((sizeof(long) > 8) ? 8 : sizeof(long)));
-      aCurrentPos += 8;    
-      
-      std::string aFullPath = aTmpDir + aFileName;
+      aCurrentPos += aFileNameSize;
+
+      //Put a length of the file to aFileSize
+      if (!theNamesOnly) {
+        memcpy(&aFileSize, (aBuffer + aCurrentPos), ((sizeof(long) > 8) ? 8 : sizeof(long)));
+        aCurrentPos += 8;
+
+        std::string aFullPath = aTmpDir + aFileName;
 #ifdef WIN32
 #ifdef UNICODE
-         std::ofstream aFile(Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
+        std::ofstream aFile(Kernel_Utils::utf8_decode_s(aFullPath).c_str(), std::ios::binary);
 #else
-      std::ofstream aFile(aFullPath.c_str(), std::ios::binary);
+        std::ofstream aFile(aFullPath.c_str(), std::ios::binary);
 #endif
 #else
-      std::ofstream aFile(aFullPath.c_str());
+        std::ofstream aFile(aFullPath.c_str());
 #endif
-         aFile.write((char *)(aBuffer + aCurrentPos), aFileSize);
-      aFile.close();  
-      aCurrentPos += aFileSize;
+        aFile.write((char *)(aBuffer + aCurrentPos), aFileSize);
+        aFile.close();
+        aCurrentPos += aFileSize;
+      }
+      aFiles.push_back(aFileName);
+      delete[] aFileName;
     }
-    aFiles.push_back(CORBA::string_dup(aFileName));
-    delete[] aFileName;
+
+    return aFiles;
+  }
+}
+
+#ifndef DISABLE_ORB
+//============================================================================
+// function : PutStreamToFile
+// purpose  : converts the stream "theStream" to the files
+//============================================================================
+SALOMEDS_Tool::ListOfFiles
+SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream,
+                                const std::string& theToDirectory,
+                                const int theNamesOnly)
+{
+  ListOfFiles aFiles0 = ::PutStreamToFiles(theStream, theToDirectory, theNamesOnly);
+
+  ListOfFiles aFiles;
+
+  for(unsigned i=0; i< aFiles0.size(); i++) {
+    aFiles.push_back(CORBA::string_dup(aFiles0[i].c_str()));
   }
 
   return aFiles;
 }
+#else
+
+SALOMEDS_Tool::ListOfFiles
+SALOMEDS_Tool::PutStreamToFilesImpl(const SALOMEDSImpl_Tool::TMPFile& theStream,
+                                const std::string& theToDirectory,
+                                const int theNamesOnly)
+{
+  return ::PutStreamToFiles(theStream, theToDirectory, theNamesOnly);
+}
+#endif
 
 //============================================================================
 // function : GetNameFromPath
@@ -438,6 +519,7 @@ std::string SALOMEDS_Tool::GetDirFromPath(const std::string& thePath) {
   return path;
 }
 
+#ifndef DISABLE_ORB
 //=======================================================================
 // name    : GetFlag
 // Purpose : Retrieve specified flaf from "AttributeFlags" attribute
@@ -525,5 +607,5 @@ void SALOMEDS_Tool::GetAllChildren( SALOMEDS::Study_var               theStudy,
     }
   }
 }
-
+#endif
 
index 62807ce8c154047c3ea13bd05eca73947db640fa..cc841cb998ec050b524c96975dc291905d3602c0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE, CSGROUP
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #define __SALOMEDS_Tool_H__
 
 #include <string>
-#include <list> 
+#include <list>
 #include <vector>
 #include <stdlib.h>
 
 
 // IDL headers
+#include "SALOMEDSImpl_TMPFile.hxx"
+#ifndef DISABLE_ORB
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(SALOMEDS)
+#endif
 
 #ifdef WIN32
 # if defined TOOLSDS_EXPORTS
 # define TOOLSDS_EXPORT
 #endif
 
-class TOOLSDS_EXPORT SALOMEDS_Tool                                
+#ifdef DISABLE_ORB
+namespace SALOMEDSImpl_Tool {
+
+ TOOLSDS_EXPORT class TMPFile: public SALOMEDSImpl_TMPFile
+  {
+  public:
+    explicit TMPFile(long buffSize, unsigned char* streamBuff, bool isRelative):
+      _myStreamBuff(streamBuff), _myBuffSize(buffSize), _myIsRelative(isRelative)
+    {}
+    inline long  length() const
+    {return _myBuffSize;}
+
+    inline unsigned char* NP_data() const
+    {return _myStreamBuff;}
+
+    inline bool IsRelative() const
+    {return _myIsRelative;}
+    TMPFile() = default;
+    ~TMPFile() = default;
+
+  private:
+    unsigned char* _myStreamBuff;
+    unsigned _myBuffSize;
+    bool _myIsRelative;
+
+    virtual size_t Size() override
+    {return 0;}
+    virtual TOctet& Get(size_t) override
+    {return _myStreamBuff[0];}
+  };
+}
+#endif
+
+class TOOLSDS_EXPORT SALOMEDS_Tool
 {
 public:
 
   typedef std::vector<std::string> ListOfFiles;
+
   // Returns the unique temporary directory, that is defined in SALOME_TMP_DIR if this variable is set
   // otherwise return /tmp/something/ for Unix or c:\something\ for WIN32
   static std::string GetTmpDir();
 
+
   // Removes files which are in <theDirectory>, the files for deletion are listed in <theFiles>
   // if <IsDirDeleted> is true <theDirectory> is also deleted if it is empty
   static void RemoveTemporaryFiles(const std::string& theDirectory,
                                    const ListOfFiles& theFiles,
                                    const bool IsDirDeleted);
 
+  // Returns the name by the path
+  // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "doc1"
+  static std::string GetNameFromPath(const std::string& thePath);
+
+  // Returns the directory by the path
+  // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "/tmp/aaa"
+  static std::string GetDirFromPath(const std::string& thePath);
+
+  #ifndef DISABLE_ORB
   // Converts files listed in <theFiles> which are in <theFromDirectory> into a byte sequence TMPFile
-  static SALOMEDS::TMPFile* PutFilesToStream(const std::string& theFromDirectory, 
+  static SALOMEDS::TMPFile* PutFilesToStream(const std::string& theFromDirectory,
                                              const ListOfFiles& theFiles,
                                              const int theNamesOnly = 0);
 
   // Converts files listed in <theFiles> which will be named as pointed in the <theFileNames> into a byte sequence TMPFile
   static SALOMEDS::TMPFile* PutFilesToStream(const ListOfFiles& theFiles,
                                              const ListOfFiles& theFileNames);
-
   // Converts a byte sequence <theStream> to files and places them in <theToDirectory>
   static ListOfFiles PutStreamToFiles(const SALOMEDS::TMPFile& theStream,
                                                  const std::string& theToDirectory,
                                                  const int theNamesOnly = 0);
 
-  // Returns the name by the path
-  // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "doc1"
-  static std::string GetNameFromPath(const std::string& thePath);
-
-  // Returns the directory by the path
-  // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "/tmp/aaa"
-  static std::string GetDirFromPath(const std::string& thePath);
-
   // Retrieves specified flaf from "AttributeFlags" attribute
   static bool GetFlag( const int             theFlag,
                        SALOMEDS::Study_var   theStudy,
@@ -103,7 +139,18 @@ public:
   static void GetAllChildren( SALOMEDS::Study_var               theStudy,
                               SALOMEDS::SObject_var             theObj,
                               std::list<SALOMEDS::SObject_var>& theList );
+#else
+  static SALOMEDSImpl_Tool::TMPFile* PutFilesToStreamImpl(const std::string& theFromDirectory,
+                                             const ListOfFiles& theFiles,
+                                             const int theNamesOnly = 0);
+
+  static SALOMEDSImpl_Tool::TMPFile* PutFilesToStreamImpl(const ListOfFiles& theFiles,
+                                             const ListOfFiles& theFileNames);
 
+  static ListOfFiles PutStreamToFilesImpl(const SALOMEDSImpl_Tool::TMPFile& theStream,
+                                                 const std::string& theToDirectory,
+                                                 const int theNamesOnly = 0);
+#endif
 };
 #endif