]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_Gen_i.hh
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISU_I / VISU_Gen_i.hh
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
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. 
8 // 
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. 
13 // 
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 
17 // 
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : VISU_Gen_i.hh
21 //  Author : Alexey Petrov
22 //  Module : VISU
23
24 #ifndef __VISU_GEN_I_H__
25 #define __VISU_GEN_I_H__
26
27 #include "VISUConfig.hh"
28
29 #include "VISU_I.hxx"
30 #include "SALOME_Component_i.hxx"
31 #include "SALOME_NamingService.hxx"
32 #include "VISU_ColoredPrs3d_i.hh"
33
34 #include <string>
35
36 namespace VISU
37 {
38   //----------------------------------------------------------------------------
39   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
40                      public virtual ::Engines_Component_i,
41                      public virtual Base_i
42   {
43     SALOMEDS::Study_var myStudyDocument;
44     VISU_Gen_i(const VISU::VISU_Gen_i &);
45   public:
46     VISU_Gen_i(CORBA::ORB_ptr theORB,
47                PortableServer::POA_ptr thePOA,
48                SALOME_NamingService* theNamingService,
49                QMutex* theMutex);
50
51     virtual 
52     ~VISU_Gen_i();
53
54     virtual 
55     char* 
56     GetID();
57
58     virtual
59     VISU::VISUType 
60     GetType() { return VISU::TVISUGEN;};
61
62     virtual
63     void
64     SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
65
66     virtual
67     SALOMEDS::Study_ptr
68     GetCurrentStudy();
69
70     virtual
71     ViewManager_ptr
72     GetViewManager();
73
74     virtual
75     SALOMEDS::SObject_ptr
76     ImportTables(const char* theFileName);
77
78     virtual
79     CORBA::Boolean
80     ExportTableToFile(SALOMEDS::SObject_ptr theTable, 
81                       const char* theFileName );
82
83     //Create Result
84     virtual
85     Result_ptr
86     ImportFile(const char* theFileName);
87
88     virtual
89     Result_ptr
90     CreateResult(const char* theFileName);
91
92     virtual
93     Result_ptr
94     CopyAndImportFile(const char* theFileName);
95
96     virtual
97     Result_ptr
98     ImportMed(SALOMEDS::SObject_ptr theMedSObject);
99
100     virtual
101     Result_ptr
102     ImportMedField(SALOME_MED::FIELD_ptr theField);
103
104
105     //Rename Presentation Of Submeshes
106     void
107     RenameMeshInStudy(Result_ptr theResult,
108                       const std::string& theMeshName,
109                       int theEntity, // -1 for group indication
110                       const std::string& theSubMeshName, // Family or Group name
111                       const std::string& theNewName);
112     virtual
113     void
114     RenameEntityInStudy(Result_ptr   theResult,
115                         const char*  theMeshName,
116                         VISU::Entity theEntity,
117                         const char*  theNewName);
118     virtual
119     void
120     RenameFamilyInStudy(Result_ptr   theResult,
121                         const char*  theMeshName,
122                         VISU::Entity theEntity,
123                         const char*  theFamilyName,
124                         const char*  theNewName);
125     virtual
126     void
127     RenameGroupInStudy(Result_ptr  theResult,
128                        const char*  theMeshName,
129                        const char* theGroupName,
130                        const char* theNewName);
131
132     //Create Presentation Of Submeshes
133     virtual
134     Mesh_ptr
135     MeshOnEntity(Result_ptr theResult, 
136                  const char* theMeshName, 
137                  VISU::Entity theEntity);
138
139     virtual
140     Mesh_ptr
141     FamilyMeshOnEntity(Result_ptr theResult, 
142                        const char* theMeshName,
143                        VISU::Entity theEntity, 
144                        const char* theFamilyName);
145
146     virtual
147     Mesh_ptr
148     GroupMesh(Result_ptr theResult, 
149               const char* theMeshName, 
150               const char* theGroupName);
151
152     Prs3d_ptr
153     CreatePrs3d(VISUType theType,
154                 SALOMEDS::Study_ptr theStudy);
155
156     virtual
157     ScalarMap_ptr
158     ScalarMapOnField(Result_ptr theResult,
159                      const char* theMeshName, 
160                      VISU::Entity theEntity,
161                      const char* theFieldName, 
162                      CORBA::Long theIteration);
163
164     virtual
165     GaussPoints_ptr
166     GaussPointsOnField(Result_ptr theResult,
167                        const char* theMeshName, 
168                        VISU::Entity theEntity,
169                        const char* theFieldName, 
170                        CORBA::Long theIteration);
171
172     virtual
173     DeformedShape_ptr
174     DeformedShapeOnField(Result_ptr theResult,
175                          const char* theMeshName, 
176                          VISU::Entity theEntity,
177                          const char* theFieldName, 
178                          CORBA::Long theIteration);
179
180     virtual
181     ScalarMapOnDeformedShape_ptr
182     ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
183                                     const char* theMeshName, 
184                                     VISU::Entity theEntity,
185                                     const char* theFieldName, 
186                                     CORBA::Long theIteration);
187     virtual
188     Vectors_ptr
189     VectorsOnField(Result_ptr theResult,
190                    const char* theMeshName, 
191                    VISU::Entity theEntity,
192                    const char* theFieldName, 
193                    CORBA::Long theIteration);
194
195     virtual
196     IsoSurfaces_ptr
197     IsoSurfacesOnField(Result_ptr theResult,
198                        const char* theMeshName, 
199                        VISU::Entity theEntity,
200                        const char* theFieldName, 
201                        CORBA::Long theIteration);
202
203     virtual
204     CutPlanes_ptr
205     CutPlanesOnField(Result_ptr theResult,
206                      const char* theMeshName, 
207                      VISU::Entity theEntity,
208                      const char* theFieldName, 
209                      CORBA::Long theIteration);
210
211     virtual
212     CutLines_ptr
213     CutLinesOnField(Result_ptr theResult,
214                     const char* theMeshName, 
215                     VISU::Entity theEntity,
216                     const char* theFieldName, 
217                     CORBA::Long theIteration);
218
219     virtual
220     StreamLines_ptr
221     StreamLinesOnField(Result_ptr theResult,
222                        const char* theMeshName, 
223                        VISU::Entity theEntity,
224                        const char* theFieldName, 
225                        CORBA::Long theIteration);
226
227     virtual
228     Plot3D_ptr
229     Plot3DOnField(Result_ptr theResult,
230                   const char* theMeshName, 
231                   VISU::Entity theEntity,
232                   const char* theFieldName, 
233                   CORBA::Long theIteration);
234
235     //Create Digital Presentation
236     virtual 
237     Table_ptr
238     CreateTable(const char* theTableEntry);
239
240     virtual
241     Curve_ptr
242     CreateCurve(Table_ptr theTable, 
243                 CORBA::Long theHRow, 
244                 CORBA::Long theVRow);
245     virtual
246     Curve_ptr
247     CreateCurveWithZ(Table_ptr theTable, 
248                 CORBA::Long theHRow, 
249                 CORBA::Long theVRow,
250                 CORBA::Long theZRow);
251
252     virtual
253     Container_ptr 
254     CreateContainer();
255
256     virtual
257     Animation_ptr
258     CreateAnimation(View3D_ptr theView3d);
259
260     virtual
261     void 
262     DeleteResult(Result_ptr theResult);
263
264     virtual
265     void 
266     DeletePrs3d(Prs3d_ptr thePrs3d);
267
268     // inherited methods from Engines::Component
269     virtual
270     Engines::TMPFile*
271     DumpPython(CORBA::Object_ptr theStudy,
272                CORBA::Boolean theIsPublished,
273                CORBA::Boolean& theIsValidScript);
274
275     // inherited methods from SALOMEDS::Driver
276     virtual
277     SALOMEDS::TMPFile* 
278     Save(SALOMEDS::SComponent_ptr theComponent,
279          const char* theURL,
280          bool isMultiFile);
281
282     virtual
283     SALOMEDS::TMPFile* 
284     SaveASCII(SALOMEDS::SComponent_ptr theComponent,
285               const char* theURL,
286               bool isMultiFile);
287
288     virtual
289     bool
290     Load(SALOMEDS::SComponent_ptr,
291          const SALOMEDS::TMPFile &,
292          const char* theURL,
293          bool isMultiFile);
294
295     virtual
296     bool
297     LoadASCII(SALOMEDS::SComponent_ptr,
298               const SALOMEDS::TMPFile &,
299               const char* theURL,
300               bool isMultiFile);
301     
302     virtual
303     void
304     Close(SALOMEDS::SComponent_ptr IORSComponent);
305
306     virtual
307     char* 
308     ComponentDataType();
309
310     virtual
311     char* 
312     IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
313                            const char* IORString,
314                            CORBA::Boolean isMultiFile,
315                            CORBA::Boolean isASCII);
316
317     virtual
318     char* 
319     LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
320                            const char* aLocalPersistentID,
321                            CORBA::Boolean isMultiFile,
322                            CORBA::Boolean isASCII);
323
324     virtual 
325     bool
326     CanPublishInStudy(CORBA::Object_ptr theIOR);
327
328     virtual
329     SALOMEDS::SObject_ptr
330     PublishInStudy(SALOMEDS::Study_ptr theStudy,
331                    SALOMEDS::SObject_ptr theSObject,
332                    CORBA::Object_ptr theObject,
333                    const char* theName) throw (SALOME::SALOME_Exception);
334
335     CORBA::Boolean 
336     CanCopy(SALOMEDS::SObject_ptr theObject);
337
338     SALOMEDS::TMPFile* 
339     CopyFrom(SALOMEDS::SObject_ptr theObject, 
340              CORBA::Long& theObjectID);
341
342     CORBA::Boolean 
343     CanPaste(const char* theComponentName, 
344              CORBA::Long theObjectID);
345
346     SALOMEDS::SObject_ptr
347     PasteInto(const SALOMEDS::TMPFile& theStream,
348               CORBA::Long theObjectID,
349               SALOMEDS::SObject_ptr theObject);
350
351     virtual
352     VISU::ColoredPrs3dCache_ptr
353     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
354   };
355 }
356
357 #endif