6 // Deploy an application automatically, according to the global parameters
7 void MY_launch_application();
9 // Base class for deployment generators...
10 class deployment_generator {
12 deployment_generator();
13 virtual ~deployment_generator() { }
15 size_t size() const { return hosts.size(); }
16 void set_load(int host, double load);
17 void set_neighbor(int host, int neighbor);
18 void set_link(int host1, int host2);
20 virtual void generate() = 0;
21 void distribute_load();
25 struct host_parameters {
26 host_parameters(): load(0.0) { }
29 std::vector<int> neighbors;
32 std::vector<host_parameters> hosts;
35 #define DEPLOYMENT(name) \
36 class deployment_ ## name: public deployment_generator { \
37 public: void generate(); \
50 #endif // !DEPLOYMENT_H