]> SALOME platform Git repositories - modules/visu.git/blob - src/ENGINE/VISU_Engine_i.hh
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / ENGINE / VISU_Engine_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 #ifndef __VISU_ENGINE_I_H__
21 #define __VISU_ENGINE_I_H__
22
23 // IDL headers
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)
30
31 #include "SALOME_Component_i.hxx"
32
33 namespace VISU
34 {
35   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
36                      public virtual ::Engines_Component_i
37   {
38     VISU_Gen_var myVisuGen;
39     VISU_Gen_i();
40     VISU_Gen_i(const VISU::VISU_Gen_i &);
41   public:
42     VISU_Gen_i(SALOME::Session_ptr session,
43                CORBA::ORB_ptr orb,
44                PortableServer::POA_ptr poa,
45                PortableServer::ObjectId * contId, 
46                const char *instanceName, 
47                const char *interfaceName);
48     virtual ~VISU_Gen_i();
49
50     virtual char* GetID();
51     virtual VISU::VISUType GetType();
52
53     virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
54     virtual SALOMEDS::Study_ptr GetCurrentStudy();
55
56     virtual ViewManager_ptr GetViewManager();
57
58     virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
59     virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
60
61     //Create Result
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);
67
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);
73
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);
81
82     //Create Presentation Of Results
83     virtual 
84     ScalarMap_ptr
85     ScalarMapOnField(Result_ptr theResult, 
86                      const char* theMeshName, 
87                      VISU::Entity theEntity,
88                      const char* theFieldName, 
89                      CORBA::Long theIteration);
90
91     virtual 
92     GaussPoints_ptr 
93     GaussPointsOnField(Result_ptr theResult, 
94                        const char* theMeshName, 
95                        VISU::Entity theEntity,
96                        const char* theFieldName, 
97                        CORBA::Long theIteration);
98
99     virtual 
100     DeformedShape_ptr
101     DeformedShapeOnField(Result_ptr theResult, 
102                          const char* theMeshName, 
103                          VISU::Entity theEntity,
104                          const char* theFieldName, 
105                          CORBA::Long theIteration);
106
107     virtual 
108     Vectors_ptr
109     VectorsOnField(Result_ptr theResult, 
110                    const char* theMeshName, 
111                    VISU::Entity theEntity,
112                    const char* theFieldName, 
113                    CORBA::Long theIteration);
114
115     virtual
116     IsoSurfaces_ptr
117     IsoSurfacesOnField(Result_ptr theResult, 
118                        const char* theMeshName, 
119                        VISU::Entity theEntity,
120                        const char* theFieldName, 
121                        CORBA::Long theIteration);
122
123     virtual
124     CutPlanes_ptr
125     CutPlanesOnField(Result_ptr theResult, 
126                      const char* theMeshName, 
127                      VISU::Entity theEntity,
128                      const char* theFieldName, 
129                      CORBA::Long theIteration);
130
131     virtual
132     CutLines_ptr
133     CutLinesOnField(Result_ptr theResult, 
134                     const char* theMeshName, 
135                     VISU::Entity theEntity,
136                     const char* theFieldName, 
137                     CORBA::Long theIteration);
138
139     virtual
140     StreamLines_ptr 
141     StreamLinesOnField(Result_ptr theResult, 
142                        const char* theMeshName, 
143                        VISU::Entity theEntity,
144                        const char* theFieldName, 
145                        CORBA::Long theIteration);
146
147     virtual
148     Plot3D_ptr
149     Plot3DOnField(Result_ptr theResult, 
150                   const char* theMeshName, 
151                   VISU::Entity theEntity,
152                   const char* theFieldName, 
153                   CORBA::Long theIteration);
154
155     virtual
156     ScalarMapOnDeformedShape_ptr
157     ScalarMapOnDeformedShapeOnField(Result_ptr theResult, 
158                                     const char* theMeshName, 
159                                     VISU::Entity theEntity,
160                                     const char* theFieldName, 
161                                     CORBA::Long theIteration);
162
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);
169     
170     virtual void DeleteResult(Result_ptr theResult);
171     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
172
173     // inherited methods from SALOMEDS::Driver
174     virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
175                                     const char* theURL,
176                                     bool isMultiFile);
177     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
178                                          const char* theURL,
179                                          bool isMultiFile);
180     virtual bool Load(SALOMEDS::SComponent_ptr,
181                       const SALOMEDS::TMPFile &,
182                       const char* theURL,
183                       bool isMultiFile);
184     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
185                            const SALOMEDS::TMPFile &,
186                            const char* theURL,
187                            bool isMultiFile);
188
189     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); 
190
191     virtual char* ComponentDataType();
192
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);
201
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);
207
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);
214
215     // inherited methods from Engines::Component
216     virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
217                                          CORBA::Boolean theIsPublished,
218                                          CORBA::Boolean& theIsValidScript);   
219
220     virtual
221     VISU::ColoredPrs3dCache_ptr
222     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
223   };
224 };
225
226
227 #endif