source: XIOS/dev/common/src/client.hpp @ 1512

Last change on this file since 1512 was 286, checked in by ymipsl, 13 years ago

reprise en main de la version de H. Ozdoba. Correction de différentes erreurs de conception et bug.
Version NEMO operationnel en client/server, interoperabilita avec OASIS, reconstition de fichiers via netcdf4/HDF5

YM

File size: 1.8 KB
Line 
1#ifndef __XMLIO_Client__
2#define __XMLIO_Client__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "mpi_manager.hpp"
7#include "buffer_pair.hpp"
8#include "array.hpp"
9#include "duration.hpp"
10
11namespace xmlioserver {
12namespace comm {
13
14   /// ////////////////////// Déclarations ////////////////////// ///
15   
16   class CClient
17   {
18      public :
19
20         static boost::shared_ptr<CClient> CreateClient(MPI_Comm comm_client_server);
21         static boost::shared_ptr<CClient> GetClient(void);
22               
23         /// Destructeur ///
24         ~CClient(void); 
25         
26      public : 
27     
28         /// Accesseur ///
29         const CBufferPair & getBufferPair(void) const;
30             
31         /// Appels distants///   
32         void initialize(void); // manager 0, method 0
33         void finalize(void);   // manager 0, method 1
34         
35      public : 
36       
37         void setContext(const StdString & idContext);      // manager 1, method 0
38         void updateCalendar(long int timestep);            // manager 1, method 1
39         void setTimestep(const date::CDuration & duration);// manager 1, method 2
40         
41         void sendData(const StdString & fieldId,
42                       const StdString & fileId,
43                       const ARRAY(float, 1)  dataArray); // manager 2, method 0
44         
45         void sendData(const StdString & fieldId,
46                       const StdString & fileId,
47                       const ARRAY(double, 1) dataArray); // manager 2, method 1
48         
49      private :
50
51         /// Constructeurs ///
52         CClient(MPI_Comm comm_client_server);
53     
54         /// Propriété privée ///
55         CBufferPair bpair;
56
57         static boost::shared_ptr<CClient> Client;
58     
59   }; // class CClient   
60   
61} // namespace comm
62} // namespace xmlioserver
63
64#endif //__XMLIO_Client__
Note: See TracBrowser for help on using the repository browser.