]> SALOME platform Git repositories - modules/gui.git/blob - src/Session/SalomeApp_Engine_i.hxx
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/gui.git] / src / Session / SalomeApp_Engine_i.hxx
1 //  SalomeApp_Engine_i : implementation of SalomeApp_Engine.idl
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //
23 //
24 //  File   : SalomeApp_Engine_i.hxx
25 //  Author : Alexander SLADKOV
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef _SALOMEAPP_ENGINE_I_HXX_
30 #define _SALOMEAPP_ENGINE_I_HXX_
31
32 #include <SALOME_Session.hxx>
33
34 #include "SALOME_Component_i.hxx"
35
36 #include <vector> 
37 #include <map> 
38
39 #include <SALOMEconfig.h>
40 #include CORBA_SERVER_HEADER(SalomeApp_Engine)
41
42 class SESSION_EXPORT SalomeApp_Engine_i: public POA_SalomeApp::Engine,
43                           public Engines_Component_i
44 {
45 public:
46   SalomeApp_Engine_i();
47   ~SalomeApp_Engine_i();
48
49   SALOMEDS::TMPFile*      Save( SALOMEDS::SComponent_ptr theComponent, 
50                                const char* theURL, 
51                                bool isMultiFile );
52
53   CORBA::Boolean          Load( SALOMEDS::SComponent_ptr theComponent, 
54                                const SALOMEDS::TMPFile& theFile, 
55                                const char* theURL, 
56                                bool isMultiFile );
57
58 public:
59   typedef std::vector<std::string> ListOfFiles;
60
61   ListOfFiles             GetListOfFiles (const int         theStudyId, 
62                                           const char*       theComponentName);
63
64   void                    SetListOfFiles (const ListOfFiles theListOfFiles,
65                                           const int         theStudyId, 
66                                           const char*       theComponentName);
67
68   static SalomeApp_Engine_i* GetInstance();
69
70 public:
71   // methods from SALOMEDS::Driver without implementation.  Must be redefined because 
72   // there is no default implementation of SALOMEDS::Driver interface
73   SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr, const char*, bool )                                                                        {return 0;}
74   CORBA::Boolean LoadASCII( SALOMEDS::SComponent_ptr, const SALOMEDS::TMPFile&, const char*, bool )                                                  {return 0;}
75   void Close( SALOMEDS::SComponent_ptr )                                                                                                             {}
76   char* ComponentDataType()                                                                                                                          {return 0;}
77   char* IORToLocalPersistentID( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
78   char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
79   bool CanPublishInStudy( CORBA::Object_ptr )                                                                                                        {return 0;}
80   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr, CORBA::Object_ptr, const char* ) throw (SALOME::SALOME_Exception) {return 0;}
81   CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr )                                                                                                    {return 0;}
82   SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr, CORBA::Long& )                                                                                 {return 0;}
83   CORBA::Boolean CanPaste( const char*, CORBA::Long )                                                                                                {return 0;}
84   SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile&, CORBA::Long, SALOMEDS::SObject_ptr )                                                    {return 0;}
85
86 private:
87   typedef std::map<std::string, ListOfFiles> MapOfListOfFiles;
88   typedef std::map<int, MapOfListOfFiles>    MapOfMapOfListOfFiles;
89   MapOfMapOfListOfFiles                      myMap;
90
91   static SalomeApp_Engine_i* myInstance;
92 };
93
94 #endif
95