Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
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(SALOMEDS)
28 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
29
30 #include "SALOME_Component_i.hxx"
31
32 namespace VISU{
33   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
34                      public virtual ::Engines_Component_i
35   {
36     VISU_Gen_var myVisuGen;
37     VISU_Gen_i();
38     VISU_Gen_i(const VISU::VISU_Gen_i &);
39   public:
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();
46
47     virtual char* GetID();
48     virtual VISU::VISUType GetType();
49
50     virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
51     virtual SALOMEDS::Study_ptr GetCurrentStudy();
52
53     virtual ViewManager_ptr GetViewManager();
54
55     virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
56     virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName );
57
58     //Create Result
59     virtual Result_ptr ImportFile(const char* theFileName);
60     virtual Result_ptr CreateResult(const char* theFileName);
61     virtual Result_ptr CopyAndImportFile(const char* theFileName);
62     virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
63     virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
64
65     //Create Presentation Of Submeshes
66     virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
67     virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName, 
68                                         VISU::Entity theEntity, const char* theFamilyName);
69     virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
70
71     virtual ScalarMap_ptr ScalarMapOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
72                                            const char* theFieldName, CORBA::Double theIteration);
73     virtual GaussPoints_ptr GaussPointsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
74                                                const char* theFieldName, CORBA::Double theIteration);
75     virtual DeformedShape_ptr DeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
76                                                    const char* theFieldName, CORBA::Double theIteration);
77     virtual Vectors_ptr VectorsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
78                                        const char* theFieldName, CORBA::Double theIteration);
79     virtual IsoSurfaces_ptr IsoSurfacesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
80                                                const char* theFieldName, CORBA::Double theIteration);
81     virtual CutPlanes_ptr CutPlanesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
82                                            const char* theFieldName, CORBA::Double theIteration);
83     virtual CutLines_ptr CutLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
84                                          const char* theFieldName, CORBA::Double theIteration);
85     virtual StreamLines_ptr StreamLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
86                                                const char* theFieldName, CORBA::Double theIteration);
87     virtual Plot3D_ptr Plot3DOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
88                                      const char* theFieldName, CORBA::Double theIteration);
89     virtual ScalarMapOnDeformedShape_ptr ScalarMapOnDeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity, 
90                                                                          const char* theFieldName, CORBA::Double theIteration);
91     //Create Digital Presentation
92     virtual Table_ptr CreateTable(const char* theTableEntry);
93     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
94     virtual Container_ptr CreateContainer();
95     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
96     
97     virtual void DeleteResult(Result_ptr theResult);
98     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
99
100     // inherited methods from SALOMEDS::Driver
101     virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
102                                     const char* theURL,
103                                     bool isMultiFile);
104     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
105                                          const char* theURL,
106                                          bool isMultiFile);
107     virtual bool Load(SALOMEDS::SComponent_ptr,
108                       const SALOMEDS::TMPFile &,
109                       const char* theURL,
110                       bool isMultiFile);
111     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
112                            const SALOMEDS::TMPFile &,
113                            const char* theURL,
114                            bool isMultiFile);
115
116     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); 
117
118     virtual char* ComponentDataType();
119
120     virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
121                                          const char* IORString,
122                                          CORBA::Boolean isMultiFile,
123                                          CORBA::Boolean isASCII);
124     virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
125                                          const char* aLocalPersistentID,
126                                          CORBA::Boolean isMultiFile,
127                                          CORBA::Boolean isASCII);
128     
129     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
130     virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
131                                                  SALOMEDS::SObject_ptr theSObject,
132                                                  CORBA::Object_ptr theObject,
133                                                  const char* theName) throw (SALOME::SALOME_Exception);
134
135     CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
136     SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
137     CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
138     SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
139                                     CORBA::Long theObjectID,
140                                     SALOMEDS::SObject_ptr theObject);
141
142     // inherited methods from Engines::Component
143     virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
144                                          CORBA::Boolean theIsPublished,
145                                          CORBA::Boolean& theIsValidScript);   
146
147   };
148 };
149
150
151 #endif