X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/f29b38ef2a056daa14bbfda2fce78063faa773d4..f620be5869815a0dccd5b37089c2ee91399915e4:/neighbor.h diff --git a/neighbor.h b/neighbor.h index 13d1108..4bd05a9 100644 --- a/neighbor.h +++ b/neighbor.h @@ -6,17 +6,26 @@ class neighbor { public: - neighbor(const char* const name_) - : name(name_) - , load(std::numeric_limits::infinity()) { - } - const std::string& getName() const { return name; } - double getLoad() const { return load; } - void setLoad(double l) { load = l; } + neighbor(const char* hostname); + ~neighbor(); + + const char* get_name() const { return name.c_str(); } + const char* get_ctrl_mbox() const { return ctrl_mbox.c_str(); } + const char* get_data_mbox() const { return data_mbox.c_str(); } + + double get_load() const { return load; } + void set_load(double l) { load = l; } + + double get_debt() const { return debt; } + void set_debt(double d) { debt = d; } private: std::string name; + std::string ctrl_mbox; + std::string data_mbox; + double load; + double debt; }; #endif // !NEIGHBOR_H