1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
20 #ifndef __VISU_ENGINE_I_H__
21 #define __VISU_ENGINE_I_H__
24 #include "SALOMEconfig.h"
25 #include CORBA_SERVER_HEADER(VISU_Gen)
26 #include CORBA_SERVER_HEADER(MED)
27 #include CORBA_SERVER_HEADER(SALOMEDS)
28 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
30 #include "SALOME_Component_i.hxx"
33 class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
34 public virtual ::Engines_Component_i
36 VISU_Gen_var myVisuGen;
38 VISU_Gen_i(const VISU::VISU_Gen_i &);
40 VISU_Gen_i(CORBA::ORB_ptr orb,
41 PortableServer::POA_ptr poa,
42 PortableServer::ObjectId * contId,
43 const char *instanceName,
44 const char *interfaceName);
45 virtual ~VISU_Gen_i();
47 virtual char* GetID();
48 virtual VISU::VISUType GetType();
50 virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
51 virtual SALOMEDS::Study_ptr GetCurrentStudy();
53 virtual ViewManager_ptr GetViewManager();
55 virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
56 virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName );
59 virtual Result_ptr ImportFile(const char* theFileName);
60 virtual Result_ptr CopyAndImportFile(const char* theFileName);
61 virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
62 virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
64 //Create Presentation Of Submeshes
65 virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
66 virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
67 VISU::Entity theEntity, const char* theFamilyName);
68 virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
70 virtual ScalarMap_ptr ScalarMapOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
71 const char* theFieldName, CORBA::Double theIteration);
72 virtual DeformedShape_ptr DeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
73 const char* theFieldName, CORBA::Double theIteration);
74 virtual Vectors_ptr VectorsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
75 const char* theFieldName, CORBA::Double theIteration);
76 virtual IsoSurfaces_ptr IsoSurfacesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
77 const char* theFieldName, CORBA::Double theIteration);
78 virtual CutPlanes_ptr CutPlanesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
79 const char* theFieldName, CORBA::Double theIteration);
80 virtual CutLines_ptr CutLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
81 const char* theFieldName, CORBA::Double theIteration);
82 virtual StreamLines_ptr StreamLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
83 const char* theFieldName, CORBA::Double theIteration);
84 virtual Plot3D_ptr Plot3DOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
85 const char* theFieldName, CORBA::Double theIteration);
86 //Create Digital Presentation
87 virtual Table_ptr CreateTable(const char* theTableEntry);
88 virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
89 virtual Container_ptr CreateContainer();
90 virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
92 virtual void DeleteResult(Result_ptr theResult);
93 virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
95 // inherited methods from SALOMEDS::Driver
96 virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
99 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
102 virtual bool Load(SALOMEDS::SComponent_ptr,
103 const SALOMEDS::TMPFile &,
106 virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
107 const SALOMEDS::TMPFile &,
111 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
113 virtual char* ComponentDataType();
115 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
116 const char* IORString,
117 CORBA::Boolean isMultiFile,
118 CORBA::Boolean isASCII);
119 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
120 const char* aLocalPersistentID,
121 CORBA::Boolean isMultiFile,
122 CORBA::Boolean isASCII);
124 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
125 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
126 SALOMEDS::SObject_ptr theSObject,
127 CORBA::Object_ptr theObject,
128 const char* theName) throw (SALOME::SALOME_Exception);
130 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
131 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
132 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
133 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
134 CORBA::Long theObjectID,
135 SALOMEDS::SObject_ptr theObject);
137 // inherited methods from Engines::Component
138 virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
139 CORBA::Boolean theIsPublished,
140 CORBA::Boolean& theIsValidScript);