Salome HOME
0021196: [CEA 456] Integration and merge modification for debian packages
[modules/visu.git] / src / ENGINE / VISU_Engine_i.hh
index d9c665ac349c8dd55080c6cd4ebfb27cfe96ac1b..70deb92975eb1adf262075048f13bf90d4243c1f 100644 (file)
@@ -1,21 +1,24 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  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
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef __VISU_ENGINE_I_H__
 #define __VISU_ENGINE_I_H__
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(VISU_Gen)
 #include CORBA_SERVER_HEADER(MED)
+#include CORBA_SERVER_HEADER(SALOME_Session)
 #include CORBA_SERVER_HEADER(SALOMEDS)
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
 #include "SALOME_Component_i.hxx"
 
-namespace VISU{
+namespace VISU
+{
   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
                     public virtual ::Engines_Component_i
   {
@@ -37,7 +42,8 @@ namespace VISU{
     VISU_Gen_i();
     VISU_Gen_i(const VISU::VISU_Gen_i &);
   public:
-    VISU_Gen_i(CORBA::ORB_ptr orb,
+    VISU_Gen_i(SALOME::Session_ptr session,
+              CORBA::ORB_ptr orb,
               PortableServer::POA_ptr poa,
               PortableServer::ObjectId * contId, 
               const char *instanceName, 
@@ -52,8 +58,10 @@ namespace VISU{
 
     virtual ViewManager_ptr GetViewManager();
 
-    virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
-    virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName );
+    virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName,
+                                               bool theFirstStrAsTitle = false);
+    virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable,
+                                             const char* theFileName);
 
     //Create Result
     virtual Result_ptr ImportFile(const char* theFileName);
@@ -63,34 +71,129 @@ namespace VISU{
     virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
 
     //Create Presentation Of Submeshes
-    virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
-    virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName, 
+    virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName,
+                                  VISU::Entity theEntity);
+    virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
                                        VISU::Entity theEntity, const char* theFamilyName);
-    virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
-
-    virtual ScalarMap_ptr ScalarMapOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                          const char* theFieldName, CORBA::Double theIteration);
-    virtual GaussPoints_ptr GaussPointsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                              const char* theFieldName, CORBA::Double theIteration);
-    virtual DeformedShape_ptr DeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                                  const char* theFieldName, CORBA::Double theIteration);
-    virtual Vectors_ptr VectorsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                      const char* theFieldName, CORBA::Double theIteration);
-    virtual IsoSurfaces_ptr IsoSurfacesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                              const char* theFieldName, CORBA::Double theIteration);
-    virtual CutPlanes_ptr CutPlanesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                          const char* theFieldName, CORBA::Double theIteration);
-    virtual CutLines_ptr CutLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                        const char* theFieldName, CORBA::Double theIteration);
-    virtual StreamLines_ptr StreamLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                              const char* theFieldName, CORBA::Double theIteration);
-    virtual Plot3D_ptr Plot3DOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                    const char* theFieldName, CORBA::Double theIteration);
+    virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName,
+                               const char* theGroupName);
+
+    //Rename Presentation Of Submeshes
+    virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
+                                    VISU::Entity theEntity, const char* theNewName);
+    virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName,
+                                     VISU::Entity theEntity,
+                                    const char* theFamilyName, const char* theNewName);
+    virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
+                                    const char* theGroupName, const char* theNewName);
+
+    //Create Presentation Of Results
+    virtual 
+    ScalarMap_ptr
+    ScalarMapOnField(Result_ptr theResult, 
+                    const char* theMeshName, 
+                    VISU::Entity theEntity,
+                    const char* theFieldName, 
+                    CORBA::Long theIteration);
+
+    virtual 
+    GaussPoints_ptr 
+    GaussPointsOnField(Result_ptr theResult, 
+                      const char* theMeshName, 
+                      VISU::Entity theEntity,
+                      const char* theFieldName, 
+                      CORBA::Long theIteration);
+
+    virtual 
+    DeformedShape_ptr
+    DeformedShapeOnField(Result_ptr theResult, 
+                        const char* theMeshName, 
+                        VISU::Entity theEntity,
+                        const char* theFieldName, 
+                        CORBA::Long theIteration);
+
+    virtual 
+    Vectors_ptr
+    VectorsOnField(Result_ptr theResult, 
+                  const char* theMeshName, 
+                  VISU::Entity theEntity,
+                  const char* theFieldName, 
+                  CORBA::Long theIteration);
+
+    virtual
+    IsoSurfaces_ptr
+    IsoSurfacesOnField(Result_ptr theResult, 
+                      const char* theMeshName, 
+                      VISU::Entity theEntity,
+                      const char* theFieldName, 
+                      CORBA::Long theIteration);
+
+    virtual
+    CutPlanes_ptr
+    CutPlanesOnField(Result_ptr theResult, 
+                    const char* theMeshName, 
+                    VISU::Entity theEntity,
+                    const char* theFieldName, 
+                    CORBA::Long theIteration);
+
+    virtual
+    CutLines_ptr
+    CutLinesOnField(Result_ptr theResult, 
+                   const char* theMeshName, 
+                   VISU::Entity theEntity,
+                   const char* theFieldName, 
+                   CORBA::Long theIteration);
+
+    virtual
+    CutSegment_ptr
+    CutSegmentOnField(Result_ptr theResult, 
+                     const char* theMeshName, 
+                     VISU::Entity theEntity,
+                     const char* theFieldName, 
+                     CORBA::Long theIteration);
+
+    virtual
+    StreamLines_ptr 
+    StreamLinesOnField(Result_ptr theResult, 
+                      const char* theMeshName, 
+                      VISU::Entity theEntity,
+                      const char* theFieldName, 
+                      CORBA::Long theIteration);
+
+    virtual
+    Plot3D_ptr
+    Plot3DOnField(Result_ptr theResult, 
+                 const char* theMeshName, 
+                 VISU::Entity theEntity,
+                 const char* theFieldName, 
+                 CORBA::Long theIteration);
+
+    //This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
+    virtual
+    DeformedShapeAndScalarMap_ptr
+    ScalarMapOnDeformedShapeOnField(Result_ptr theResult, 
+                                   const char* theMeshName, 
+                                   VISU::Entity theEntity,
+                                   const char* theFieldName, 
+                                   CORBA::Long theIteration);
+
+    virtual
+    DeformedShapeAndScalarMap_ptr
+    DeformedShapeAndScalarMapOnField(Result_ptr theResult, 
+                                    const char* theMeshName, 
+                                    VISU::Entity theEntity,
+                                    const char* theFieldName, 
+                                    CORBA::Long theIteration);
+    
     //Create Digital Presentation
     virtual Table_ptr CreateTable(const char* theTableEntry);
     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
