]> AND Private Git Repository - loba.git/blob - hostdata.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Use FATPIPE for backbone in cluster1000.xml.
[loba.git] / hostdata.h
1 #ifndef HOSTDATA_H
2 #define HOSTDATA_H
3
4 #include <string>
5 #include <vector>
6 #include <msg/msg.h>
7
8 class hostdata {
9 public:
10     static void create();
11     static void destroy();
12     static size_t size()                        { return hosts.size(); }
13     static const hostdata& at(size_t i)         { return hosts[i];     }
14
15     hostdata(m_host_t host);
16     ~hostdata();
17
18     const char* get_name() const                { return name;              }
19     const char* get_ctrl_mbox() const           { return ctrl_mbox.c_str(); }
20     const char* get_data_mbox() const           { return data_mbox.c_str(); }
21
22 private:
23     // static list of hostdata's, used by create/destroy
24     static std::vector<hostdata> hosts;
25     struct m_host_less;
26
27     const char* name;
28     std::string ctrl_mbox;
29     std::string data_mbox;
30
31 };
32
33 #endif // !HOSTDATA_H
34
35 // Local variables:
36 // mode: c++
37 // End: