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 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
23 // File : SuperV_Impl.hxx
24 // Author : Jean Rahuel
28 #ifndef _SUPERV_IMPL_HXX_
29 #define _SUPERV_IMPL_HXX_
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SALOMEDS)
37 #include "SALOME_Component_i.hxx"
38 #include "SALOME_LifeCycleCORBA.hxx"
40 #include "StreamGraph_Impl.hxx"
42 #include "DataFlowEditor_DataFlow.hxx"
44 class SuperV_Impl : public POA_SUPERV::SuperG ,
45 public Engines_Component_i {
49 PortableServer::POA_ptr _Poa ;
50 PortableServer::ObjectId * _ContId ;
55 SuperV_Impl( CORBA::ORB_ptr orb ,
56 PortableServer::POA_ptr poa ,
57 PortableServer::ObjectId * contId ,
58 const char *instanceName ,
59 const char *interfaceName
64 virtual ~SuperV_Impl() ;
65 virtual void Destroy() ;
67 Engines::TMPFile * DumpPython( CORBA::Object_ptr theStudy ,
68 CORBA::Boolean isPublished ,
69 CORBA::Boolean & isValidScript ) ;
71 // void Save(const char* IORSComponent, const char* aUrlOfFile);
72 // void Load(const char* IORSComponent, const char* aUrlOfFile);
73 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
76 SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
79 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
80 const SALOMEDS::TMPFile& theStream,
83 CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
84 const SALOMEDS::TMPFile& theStream,
88 void Close(SALOMEDS::SComponent_ptr theComponent);
89 char* ComponentDataType();
91 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
92 const char* IORString,
93 CORBA::Boolean isMultiFile,
94 CORBA::Boolean isASCII);
95 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
96 const char* aLocalPersistentID,
97 CORBA::Boolean isMultiFile,
98 CORBA::Boolean isASCII)
99 throw(SALOME::SALOME_Exception);
101 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, CORBA::Boolean isMultiFile);
102 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, CORBA::Boolean isMultiFile);
104 bool CanPublishInStudy(CORBA::Object_ptr theIOR);
105 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
106 SALOMEDS::SObject_ptr theSObject,
107 CORBA::Object_ptr theObject,
108 const char* theName) throw (SALOME::SALOME_Exception) ;
110 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
111 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
112 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
113 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
114 CORBA::Long theObjectID,
115 SALOMEDS::SObject_ptr theObject);
117 virtual SUPERV::Value_ptr StringValue( const char * aStrIOR ) ;
118 virtual SUPERV::Value_ptr AnyValue( const CORBA::Any & anAny ) ;
119 virtual SUPERV::Value_ptr Value( CORBA::Any * anAny ) ;
120 virtual CORBA::Object_ptr ToObject( CORBA::Object_ptr anObjectRef ) ;
122 virtual SUPERV::Graph_ptr Graph( const char * aDataFlowName ) ;
124 virtual SUPERV::Graph_ptr GraphE( const char * aDataFlowName ) ;
126 virtual SUPERV::StreamGraph_ptr StreamGraph( const char * aDataFlowName ) ;
128 virtual SUPERV::StreamGraph_ptr StreamGraphE( const char * aDataFlowName ) ;
130 virtual SUPERV::StreamGraph_ptr getStreamGraph(const char* ior);
131 virtual SUPERV::Graph_ptr getGraph(const char* ior);
136 PortableServer::ObjectId * SUPERVEngine_factory
137 ( CORBA::ORB_ptr orb ,
138 PortableServer::POA_ptr poa ,
139 PortableServer::ObjectId * contId ,
140 const char *instanceName ,
141 const char *interfaceName