+    virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
+    virtual Curve_ptr CreateCurveWithZExt(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow,
+                                          CORBA::Boolean theIsV2);
     virtual Container_ptr CreateContainer();
     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
+    virtual Evolution_ptr CreateEvolution(XYPlot_ptr theXYPlot);
     
     virtual void DeleteResult(Result_ptr theResult);
     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
@@ -123,7 +226,7 @@ namespace VISU{
                                         const char* aLocalPersistentID,
                                         CORBA::Boolean isMultiFile,
                                         CORBA::Boolean isASCII);
-    
+
     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
     virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
                                                 SALOMEDS::SObject_ptr theSObject,
@@ -142,8 +245,45 @@ namespace VISU{
                                         CORBA::Boolean theIsPublished,
                                         CORBA::Boolean& theIsValidScript);   
 
+    virtual
+    VISU::ColoredPrs3dCache_ptr
+    GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
+    
+
+
+    virtual CORBA::Long CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                           CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                           CORBA::Boolean isAuto, const char* name);
+
+    virtual void EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                  CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                  CORBA::Boolean isAuto, const char* name);
+
+    /* Returns clipping plane by its Id */
+    virtual VISU::ClippingPlane* GetClippingPlane(CORBA::Long id);
+    
+    /* Deletes clipping plane by its Id */
+    virtual CORBA::Boolean DeleteClippingPlane(CORBA::Long id);
+    
+    /* Applyes a clipping plane with Id to presentation thePrs */
+    virtual CORBA::Boolean ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Detaches a clipping plane with Id from presentation thePrs */
+    virtual CORBA::Boolean DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Get number of clipping planes */
+    virtual CORBA::Long GetClippingPlanesNb();
+
+    /* Convert a set of VTK files to the MED file */
+    virtual CORBA::Boolean VTK2MED( const VISU::string_array& theVTKFiles,
+                                    const char* theMEDFile,
+                                    const char* theMeshName,
+                                    const VISU::double_array& theTStamps );
+
+    /* Load texture from file */
+    virtual CORBA::Long LoadTexture(const char* theTextureFile);
   };
 };
 
 
-#endif 
+#endif