1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : VISU_GEN_i.h file
6 // Author : Alexey Petrov
10 #ifndef __VISU_GEN_I_H__
11 #define __VISU_GEN_I_H__
13 #include "VISUConfig.hh"
15 #include "SALOME_Component_i.hxx"
16 #include "SALOME_NamingService.hxx"
19 class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
20 public virtual ::Engines_Component_i,
23 VISU_Gen_var myVisuGen;
24 SALOMEDS::Study_var myStudyDocument;
26 VISU_Gen_i(const VISU::VISU_Gen_i &);
28 VISU_Gen_i(CORBA::ORB_ptr theORB, PortableServer::POA_ptr thePOA,
29 SALOME_NamingService* theNamingService, QMutex* theMutex);
30 VISU_Gen_i(CORBA::ORB_ptr orb,
31 PortableServer::POA_ptr poa,
32 PortableServer::ObjectId * contId,
33 const char *instanceName,
34 const char *interfaceName);
35 virtual ~VISU_Gen_i();
36 virtual VISU::VISUType GetType() { return VISU::TVISUGEN;};
38 virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
39 virtual SALOMEDS::Study_ptr GetCurrentStudy();
40 virtual ViewManager_ptr GetViewManager();
42 virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
45 virtual Result_ptr ImportFile(const char* theFileName);
46 virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
47 virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
49 //Create Presentation Of Submeshes
50 virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
51 virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
52 VISU::Entity theEntity, const char* theFamilyName);
53 virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
55 //Create 3D collored Presentation Of Different Types
56 virtual ScalarMap_ptr ScalarMapOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
57 const char* theFieldName, CORBA::Double theIteration);
58 virtual DeformedShape_ptr DeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
59 const char* theFieldName, CORBA::Double theIteration);
60 virtual Vectors_ptr VectorsOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
61 const char* theFieldName, CORBA::Double theIteration);
62 virtual IsoSurfaces_ptr IsoSurfacesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
63 const char* theFieldName, CORBA::Double theIteration);
64 virtual CutPlanes_ptr CutPlanesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
65 const char* theFieldName, CORBA::Double theIteration);
66 virtual CutLines_ptr CutLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
67 const char* theFieldName, CORBA::Double theIteration);
68 virtual StreamLines_ptr StreamLinesOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
69 const char* theFieldName, CORBA::Double theIteration);
70 //Create Digital Presentation
71 virtual Table_ptr CreateTable(const char* theTableEntry);
72 virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
73 virtual Container_ptr CreateContainer();
74 virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
76 // inherited methods from SALOMEDS::Driver
77 virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
80 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
83 virtual bool Load(SALOMEDS::SComponent_ptr,
84 const SALOMEDS::TMPFile &,
87 virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
88 const SALOMEDS::TMPFile &,
92 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
94 virtual char* ComponentDataType();
96 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
97 const char* IORString,
98 CORBA::Boolean isMultiFile,
99 CORBA::Boolean isASCII);
100 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
101 const char* aLocalPersistentID,
102 CORBA::Boolean isMultiFile,
103 CORBA::Boolean isASCII);
105 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
106 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
107 SALOMEDS::SObject_ptr theSObject,
108 CORBA::Object_ptr theObject,
109 const char* theName) throw (SALOME::SALOME_Exception);
111 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
112 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
113 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
114 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
115 CORBA::Long theObjectID,
116 SALOMEDS::SObject_ptr theObject);