source: XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.hpp @ 173

Last change on this file since 173 was 152, checked in by hozdoba, 13 years ago
File size: 2.5 KB
Line 
1#ifndef __XMLIO_CXMLIOManager__
2#define __XMLIO_CXMLIOManager__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "exception.hpp"
7#include "mpi_manager.hpp"
8
9namespace xmlioserver
10{
11   /// ////////////////////// Déclarations ////////////////////// ///
12   class CXIOSManager
13   {
14      public :
15
16         /// Définition de type ///
17         typedef enum _xios_type
18         { CLIENT_SERVER = 0 , CLIENT, SERVER } XIOSType;
19
20         typedef struct
21         {
22            StdSize nbClient;
23            StdSize nbClientPServer;
24            void (*entry)(comm::MPIComm, comm::MPIComm, comm::MPIComm) ;
25         } XIOSClient;
26
27         /// Initialisation et finalisation de la bibliothÚque ///
28         static void Initialise(XIOSType type = CLIENT,
29                                int    * argc = NULL  ,
30                                char *** argv = NULL  );
31         static void Finalize(void);
32
33         /// Ajout de client en mode CLIENT_SERVER et CLIENT///
34         static void AddClient(StdString clientName, StdSize nbClient, StdSize nbClientPServer,
35                               void (*entry_point)(comm::MPIComm, comm::MPIComm, comm::MPIComm));
36
37         /// Lancement des serveurs et/ou des clients ///
38         static void RunServer(StdString clientName,
39                               comm::MPIComm comm_client_server, comm::MPIComm comm_server); // Not implemented yet.
40         static void RunClient(comm::MPIComm comm_client =
41                               comm::CMPIManager::GetCommWorld());                           // Not implemented yet.
42         static void RunClientServer(comm::MPIComm comm_client_server =
43                                     comm::CMPIManager::GetCommWorld());
44
45      protected :
46
47         /// Accesseurs statiques ///
48         static StdSize GetNbClient(void);
49         static StdSize GetNbLocClient(const StdString & clientName = CXIOSManager::ClientName);
50
51         static StdSize GetNbServer(void);
52         static StdSize GetNbLocServer(const StdString & clientName = CXIOSManager::ClientName);
53
54      private :
55
56         /// variables privées ///
57         static StdString ExeName;
58         static std::vector<StdString> ExeOptions;
59
60         static XIOSType Type;
61         static StdString ClientName;
62         static comm::MPIComm Comm_Client_Server;
63         static comm::MPIComm Comm_Server;
64         static xios_map<StdString, XIOSClient> Clients;
65
66   }; // class CXIOSManager
67} // namespace xmlioserver
68
69#endif //__XMLIO_CXMLIOManager__
Note: See TracBrowser for help on using the repository browser.