Salome HOME
21384fef918d2823b6edc1b5f34da22b2cab639e
[modules/kernel.git] / src / ParallelContainer / Parallel_Salome_file_i.hxx
1 // Copyright (C) 2007  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
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. 
7 // 
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. 
12 // 
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 
16 // 
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 //
20 //
21 //  File   : Parallel_Salome_file_i.hxx
22 //  Author : AndrĂ© RIBES, EDF
23 //  Module : SALOME
24 //  $Header: 
25
26 #ifndef _PARALLEL_SALOME_FILE_I_HXX_
27 #define _PARALLEL_SALOME_FILE_I_HXX_
28
29 #include <SALOMEconfig.h>
30 #include <SALOME_Container.hxx>
31 #include <map>
32 #include <cstdio>
33
34 #include "SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.h"
35 #include "Salome_file_i.hxx"
36
37 class CONTAINER_EXPORT Parallel_Salome_file_i:
38   public virtual Salome_file_i,
39   public virtual Engines::Parallel_Salome_file_serv
40 {
41   public:
42     Parallel_Salome_file_i(CORBA::ORB_ptr orb, 
43                            const char * ior,
44                            int rank);
45     virtual ~Parallel_Salome_file_i();
46
47     virtual void setFileNode(const char* file_name, CORBA::Long node);
48     virtual CORBA::Long getFileNode(const char* file_name);
49     virtual Engines::Container_ptr updateFile(const Engines::file& file);
50
51     // New implementation for these methods
52     // For the parallel cases
53     virtual void load(const char* hdf5_file);
54     virtual void save(const char* hdf5_file);
55     virtual void save_all(const char* hdf5_file);
56     virtual void connect(Engines::Salome_file_ptr source_Salome_file);
57     virtual void connectDistributedFile(const char * file_name,
58                                         Engines::Salome_file_ptr source_Salome_file);
59     virtual void setDistributedSourceFile(const char* file_name,
60                                           const char * source_file_name);
61     virtual void recvFiles();
62     virtual void recvFiles_node();
63     virtual void setContainer(Engines::Container_ptr container);
64     //virtual void removeFile(const char* file_name);
65     //virtual void removeFiles();
66     
67     // Local C++ methods
68     virtual bool getParallelDistributedFile(std::string file_name);
69
70   private :
71     Engines::Parallel_Salome_file_var proxy;
72     Engines::PaCO_Parallel_Salome_file * parallel_file;
73 };
74
75 #endif
76