X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/c4e7c13743a9d1e8dfa5dc27d4b2fa3aaf1557ab..014983949544db9a324cece29a0ccc46b1e3e1f3:/deployment.h?ds=sidebyside diff --git a/deployment.h b/deployment.h index 4dde480..3cbe6ae 100644 --- a/deployment.h +++ b/deployment.h @@ -1,8 +1,46 @@ #ifndef DEPLOYMENT_H #define DEPLOYMENT_H +#include + void MY_launch_application(); +class deployment_generator { +public: + deployment_generator(); + + size_t size() const { return hosts.size(); } + void set_load(int host, double load); + void set_neighbor(int host, int neighbor); + void set_link(int host1, int host2); + + virtual void generate() = 0; + void deploy(); + +private: + struct host_parameters { + double load; + std::vector neighbors; + }; + + std::vector hosts; +}; + +#define DEPLOYMENT(name) \ + class deployment_ ## name: public deployment_generator { \ + public: void generate(); \ + } + +DEPLOYMENT(line); +DEPLOYMENT(ring); +DEPLOYMENT(star); +DEPLOYMENT(clique); +DEPLOYMENT(btree); +// DEPLOYMENT(torus); +DEPLOYMENT(hcube); + +#undef DEPLOYMENT + #endif // !DEPLOYMENT_H // Local variables: