1 // Copyright (C) 2010-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __PARAVIS_ENGINE_I_H__
20 #define __PARAVIS_ENGINE_I_H__
23 #include "SALOMEconfig.h"
24 #include CORBA_SERVER_HEADER(PARAVIS_Gen)
25 #include CORBA_SERVER_HEADER(SALOME_Session)
26 #include CORBA_SERVER_HEADER(SALOMEDS)
27 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
29 #include "SALOME_Component_i.hxx"
34 * Implements PARAVIS_Gen interface.
35 * Ativates corresponded interface in GUI main thread and redirects all calls to that interface.
37 class PARAVIS_Gen_i : public virtual POA_PARAVIS::PARAVIS_Gen,
38 public virtual ::Engines_Component_i
40 //! Reference on corresponded interface in GUI thread
41 PARAVIS_Gen_var myParaVisGen;
46 PARAVIS_Gen_i(const PARAVIS::PARAVIS_Gen_i &);
49 PARAVIS_Gen_i(SALOME::Session_ptr session,
51 PortableServer::POA_ptr poa,
52 PortableServer::ObjectId * contId,
53 const char *instanceName,
54 const char *interfaceName);
55 virtual ~PARAVIS_Gen_i();
57 virtual char* GetIOR();
59 virtual void ImportFile(const char* theFileName);
61 virtual void ExecuteScript(const char* script);
63 virtual char* GetTrace();
65 virtual void SaveTrace(const char* theFileName);
67 // inherited methods from SALOMEDS::Driver
68 virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
69 const char* theURL, bool isMultiFile);
71 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
72 const char* theURL, bool isMultiFile);
74 virtual bool Load(SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile &,
75 const char* theURL, bool isMultiFile);
77 virtual bool LoadASCII(SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile &,
78 const char* theURL, bool isMultiFile);
80 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
82 virtual char* ComponentDataType();
84 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString,
85 CORBA::Boolean isMultiFile, CORBA::Boolean isASCII);
87 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, const char* aLocalPersistentID,
88 CORBA::Boolean isMultiFile, CORBA::Boolean isASCII);
90 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
92 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
93 SALOMEDS::SObject_ptr theSObject,
94 CORBA::Object_ptr theObject,
95 const char* theName) throw (SALOME::SALOME_Exception);
97 virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
99 virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
101 virtual CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
103 virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
104 CORBA::Long theObjectID, SALOMEDS::SObject_ptr theObject);
107 virtual PARAVIS::string_array* GetClassesList();
108 virtual PARAVIS_Base_ptr CreateClass(const char* theClassName);
109 virtual void GetConnectionParameters(CORBA::Long& theId,
110 CORBA::String_out theDHost, CORBA::Long& theDPort,
111 CORBA::String_out theRHost, CORBA::Long& theRPort,
112 CORBA::Long& theReversed);
114 virtual void ActivateModule();
117 virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
118 virtual SALOMEDS::Study_ptr GetCurrentStudy();
120 virtual char* getVersion();