Version: 6.3.1

src/ENGINE/VISU_Engine_i.hh

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef __VISU_ENGINE_I_H__
00024 #define __VISU_ENGINE_I_H__
00025 
00026 // IDL headers
00027 #include "SALOMEconfig.h"
00028 #include CORBA_SERVER_HEADER(VISU_Gen)
00029 #include CORBA_SERVER_HEADER(MED)
00030 #include CORBA_SERVER_HEADER(SALOME_Session)
00031 #include CORBA_SERVER_HEADER(SALOMEDS)
00032 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00033 
00034 #include "SALOME_Component_i.hxx"
00035 
00036 namespace VISU
00037 {
00038   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
00039                public virtual ::Engines_Component_i
00040   {
00041     VISU_Gen_var myVisuGen;
00042     VISU_Gen_i();
00043     VISU_Gen_i(const VISU::VISU_Gen_i &);
00044   public:
00045     VISU_Gen_i(SALOME::Session_ptr session,
00046             CORBA::ORB_ptr orb,
00047             PortableServer::POA_ptr poa,
00048             PortableServer::ObjectId * contId, 
00049             const char *instanceName, 
00050             const char *interfaceName);
00051     virtual ~VISU_Gen_i();
00052 
00053     virtual char* GetID();
00054     virtual VISU::VISUType GetType();
00055 
00056     virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
00057     virtual SALOMEDS::Study_ptr GetCurrentStudy();
00058 
00059     virtual ViewManager_ptr GetViewManager();
00060 
00061     virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName,
00062                                                bool theFirstStrAsTitle = false);
00063     virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable,
00064                                              const char* theFileName);
00065 
00066     //Create Result
00067     virtual Result_ptr ImportFile(const char* theFileName);
00068     virtual Result_ptr CreateResult(const char* theFileName);
00069     virtual Result_ptr CopyAndImportFile(const char* theFileName);
00070     virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
00071     virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
00072 
00073     //Create Presentation Of Submeshes
00074     virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName,
00075                                   VISU::Entity theEntity);
00076     virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
00077                          VISU::Entity theEntity, const char* theFamilyName);
00078     virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName,
00079                                const char* theGroupName);
00080 
00081     //Rename Presentation Of Submeshes
00082     virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
00083                          VISU::Entity theEntity, const char* theNewName);
00084     virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName,
00085                                      VISU::Entity theEntity,
00086                          const char* theFamilyName, const char* theNewName);
00087     virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
00088                          const char* theGroupName, const char* theNewName);
00089 
00090     //Create Presentation Of Results
00091     virtual 
00092     ScalarMap_ptr
00093     ScalarMapOnField(Result_ptr theResult, 
00094                const char* theMeshName, 
00095                VISU::Entity theEntity,
00096                const char* theFieldName, 
00097                CORBA::Long theIteration);
00098 
00099     virtual 
00100     GaussPoints_ptr 
00101     GaussPointsOnField(Result_ptr theResult, 
00102                  const char* theMeshName, 
00103                  VISU::Entity theEntity,
00104                  const char* theFieldName, 
00105                  CORBA::Long theIteration);
00106 
00107     virtual 
00108     DeformedShape_ptr
00109     DeformedShapeOnField(Result_ptr theResult, 
00110                 const char* theMeshName, 
00111                 VISU::Entity theEntity,
00112                 const char* theFieldName, 
00113                 CORBA::Long theIteration);
00114 
00115     virtual 
00116     Vectors_ptr
00117     VectorsOnField(Result_ptr theResult, 
00118              const char* theMeshName, 
00119              VISU::Entity theEntity,
00120              const char* theFieldName, 
00121              CORBA::Long theIteration);
00122 
00123     virtual
00124     IsoSurfaces_ptr
00125     IsoSurfacesOnField(Result_ptr theResult, 
00126                  const char* theMeshName, 
00127                  VISU::Entity theEntity,
00128                  const char* theFieldName, 
00129                  CORBA::Long theIteration);
00130 
00131     virtual
00132     CutPlanes_ptr
00133     CutPlanesOnField(Result_ptr theResult, 
00134                const char* theMeshName, 
00135                VISU::Entity theEntity,
00136                const char* theFieldName, 
00137                CORBA::Long theIteration);
00138 
00139     virtual
00140     CutLines_ptr
00141     CutLinesOnField(Result_ptr theResult, 
00142               const char* theMeshName, 
00143               VISU::Entity theEntity,
00144               const char* theFieldName, 
00145               CORBA::Long theIteration);
00146 
00147     virtual
00148     CutSegment_ptr
00149     CutSegmentOnField(Result_ptr theResult, 
00150                 const char* theMeshName, 
00151                 VISU::Entity theEntity,
00152                 const char* theFieldName, 
00153                 CORBA::Long theIteration);
00154 
00155     virtual
00156     StreamLines_ptr 
00157     StreamLinesOnField(Result_ptr theResult, 
00158                  const char* theMeshName, 
00159                  VISU::Entity theEntity,
00160                  const char* theFieldName, 
00161                  CORBA::Long theIteration);
00162 
00163     virtual
00164     Plot3D_ptr
00165     Plot3DOnField(Result_ptr theResult, 
00166             const char* theMeshName, 
00167             VISU::Entity theEntity,
00168             const char* theFieldName, 
00169             CORBA::Long theIteration);
00170 
00171     //This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
00172     virtual
00173     DeformedShapeAndScalarMap_ptr
00174     ScalarMapOnDeformedShapeOnField(Result_ptr theResult, 
00175                         const char* theMeshName, 
00176                         VISU::Entity theEntity,
00177                         const char* theFieldName, 
00178                         CORBA::Long theIteration);
00179 
00180     virtual
00181     DeformedShapeAndScalarMap_ptr
00182     DeformedShapeAndScalarMapOnField(Result_ptr theResult, 
00183                          const char* theMeshName, 
00184                          VISU::Entity theEntity,
00185                          const char* theFieldName, 
00186                          CORBA::Long theIteration);
00187     
00188     //Create Digital Presentation
00189     virtual Table_ptr CreateTable(const char* theTableEntry);
00190     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
00191     virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
00192     virtual Curve_ptr CreateCurveWithZExt(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow,
00193                                           CORBA::Boolean theIsV2);
00194     virtual Container_ptr CreateContainer();
00195     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
00196     virtual Evolution_ptr CreateEvolution(XYPlot_ptr theXYPlot);
00197     
00198     virtual void DeleteResult(Result_ptr theResult);
00199     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
00200 
00201     // inherited methods from SALOMEDS::Driver
00202     virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
00203                         const char* theURL,
00204                         bool isMultiFile);
00205     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
00206                           const char* theURL,
00207                           bool isMultiFile);
00208     virtual bool Load(SALOMEDS::SComponent_ptr,
00209                 const SALOMEDS::TMPFile &,
00210                 const char* theURL,
00211                 bool isMultiFile);
00212     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
00213                   const SALOMEDS::TMPFile &,
00214                   const char* theURL,
00215                   bool isMultiFile);
00216 
00217     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); 
00218 
00219     virtual char* ComponentDataType();
00220 
00221     virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
00222                           const char* IORString,
00223                           CORBA::Boolean isMultiFile,
00224                           CORBA::Boolean isASCII);
00225     virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
00226                           const char* aLocalPersistentID,
00227                           CORBA::Boolean isMultiFile,
00228                           CORBA::Boolean isASCII);
00229 
00230     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
00231     virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
00232                                            SALOMEDS::SObject_ptr theSObject,
00233                                      CORBA::Object_ptr theObject,
00234                                      const char* theName) throw (SALOME::SALOME_Exception);
00235 
00236     CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
00237     SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
00238     CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
00239     SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
00240                         CORBA::Long theObjectID,
00241                         SALOMEDS::SObject_ptr theObject);
00242 
00243     // inherited methods from Engines::Component
00244     virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
00245                                    CORBA::Boolean theIsPublished,
00246                           CORBA::Boolean theIsMultiFile,
00247                                 CORBA::Boolean& theIsValidScript);   
00248 
00249     virtual
00250     VISU::ColoredPrs3dCache_ptr
00251     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
00252     
00253 
00254 
00255     virtual CORBA::Long CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
00256                              CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
00257                              CORBA::Boolean isAuto, const char* name);
00258 
00259     virtual void EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
00260                        CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
00261                        CORBA::Boolean isAuto, const char* name);
00262 
00263     /* Returns clipping plane by its Id */
00264     virtual VISU::ClippingPlane* GetClippingPlane(CORBA::Long id);
00265     
00266     /* Deletes clipping plane by its Id */
00267     virtual CORBA::Boolean DeleteClippingPlane(CORBA::Long id);
00268     
00269     /* Applyes a clipping plane with Id to presentation thePrs */
00270     virtual CORBA::Boolean ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
00271     
00272     /* Detaches a clipping plane with Id from presentation thePrs */
00273     virtual CORBA::Boolean DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
00274     
00275     /* Get number of clipping planes */
00276     virtual CORBA::Long GetClippingPlanesNb();
00277 
00278     /* Convert a set of VTK files to the MED file */
00279     virtual CORBA::Boolean VTK2MED( const VISU::string_array& theVTKFiles,
00280                                     const char* theMEDFile,
00281                                     const char* theMeshName,
00282                                     const VISU::double_array& theTStamps );
00283 
00284     /* Load texture from file */
00285     virtual CORBA::Long LoadTexture(const char* theTextureFile);
00286   };
00287 };
00288 
00289 
00290 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS