Version: 6.3.1

src/Session/SalomeApp_Engine_i.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SalomeApp_Engine_i : implementation of SalomeApp_Engine.idl
00024 //  File   : SalomeApp_Engine_i.hxx
00025 //  Author : Alexander SLADKOV
00026 //  Module : SALOME
00027 //  $Header: /home/server/cvs/GUI/GUI_SRC/src/Session/SalomeApp_Engine_i.hxx,v 1.5.22.1.12.1 2011-06-01 13:53:42 vsr Exp $
00028 //
00029 #ifndef _SALOMEAPP_ENGINE_I_HXX_
00030 #define _SALOMEAPP_ENGINE_I_HXX_
00031 
00032 #include "SALOME_Session.hxx"
00033 
00034 #include "SALOME_Component_i.hxx"
00035 
00036 #include <vector> 
00037 #include <map> 
00038 
00039 #include <SALOMEconfig.h>
00040 #include CORBA_SERVER_HEADER(SalomeApp_Engine)
00041 
00042 class SESSION_EXPORT SalomeApp_Engine_i: public POA_SalomeApp::Engine,
00043                           public Engines_Component_i
00044 {
00045 public:
00046   SalomeApp_Engine_i();
00047   ~SalomeApp_Engine_i();
00048 
00049   SALOMEDS::TMPFile*      Save( SALOMEDS::SComponent_ptr theComponent, 
00050                                const char* theURL, 
00051                                bool isMultiFile );
00052 
00053   CORBA::Boolean          Load( SALOMEDS::SComponent_ptr theComponent, 
00054                                const SALOMEDS::TMPFile& theFile, 
00055                                const char* theURL, 
00056                                bool isMultiFile );
00057 
00058 public:
00059   typedef std::vector<std::string> ListOfFiles;
00060 
00061   ListOfFiles             GetListOfFiles (const int         theStudyId, 
00062                                           const char*       theComponentName);
00063 
00064   void                    SetListOfFiles (const ListOfFiles theListOfFiles,
00065                                           const int         theStudyId, 
00066                                           const char*       theComponentName);
00067 
00068   static SalomeApp_Engine_i* GetInstance();
00069 
00070 public:
00071   // methods from SALOMEDS::Driver without implementation.  Must be redefined because 
00072   // there is no default implementation of SALOMEDS::Driver interface
00073   SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr, const char*, bool )                                                                        {return 0;}
00074   CORBA::Boolean LoadASCII( SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile&, const char*, bool )                                                  {return 0;}
00075   void Close( SALOMEDS::SComponent_ptr )                                                                                                             {}
00076   char* ComponentDataType()                                                                                                                          {return 0;}
00077   char* IORToLocalPersistentID( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
00078   char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
00079   bool CanPublishInStudy( CORBA::Object_ptr )                                                                                                        {return 0;}
00080   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr, CORBA::Object_ptr, const char* ) throw (SALOME::SALOME_Exception) {return 0;}
00081   CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr )                                                                                                    {return 0;}
00082   SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr, CORBA::Long& )                                                                                 {return 0;}
00083   CORBA::Boolean CanPaste( const char*, CORBA::Long )                                                                                                {return 0;}
00084   SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile&, CORBA::Long, SALOMEDS::SObject_ptr )                                                    {return 0;}
00085 
00086 private:
00087   typedef std::map<std::string, ListOfFiles> MapOfListOfFiles;
00088   typedef std::map<int, MapOfListOfFiles>    MapOfMapOfListOfFiles;
00089   MapOfMapOfListOfFiles                      myMap;
00090 
00091   static SalomeApp_Engine_i* myInstance;
00092 };
00093 
00094 #endif
00095 
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS