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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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(SALOME_Session)
28 #include CORBA_SERVER_HEADER(SALOMEDS)
29 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
31 #include "SALOME_Component_i.hxx"
35 class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
36 public virtual ::Engines_Component_i
38 VISU_Gen_var myVisuGen;
40 VISU_Gen_i(const VISU::VISU_Gen_i &);
42 VISU_Gen_i(SALOME::Session_ptr session,
44 PortableServer::POA_ptr poa,
45 PortableServer::ObjectId * contId,
46 const char *instanceName,
47 const char *interfaceName);
48 virtual ~VISU_Gen_i();
50 virtual char* GetID();
51 virtual VISU::VISUType GetType();
53 virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
54 virtual SALOMEDS::Study_ptr GetCurrentStudy();
56 virtual ViewManager_ptr GetViewManager();
58 virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
59 virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
62 virtual Result_ptr ImportFile(const char* theFileName);
63 virtual Result_ptr CreateResult(const char* theFileName);
64 virtual Result_ptr CopyAndImportFile(const char* theFileName);
65 virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
66 virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
68 //Create Presentation Of Submeshes
69 virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
70 virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
71 VISU::Entity theEntity, const char* theFamilyName);
72 virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
74 //Rename Presentation Of Submeshes
75 virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
76 VISU::Entity theEntity, const char* theNewName);
77 virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
78 const char* theFamilyName, const char* theNewName);
79 virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
80 const char* theGroupName, const char* theNewName);
82 //Create Presentation Of Results
85 ScalarMapOnField(Result_ptr theResult,
86 const char* theMeshName,
87 VISU::Entity theEntity,
88 const char* theFieldName,
89 CORBA::Long theIteration);
93 GaussPointsOnField(Result_ptr theResult,
94 const char* theMeshName,
95 VISU::Entity theEntity,
96 const char* theFieldName,
97 CORBA::Long theIteration);
101 DeformedShapeOnField(Result_ptr theResult,
102 const char* theMeshName,
103 VISU::Entity theEntity,
104 const char* theFieldName,
105 CORBA::Long theIteration);
109 VectorsOnField(Result_ptr theResult,
110 const char* theMeshName,
111 VISU::Entity theEntity,
112 const char* theFieldName,
113 CORBA::Long theIteration);
117 IsoSurfacesOnField(Result_ptr theResult,
118 const char* theMeshName,
119 VISU::Entity theEntity,
120 const char* theFieldName,
121 CORBA::Long theIteration);
125 CutPlanesOnField(Result_ptr theResult,
126 const char* theMeshName,
127 VISU::Entity theEntity,
128 const char* theFieldName,
129 CORBA::Long theIteration);
133 CutLinesOnField(Result_ptr theResult,
134 const char* theMeshName,
135 VISU::Entity theEntity,
136 const char* theFieldName,
137 CORBA::Long theIteration);
141 StreamLinesOnField(Result_ptr theResult,
142 const char* theMeshName,
143 VISU::Entity theEntity,
144 const char* theFieldName,
145 CORBA::Long theIteration);
149 Plot3DOnField(Result_ptr theResult,
150 const char* theMeshName,
151 VISU::Entity theEntity,
152 const char* theFieldName,
153 CORBA::Long theIteration);
156 ScalarMapOnDeformedShape_ptr
157 ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
158 const char* theMeshName,
159 VISU::Entity theEntity,
160 const char* theFieldName,
161 CORBA::Long theIteration);
163 //Create Digital Presentation
164 virtual Table_ptr CreateTable(const char* theTableEntry);
165 virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
166 virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
167 virtual Container_ptr CreateContainer();
168 virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
170 virtual void DeleteResult(Result_ptr theResult);
171 virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
173 // inherited methods from SALOMEDS::Driver
174 virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
177 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
180 virtual bool Load(SALOMEDS::SComponent_ptr,
181 const SALOMEDS::TMPFile &,
184 virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
185 const SALOMEDS::TMPFile &,
189 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
191 virtual char* ComponentDataType();
193 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
194 const char* IORString,
195 CORBA::Boolean isMultiFile,
196 CORBA::Boolean isASCII);
197 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
198 const char* aLocalPersistentID,
199 CORBA::Boolean isMultiFile,
200 CORBA::Boolean isASCII);
202 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
203 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
204 SALOMEDS::SObject_ptr theSObject,
205 CORBA::Object_ptr theObject,
206 const char* theName) throw (SALOME::SALOME_Exception);
208 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
209 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
210 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
211 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
212 CORBA::Long theObjectID,
213 SALOMEDS::SObject_ptr theObject);
215 // inherited methods from Engines::Component
216 virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
217 CORBA::Boolean theIsPublished,
218 CORBA::Boolean& theIsValidScript);
221 VISU::ColoredPrs3dCache_ptr
222 GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);