Back to index

salome-kernel  6.5.0
SALOMEDS_DriverDefaultImpl.cxx
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 #include <utilities.h>
00022 #include "SALOMEDS_DriverDefaultImpl.hxx"
00023 
00024 
00025 //===========================================================================
00026     SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb,
00027                                       PortableServer::POA_ptr poa,
00028                                      PortableServer::ObjectId * contId,
00029                                     const char *instanceName,
00030                                     const char *interfaceName) 
00031 //     :Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
00032   {
00033     MESSAGE("SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl : ");
00034   };
00035 
00036 //===========================================================================
00037   SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl()
00038   {
00039     MESSAGE("SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl");
00040   };
00041 
00042 //===========================================================================
00043   CORBA::Boolean SALOMEDS_DriverDefaultImpl::Load(SALOMEDS::SComponent_ptr theComponent,
00044                               const SALOMEDS::TMPFile & theStream,
00045                               const char* theURL,
00046                               bool isMultiFile)
00047   {
00048     MESSAGE("--------------------------------------");
00049     MESSAGE("--------------------------------------");
00050     MESSAGE("--------------------------------------");
00051     MESSAGE("SALOMEDS_DriverDefaultImpl::Load");
00052     MESSAGE("Should be implemented");
00053     MESSAGE("--------------------------------------");
00054     MESSAGE("--------------------------------------");
00055     MESSAGE("--------------------------------------");
00056     return false;
00057   };
00058 
00059 //===========================================================================
00060   CORBA::Boolean SALOMEDS_DriverDefaultImpl::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
00061                                    const SALOMEDS::TMPFile & theStream,
00062                                    const char* theURL,
00063                                    bool isMultiFile)
00064   {
00065     MESSAGE("--------------------------------------");
00066     MESSAGE("--------------------------------------");
00067     MESSAGE("--------------------------------------");
00068     MESSAGE("SALOMEDS_DriverDefaultImpl::LoadASCII");
00069     MESSAGE("Should be implemented");
00070     MESSAGE("--------------------------------------");
00071     MESSAGE("--------------------------------------");
00072     MESSAGE("--------------------------------------");
00073     return false;
00074   };
00075 
00076 //===========================================================================
00077   char* SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
00078                                       const char* aLocalPersistentID,
00079                                       CORBA::Boolean isMultiFile,
00080                                       CORBA::Boolean isASCII)
00081   {
00082     MESSAGE("--------------------------------------");
00083     MESSAGE("--------------------------------------");
00084     MESSAGE("--------------------------------------");
00085     MESSAGE("SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR");
00086     MESSAGE("Should be implemented");
00087     MESSAGE("--------------------------------------");
00088     MESSAGE("--------------------------------------");
00089     MESSAGE("--------------------------------------");
00090     CORBA::String_var aString("");
00091     return aString._retn();
00092   };
00093 
00094 //===========================================================================
00095   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::Save(SALOMEDS::SComponent_ptr theComponent,
00096                                   const char* theURL,
00097                                   bool isMultiFile)
00098   {
00099     MESSAGE("--------------------------------------");
00100     MESSAGE("--------------------------------------");
00101     MESSAGE("--------------------------------------");
00102     MESSAGE("SALOMEDS_DriverDefaultImpl::Save");
00103     MESSAGE("Should be implemented");
00104     MESSAGE("--------------------------------------");
00105     MESSAGE("--------------------------------------");
00106     MESSAGE("--------------------------------------");
00107     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
00108     return aStreamFile._retn();
00109   };
00110 
00111 //===========================================================================
00112   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
00113                                       const char* theURL,
00114                                       bool isMultiFile)
00115   {
00116     MESSAGE("--------------------------------------");
00117     MESSAGE("--------------------------------------");
00118     MESSAGE("--------------------------------------");
00119     MESSAGE("SALOMEDS_DriverDefaultImpl::SaveASCII");
00120     MESSAGE("Should be implemented");
00121     MESSAGE("--------------------------------------");
00122     MESSAGE("--------------------------------------");
00123     MESSAGE("--------------------------------------");
00124     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
00125     return aStreamFile._retn();
00126   };
00127 
00128 //===========================================================================
00129   char* SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
00130                                       const char* IORString,
00131                                       CORBA::Boolean isMultiFile,
00132                                       CORBA::Boolean isASCII)
00133   {
00134     MESSAGE("-----------------------------------------");
00135     MESSAGE("-----------------------------------------");
00136     MESSAGE("-----------------------------------------");
00137     MESSAGE("SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID");
00138     MESSAGE("Should be implemented");
00139     MESSAGE("-----------------------------------------");
00140     MESSAGE("-----------------------------------------");
00141     MESSAGE("-----------------------------------------");
00142     CORBA::String_var aString("");
00143     return aString._retn();
00144   };
00145 
00146 
00147 //===========================================================================
00148   void SALOMEDS_DriverDefaultImpl::Close(SALOMEDS::SComponent_ptr theComponent)
00149   {
00150     MESSAGE("------------------------");
00151     MESSAGE("SALOMEDS_DriverDefaultImpl::Close");
00152     MESSAGE("------------------------");
00153   };
00154 
00155 //===========================================================================
00156   char* SALOMEDS_DriverDefaultImpl::ComponentDataType()
00157   {
00158     MESSAGE("-----------------------------------------");
00159     MESSAGE("-----------------------------------------");
00160     MESSAGE("-----------------------------------------");
00161     MESSAGE("SALOMEDS_DriverDefaultImpl::ComponentDataType");
00162     MESSAGE("Should be implemented");
00163     MESSAGE("-----------------------------------------");
00164     MESSAGE("-----------------------------------------");
00165     MESSAGE("-----------------------------------------");
00166     return CORBA::string_dup("J aurais du nommer mon type prefere");
00167   };
00168 
00169 //===========================================================================
00170   bool SALOMEDS_DriverDefaultImpl::CanPublishInStudy(CORBA::Object_ptr theIOR) 
00171   {
00172     MESSAGE("-----------------------------------------");
00173     MESSAGE("-----------------------------------------");
00174     MESSAGE("-----------------------------------------");
00175     MESSAGE("SALOMEDS_DriverDefaultImpl::CanPublishInStudy");
00176     MESSAGE("Should be implemented");
00177     MESSAGE("-----------------------------------------");
00178     MESSAGE("-----------------------------------------");
00179     MESSAGE("-----------------------------------------");
00180     return false;
00181   };
00182 
00183 //===========================================================================
00184   SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::Study_ptr theStudy,
00185                                              SALOMEDS::SObject_ptr theSObject,
00186                                              CORBA::Object_ptr theObject,
00187                                              const char* theName)
00188     throw (SALOME::SALOME_Exception)
00189   {
00190     MESSAGE("-----------------------------------------");
00191     MESSAGE("-----------------------------------------");
00192     MESSAGE("-----------------------------------------");
00193     MESSAGE("SALOMEDS_DriverDefaultImpl::PublishInStudy");
00194     MESSAGE("Should be implemented");
00195     MESSAGE("-----------------------------------------");
00196     MESSAGE("-----------------------------------------");
00197     MESSAGE("-----------------------------------------");
00198     SALOMEDS::SObject_var aResultSO;
00199     return aResultSO._retn();
00200   };
00201 
00202 //===========================================================================
00203   CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanCopy(SALOMEDS::SObject_ptr theObject) 
00204   {
00205     MESSAGE("-----------------------------------------");
00206     MESSAGE("-----------------------------------------");
00207     MESSAGE("-----------------------------------------");
00208     MESSAGE("SALOMEDS_DriverDefaultImpl::CanCopy");
00209     MESSAGE("Should be implemented");
00210     MESSAGE("-----------------------------------------");
00211     MESSAGE("-----------------------------------------");
00212     MESSAGE("-----------------------------------------");
00213     //return false;
00214     return true;
00215   };
00216 
00217 //===========================================================================
00218   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::CopyFrom(SALOMEDS::SObject_ptr theObject,
00219                                         CORBA::Long& theObjectID)
00220 {
00221     MESSAGE("--------------------------------------");
00222     MESSAGE("--------------------------------------");
00223     MESSAGE("--------------------------------------");
00224     MESSAGE("SALOMEDS_DriverDefaultImpl::CopyFrom");
00225     MESSAGE("Should be implemented");
00226     MESSAGE("--------------------------------------");
00227     MESSAGE("--------------------------------------");
00228     MESSAGE("--------------------------------------");
00229     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
00230     return aStreamFile._retn();
00231 };
00232 
00233 //===========================================================================
00234   SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PasteInto( const SALOMEDS::TMPFile & theStream,
00235                                                  CORBA::Long theObjectID,
00236                                                 SALOMEDS::SObject_ptr theSObject)
00237   {
00238     MESSAGE("-----------------------------------------");
00239     MESSAGE("-----------------------------------------");
00240     MESSAGE("-----------------------------------------");
00241     MESSAGE("SALOMEDS_DriverDefaultImpl::PasteInto");
00242     MESSAGE("Should be implemented");
00243     MESSAGE("-----------------------------------------");
00244     MESSAGE("-----------------------------------------");
00245     MESSAGE("-----------------------------------------");
00246     SALOMEDS::SObject_var aResultSO;
00247     return aResultSO._retn();
00248   };
00249 
00250 //===========================================================================
00251    CORBA::Boolean  SALOMEDS_DriverDefaultImpl::CanPaste ( const char *theComponentName,
00252                                             CORBA::Long theObjectID)
00253   {
00254     MESSAGE("-----------------------------------------");
00255     MESSAGE("-----------------------------------------");
00256     MESSAGE("-----------------------------------------");
00257     MESSAGE("SALOMEDS_DriverDefaultImpl::CanPaste");
00258     MESSAGE("Should be implemented");
00259     MESSAGE("-----------------------------------------");
00260     MESSAGE("-----------------------------------------");
00261     MESSAGE("-----------------------------------------");
00262     return false;
00263   };
00264 
00265