1 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
3 // Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SuperV_Impl.hxx
25 // Author : Jean Rahuel
29 #ifndef _SUPERV_IMPL_HXX_
30 #define _SUPERV_IMPL_HXX_
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SALOMEDS)
38 #include "SALOME_Component_i.hxx"
39 #include "SALOME_LifeCycleCORBA.hxx"
41 #include "StreamGraph_Impl.hxx"
43 #include "DataFlowEditor_DataFlow.hxx"
45 class SuperV_Impl : public POA_SUPERV::SuperG ,
46 public Engines_Component_i {
50 PortableServer::POA_ptr _Poa ;
51 PortableServer::ObjectId * _ContId ;
56 SuperV_Impl( CORBA::ORB_ptr orb ,
57 PortableServer::POA_ptr poa ,
58 PortableServer::ObjectId * contId ,
59 const char *instanceName ,
60 const char *interfaceName
65 virtual ~SuperV_Impl() ;
66 virtual void Destroy() ;
68 Engines::TMPFile * DumpPython( CORBA::Object_ptr theStudy ,
69 CORBA::Boolean isPublished ,
70 CORBA::Boolean & isValidScript ) ;
72 // void Save(const char* IORSComponent, const char* aUrlOfFile);
73 // void Load(const char* IORSComponent, const char* aUrlOfFile);
74 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
77 SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
80 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
81 const SALOMEDS::TMPFile& theStream,
84 CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
85 const SALOMEDS::TMPFile& theStream,
89 void Close(SALOMEDS::SComponent_ptr theComponent);
90 char* ComponentDataType();
92 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
93 const char* IORString,
94 CORBA::Boolean isMultiFile,
95 CORBA::Boolean isASCII);
96 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
97 const char* aLocalPersistentID,
98 CORBA::Boolean isMultiFile,
99 CORBA::Boolean isASCII)
100 throw(SALOME::SALOME_Exception);
102 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, CORBA::Boolean isMultiFile);
103 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, CORBA::Boolean isMultiFile);
105 bool CanPublishInStudy(CORBA::Object_ptr theIOR);
106 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);
118 virtual SUPERV::Value_ptr StringValue( const char * aStrIOR ) ;
119 virtual SUPERV::Value_ptr AnyValue( const CORBA::Any & anAny ) ;
120 virtual SUPERV::Value_ptr Value( CORBA::Any * anAny ) ;
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