1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
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 // Author: Guillaume Boulant (EDF/R&D)
21 #ifndef __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
22 #define __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
24 #include "KernelHelpers.hxx"
26 #include "SALOME_Component_i.hxx"
27 #include "SALOME_NamingService.hxx"
29 #include CORBA_CLIENT_HEADER(SALOMEDS)
32 //---------------------------------------------------------
34 class KERNELHELPERS_EXPORT SALOMEDS_DriverDefaultImpl:
35 public virtual POA_SALOMEDS::Driver
36 //---------------------------------------------------------
40 SALOMEDS_DriverDefaultImpl();
42 SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb,
43 PortableServer::POA_ptr poa,
44 PortableServer::ObjectId * contId,
45 const char *instanceName,
46 const char *interfaceName);
49 virtual ~SALOMEDS_DriverDefaultImpl();
51 //---------------------------------------------
52 // inherited methods from SALOMEDS::Driver
53 //---------------------------------------------
55 //virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
56 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
60 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
64 virtual bool Load(SALOMEDS::SComponent_ptr,
65 const SALOMEDS::TMPFile &,
69 virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
70 const SALOMEDS::TMPFile &,
74 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
76 virtual char* ComponentDataType();
78 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
79 const char* IORString,
80 CORBA::Boolean isMultiFile,
81 CORBA::Boolean isASCII);
83 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
84 const char* aLocalPersistentID,
85 CORBA::Boolean isMultiFile,
86 CORBA::Boolean isASCII);
88 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
90 virtual SALOMEDS::SObject_ptr PublishInStudy
91 (SALOMEDS::Study_ptr theStudy,
92 SALOMEDS::SObject_ptr theSObject,
93 CORBA::Object_ptr theObject,
95 throw (SALOME::SALOME_Exception);
97 virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
99 virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject,
100 CORBA::Long& theObjectID);
102 virtual CORBA::Boolean CanPaste(const char* theComponentName,
103 CORBA::Long theObjectID);
105 virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
106 CORBA::Long theObjectID,
107 SALOMEDS::SObject_ptr theObject);