1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef __PARAVIS_ENGINE_I_H__
23 #define __PARAVIS_ENGINE_I_H__
26 #include "SALOMEconfig.h"
27 #include CORBA_SERVER_HEADER(PARAVIS_Gen)
28 #include CORBA_SERVER_HEADER(SALOME_Session)
29 #include CORBA_SERVER_HEADER(SALOMEDS)
30 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
32 #include "SALOME_Component_i.hxx"
37 * Implements PARAVIS_Gen interface.
38 * Ativates corresponded interface in GUI main thread and redirects all calls to that interface.
40 class PARAVIS_Gen_i : public virtual POA_PARAVIS::PARAVIS_Gen,
41 public virtual ::Engines_Component_i
43 //! Reference on corresponded interface in GUI thread
44 PARAVIS_Gen_var myParaVisGen;
49 PARAVIS_Gen_i(const PARAVIS::PARAVIS_Gen_i &);
52 PARAVIS_Gen_i(SALOME::Session_ptr session,
54 PortableServer::POA_ptr poa,
55 PortableServer::ObjectId * contId,
56 const char *instanceName,
57 const char *interfaceName);
58 virtual ~PARAVIS_Gen_i();
60 virtual char* GetIOR();
62 virtual void ImportFile(const char* theFileName);
64 virtual char* GetTrace();
66 virtual void SaveTrace(const char* theFileName);
68 // inherited methods from SALOMEDS::Driver
69 virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
70 const char* theURL, bool isMultiFile);
72 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
73 const char* theURL, bool isMultiFile);
75 virtual bool Load(SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile &,
76 const char* theURL, bool isMultiFile);
78 virtual bool LoadASCII(SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile &,
79 const char* theURL, bool isMultiFile);
81 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
83 virtual char* ComponentDataType();
85 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString,
86 CORBA::Boolean isMultiFile, CORBA::Boolean isASCII);
88 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, const char* aLocalPersistentID,
89 CORBA::Boolean isMultiFile, CORBA::Boolean isASCII);
91 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
93 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
94 SALOMEDS::SObject_ptr theSObject,
95 CORBA::Object_ptr theObject,
96 const char* theName) throw (SALOME::SALOME_Exception);
98 virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
100 virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
102 virtual CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
104 virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
105 CORBA::Long theObjectID, SALOMEDS::SObject_ptr theObject);
108 virtual PARAVIS::string_array* GetClassesList();
109 virtual PARAVIS_Base_ptr CreateClass(const char* theClassName);
110 virtual void GetConnectionParameters(CORBA::Long& theId,
111 CORBA::String_out theDHost, CORBA::Long& theDPort,
112 CORBA::String_out theRHost, CORBA::Long& theRPort,
113 CORBA::Long& theReversed);
115 virtual void ActivateModule();