src/ENGINE/VISU_Engine_i.hh

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00003 // 
00004 //  This library is free software; you can redistribute it and/or 
00005 //  modify it under the terms of the GNU Lesser General Public 
00006 //  License as published by the Free Software Foundation; either 
00007 //  version 2.1 of the License. 
00008 // 
00009 //  This library is distributed in the hope that it will be useful, 
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 //  Lesser General Public License for more details. 
00013 // 
00014 //  You should have received a copy of the GNU Lesser General Public 
00015 //  License along with this library; if not, write to the Free Software 
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00017 // 
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 
00020 #ifndef __VISU_ENGINE_I_H__
00021 #define __VISU_ENGINE_I_H__
00022 
00023 // IDL headers
00024 #include "SALOMEconfig.h"
00025 #include CORBA_SERVER_HEADER(VISU_Gen)
00026 #include CORBA_SERVER_HEADER(MED)
00027 #include CORBA_SERVER_HEADER(SALOMEDS)
00028 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00029 
00030 #include "SALOME_Component_i.hxx"
00031 
00032 namespace VISU{
00033   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
00034                public virtual ::Engines_Component_i
00035   {
00036     VISU_Gen_var myVisuGen;
00037     VISU_Gen_i();
00038     VISU_Gen_i(const VISU::VISU_Gen_i &);
00039   public:
00040     VISU_Gen_i(CORBA::ORB_ptr orb,
00041             PortableServer::POA_ptr poa,
00042             PortableServer::ObjectId * contId, 
00043             const char *instanceName, 
00044             const char *interfaceName);
00045     virtual ~VISU_Gen_i();
00046 
00047     virtual char* GetID();
00048     virtual VISU::VISUType GetType();
00049 
00050     virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
00051     virtual SALOMEDS::Study_ptr GetCurrentStudy();
00052 
00053     virtual ViewManager_ptr GetViewManager();
00054 
00055     virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
00056     virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
00057 
00058     //Create Result
00059     virtual Result_ptr ImportFile(const char* theFileName);
00060     virtual Result_ptr CreateResult(const char* theFileName);
00061     virtual Result_ptr CopyAndImportFile(const char* theFileName);
00062     virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
00063     virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
00064 
00065     //Create Presentation Of Submeshes
00066     virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
00067     virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
00068                          VISU::Entity theEntity, const char* theFamilyName);
00069     virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
00070 
00071     //Rename Presentation Of Submeshes
00072     virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
00073                          VISU::Entity theEntity, const char* theNewName);
00074     virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00075                          const char* theFamilyName, const char* theNewName);
00076     virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
00077                          const char* theGroupName, const char* theNewName);
00078 
00079     //Create Presentation Of Results
00080     virtual ScalarMap_ptr ScalarMapOnField
00081                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00082                            const char* theFieldName, CORBA::Double theIteration);
00083     virtual GaussPoints_ptr GaussPointsOnField
00084                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00085                            const char* theFieldName, CORBA::Double theIteration);
00086     virtual DeformedShape_ptr DeformedShapeOnField
00087                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00088                            const char* theFieldName, CORBA::Double theIteration);
00089     virtual Vectors_ptr VectorsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00090                            const char* theFieldName, CORBA::Double theIteration);
00091     virtual IsoSurfaces_ptr IsoSurfacesOnField
00092                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00093                            const char* theFieldName, CORBA::Double theIteration);
00094     virtual CutPlanes_ptr CutPlanesOnField
00095                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00096                            const char* theFieldName, CORBA::Double theIteration);
00097     virtual CutLines_ptr CutLinesOnField
00098                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00099                            const char* theFieldName, CORBA::Double theIteration);
00100     virtual StreamLines_ptr StreamLinesOnField
00101                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00102                            const char* theFieldName, CORBA::Double theIteration);
00103     virtual Plot3D_ptr Plot3DOnField  (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00104                            const char* theFieldName, CORBA::Double theIteration);
00105     virtual ScalarMapOnDeformedShape_ptr ScalarMapOnDeformedShapeOnField
00106                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
00107                            const char* theFieldName, CORBA::Double theIteration);
00108     //Create Digital Presentation
00109     virtual Table_ptr CreateTable(const char* theTableEntry);
00110     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
00111     virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
00112     virtual Container_ptr CreateContainer();
00113     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
00114     
00115     virtual void DeleteResult(Result_ptr theResult);
00116     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
00117 
00118     // inherited methods from SALOMEDS::Driver
00119     virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
00120                         const char* theURL,
00121                         bool isMultiFile);
00122     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
00123                           const char* theURL,
00124                           bool isMultiFile);
00125     virtual bool Load(SALOMEDS::SComponent_ptr,
00126                 const SALOMEDS::TMPFile &,
00127                 const char* theURL,
00128                 bool isMultiFile);
00129     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
00130                   const SALOMEDS::TMPFile &,
00131                   const char* theURL,
00132                   bool isMultiFile);
00133 
00134     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); 
00135 
00136     virtual char* ComponentDataType();
00137 
00138     virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
00139                           const char* IORString,
00140                           CORBA::Boolean isMultiFile,
00141                           CORBA::Boolean isASCII);
00142     virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
00143                           const char* aLocalPersistentID,
00144                           CORBA::Boolean isMultiFile,
00145                           CORBA::Boolean isASCII);
00146 
00147     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
00148     virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
00149                                            SALOMEDS::SObject_ptr theSObject,
00150                                      CORBA::Object_ptr theObject,
00151                                      const char* theName) throw (SALOME::SALOME_Exception);
00152 
00153     CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
00154     SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
00155     CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
00156     SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
00157                         CORBA::Long theObjectID,
00158                         SALOMEDS::SObject_ptr theObject);
00159 
00160     // inherited methods from Engines::Component
00161     virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
00162                                    CORBA::Boolean theIsPublished,
00163                                 CORBA::Boolean& theIsValidScript);   
00164   };
00165 };
00166 
00167 
00168 #endif