Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.hxx
index 0a6e010612ea4e19d56bcdb0ce3d3db204a52f37..89cf79ca77690e5fc39133f8387eebee1f3a491e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Gen_i.hxx
 //  Author : Paul RASCLE, EDF
@@ -176,7 +177,7 @@ public:
   // *****************************************
   // Set a new Mesh object name
   void SetName(const char* theIOR,
-              const char* theName);
+               const char* theName);
 
   //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
   void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
@@ -266,9 +267,9 @@ public:
    * Return mesh preview structure
    */
   SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh,
-                                       GEOM::GEOM_Object_ptr theSubObject,
-                                       SMESH::Dimension      theDimension,
-                                       SMESH::long_array&    theShapesId )
+                                        GEOM::GEOM_Object_ptr theSubObject,
+                                        SMESH::Dimension      theDimension,
+                                        SMESH::long_array&    theShapesId )
     throw ( SALOME::SALOME_Exception );
 
   // Returns errors of hypotheses definintion
@@ -294,54 +295,61 @@ public:
 
   // Return geometrical object the given element is built on. Don't publish it in study.
   GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
-                                                  CORBA::Long            theElementID)
+                                                   CORBA::Long            theElementID)
     throw ( SALOME::SALOME_Exception );
 
   // Concatenate the given meshes into one mesh
   SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray, 
-                                         CORBA::Boolean           theUniteIdenticalGroups, 
-                                         CORBA::Boolean           theMergeNodesAndElements, 
-                                         CORBA::Double            theMergeTolerance,
-                                         CORBA::Boolean           theCommonGroups)
+                                          CORBA::Boolean           theUniteIdenticalGroups, 
+                                          CORBA::Boolean           theMergeNodesAndElements, 
+                                          CORBA::Double            theMergeTolerance,
+                                          CORBA::Boolean           theCommonGroups)
     throw ( SALOME::SALOME_Exception );
 
   // Concatenate the given meshes into one mesh
   SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray, 
-                                   CORBA::Boolean           theUniteIdenticalGroups, 
-                                   CORBA::Boolean           theMergeNodesAndElements, 
-                                   CORBA::Double            theMergeTolerance)
+                                    CORBA::Boolean           theUniteIdenticalGroups, 
+                                    CORBA::Boolean           theMergeNodesAndElements, 
+                                    CORBA::Double            theMergeTolerance)
     throw ( SALOME::SALOME_Exception );
 
   // Concatenate the given meshes into one mesh
   // Create the groups of all elements from initial meshes
   SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray, 
-                                             CORBA::Boolean           theUniteIdenticalGroups, 
-                                             CORBA::Boolean           theMergeNodesAndElements, 
-                                             CORBA::Double            theMergeTolerance)
+                                              CORBA::Boolean           theUniteIdenticalGroups, 
+                                              CORBA::Boolean           theMergeNodesAndElements, 
+                                              CORBA::Double            theMergeTolerance)
     throw ( SALOME::SALOME_Exception );
 
+  // Get MED version of the file by its name
+  CORBA::Boolean GetMEDVersion(const char* theFileName,
+                               SMESH::MED_VERSION& theVersion);
+
+  // Get names of meshes defined in file with the specified name
+  SMESH::string_array* GetMeshNames(const char* theFileName);
+
   // ****************************************************
   // Interface inherited methods (from SALOMEDS::Driver)
   // ****************************************************
 
   // Save SMESH data
   SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
-                        const char*              theURL,
-                        bool                     isMultiFile );
+                         const char*              theURL,
+                         bool                     isMultiFile );
   // Load SMESH data
   bool Load( SALOMEDS::SComponent_ptr theComponent,
-            const SALOMEDS::TMPFile& theStream,
-            const char*              theURL,
-            bool                     isMultiFile );
+             const SALOMEDS::TMPFile& theStream,
+             const char*              theURL,
+             bool                     isMultiFile );
   // Save SMESH data in ASCII format
   SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent,
-                               const char*              theURL,
-                               bool                     isMultiFile );
+                                const char*              theURL,
+                                bool                     isMultiFile );
   // Load SMESH data in ASCII format
   bool LoadASCII( SALOMEDS::SComponent_ptr theComponent,
-                 const SALOMEDS::TMPFile& theStream,
-                 const char*              theURL,
-                 bool                     isMultiFile );
+                  const SALOMEDS::TMPFile& theStream,
+                  const char*              theURL,
+                  bool                     isMultiFile );
 
   // Create filter manager
   SMESH::FilterManager_ptr CreateFilterManager();
@@ -357,22 +365,22 @@ public:
     
   // Transform data from transient form to persistent
   char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject,
-                               const char*           IORString,
-                               CORBA::Boolean        isMultiFile,
-                               CORBA::Boolean        isASCII );
+                                const char*           IORString,
+                                CORBA::Boolean        isMultiFile,
+                                CORBA::Boolean        isASCII );
   // Transform data from persistent form to transient
   char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject,
-                               const char*           aLocalPersistentID,
-                               CORBA::Boolean        isMultiFile,
-                               CORBA::Boolean        isASCII );
+                                const char*           aLocalPersistentID,
+                                CORBA::Boolean        isMultiFile,
+                                CORBA::Boolean        isASCII );
 
   // Returns true if object can be published in the study
   bool CanPublishInStudy( CORBA::Object_ptr theIOR );
   // Publish object in the study
   SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr   theStudy,
-                                       SALOMEDS::SObject_ptr theSObject,
-                                       CORBA::Object_ptr     theObject,
-                                       const char*           theName ) 
+                                        SALOMEDS::SObject_ptr theSObject,
+                                        CORBA::Object_ptr     theObject,
+                                        const char*           theName ) 
     throw ( SALOME::SALOME_Exception );
 
   // Copy-paste methods - returns true if object can be copied to the clipboard
@@ -383,8 +391,8 @@ public:
   CORBA::Boolean CanPaste( const char* theComponentName, CORBA::Long theObjectID ) { return false; }
   // Copy-paste methods - paste object from the clipboard
   SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& theStream,
-                                  CORBA::Long              theObjectID,
-                                  SALOMEDS::SObject_ptr    theObject ) {
+                                   CORBA::Long              theObjectID,
+                                   SALOMEDS::SObject_ptr    theObject ) {
     SALOMEDS::SObject_var aResultSO;
     return aResultSO._retn();
   }
@@ -394,8 +402,8 @@ public:
   // ============
 
   virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, 
-                                      CORBA::Boolean isPublished, 
-                                      CORBA::Boolean& isValidScript);
+                                       CORBA::Boolean isPublished, 
+                                       CORBA::Boolean& isValidScript);
 
   void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString);
 
@@ -452,7 +460,7 @@ public:
                                         SMESH::SMESH_Mesh_ptr    theMesh,
                                         SMESH::SMESH_subMesh_ptr theSubMesh,
                                         GEOM::GEOM_Object_ptr    theShapeObject,
-                                       const char*              theName = 0);
+                                        const char*              theName = 0);
   SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr    theStudy,
                                       SMESH::SMESH_Mesh_ptr  theMesh,
                                       SMESH::SMESH_GroupBase_ptr theGroup,