1 // Copyright (C) 2007-2020 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, or (at your option) any later version.
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
20 // Author: Guillaume Boulant (EDF/R&D)
22 #ifndef __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
23 #define __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
25 #include "KernelHelpers.hxx"
27 #include "SALOME_Component_i.hxx"
28 #include "SALOME_NamingService.hxx"
30 #include CORBA_CLIENT_HEADER(SALOMEDS)
33 //---------------------------------------------------------
35 class KERNELHELPERS_EXPORT SALOMEDS_DriverDefaultImpl:
36 public virtual POA_SALOMEDS::Driver
37 //---------------------------------------------------------
41 SALOMEDS_DriverDefaultImpl();
43 SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb,
44 PortableServer::POA_ptr poa,
45 PortableServer::ObjectId * contId,
46 const char *instanceName,
47 const char *interfaceName);
50 virtual ~SALOMEDS_DriverDefaultImpl();
52 //---------------------------------------------
53 // inherited methods from SALOMEDS::Driver
54 //---------------------------------------------
56 //virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
57 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
61 virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
65 virtual bool Load(SALOMEDS::SComponent_ptr,
66 const SALOMEDS::TMPFile &,
70 virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
71 const SALOMEDS::TMPFile &,
75 virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
77 virtual char* ComponentDataType();
79 virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
80 const char* IORString,
81 CORBA::Boolean isMultiFile,
82 CORBA::Boolean isASCII);
84 virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
85 const char* aLocalPersistentID,
86 CORBA::Boolean isMultiFile,
87 CORBA::Boolean isASCII);
89 virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
91 virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
92 CORBA::Object_ptr theObject,
94 throw (SALOME::SALOME_Exception);
96 virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
98 virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject,
99 CORBA::Long& theObjectID);
101 virtual CORBA::Boolean CanPaste(const char* theComponentName,
102 CORBA::Long theObjectID);
104 virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
105 CORBA::Long theObjectID,
106 SALOMEDS::SObject_ptr theObject);