Back to index

salome-kernel  6.5.0
SALOMEDS_DriverDefaultImpl.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 // Author: Guillaume Boulant (EDF/R&D)
00020 
00021 #ifndef __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
00022 #define __SALOMEDS_DRIVER_DEFAULT_IMPL_H__
00023 
00024 #include "KernelHelpers.hxx"
00025 
00026 #include "SALOME_Component_i.hxx"
00027 #include "SALOME_NamingService.hxx"
00028 
00029 #include CORBA_CLIENT_HEADER(SALOMEDS)
00030 
00031 
00032 //---------------------------------------------------------
00033 
00034 class KERNELHELPERS_EXPORT SALOMEDS_DriverDefaultImpl:
00035   public virtual POA_SALOMEDS::Driver
00036 //---------------------------------------------------------
00037   {
00038 
00039 
00040     SALOMEDS_DriverDefaultImpl();
00041   public:
00042     SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb,
00043              PortableServer::POA_ptr poa,
00044              PortableServer::ObjectId * contId,
00045              const char *instanceName,
00046              const char *interfaceName);
00047 
00048 
00049     virtual ~SALOMEDS_DriverDefaultImpl();
00050 
00051     //---------------------------------------------
00052     // inherited methods from SALOMEDS::Driver
00053     //---------------------------------------------
00054 
00055     //virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
00056      SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
00057             const char* theURL,
00058             bool isMultiFile);
00059 
00060     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
00061            const char* theURL,
00062            bool isMultiFile);
00063 
00064     virtual bool Load(SALOMEDS::SComponent_ptr,
00065           const SALOMEDS::TMPFile &,
00066           const char* theURL,
00067           bool isMultiFile);
00068 
00069     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
00070          const SALOMEDS::TMPFile &,
00071          const char* theURL,
00072          bool isMultiFile);
00073 
00074     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
00075 
00076     virtual char* ComponentDataType();
00077 
00078     virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
00079            const char* IORString,
00080            CORBA::Boolean isMultiFile,
00081            CORBA::Boolean isASCII);
00082 
00083     virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
00084            const char* aLocalPersistentID,
00085            CORBA::Boolean isMultiFile,
00086            CORBA::Boolean isASCII);
00087 
00088     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
00089 
00090     virtual SALOMEDS::SObject_ptr PublishInStudy
00091                              (SALOMEDS::Study_ptr theStudy,
00092                   SALOMEDS::SObject_ptr theSObject,
00093             CORBA::Object_ptr theObject,
00094             const char* theName) 
00095               throw (SALOME::SALOME_Exception);
00096 
00097     virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
00098 
00099     virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, 
00100                                 CORBA::Long& theObjectID);
00101 
00102     virtual CORBA::Boolean CanPaste(const char* theComponentName, 
00103                             CORBA::Long theObjectID);
00104 
00105     virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
00106             CORBA::Long theObjectID,
00107             SALOMEDS::SObject_ptr theObject);
00108   };
00109 #endif