From: Martin Quinson Date: Mon, 21 Dec 2015 21:55:56 +0000 (+0100) Subject: push up a method in the surf::Host hierarchy X-Git-Tag: v3_13~1413 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3622a9c058d91313ef3d2bf6af1b54ab5f4786f8 push up a method in the surf::Host hierarchy --- diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index 4584295a1c..f0c3459de9 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -147,10 +147,6 @@ Action *HostCLM03::sleep(double duration) { return p_cpu->sleep(duration); } -e_surf_resource_state_t HostCLM03::getState() { - return p_cpu->getState(); -} - /********** * Action * **********/ diff --git a/src/surf/host_clm03.hpp b/src/surf/host_clm03.hpp index 460cacba6a..8f4cffe1fb 100644 --- a/src/surf/host_clm03.hpp +++ b/src/surf/host_clm03.hpp @@ -57,7 +57,6 @@ public: virtual Action *execute(double size) override; virtual Action *sleep(double duration) override; - e_surf_resource_state_t getState() override; bool isUsed() override; diff --git a/src/surf/host_interface.cpp b/src/surf/host_interface.cpp index 85dc8b73fc..38676b8677 100644 --- a/src/surf/host_interface.cpp +++ b/src/surf/host_interface.cpp @@ -136,6 +136,9 @@ void Host::attach(simgrid::Host* host) onCreation(this); } +e_surf_resource_state_t Host::getState() { + return p_cpu->getState(); +} void Host::setState(e_surf_resource_state_t state){ e_surf_resource_state_t old = Resource::getState(); Resource::setState(state); diff --git a/src/surf/host_interface.hpp b/src/surf/host_interface.hpp index d0ebc3ecd3..42a31e912c 100644 --- a/src/surf/host_interface.hpp +++ b/src/surf/host_interface.hpp @@ -124,6 +124,8 @@ private: public: void attach(simgrid::Host* host); + + e_surf_resource_state_t getState(); void setState(e_surf_resource_state_t state); /** diff --git a/src/surf/host_ptask_L07.cpp b/src/surf/host_ptask_L07.cpp index 57cbed92f7..15dab6d015 100644 --- a/src/surf/host_ptask_L07.cpp +++ b/src/surf/host_ptask_L07.cpp @@ -529,11 +529,6 @@ void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double da return; } -e_surf_resource_state_t HostL07::getState() { - return p_cpu->getState(); -} - - double LinkL07::getBandwidth() { return m_bwCurrent; diff --git a/src/surf/host_ptask_L07.hpp b/src/surf/host_ptask_L07.hpp index 004b4b6b92..55645be226 100644 --- a/src/surf/host_ptask_L07.hpp +++ b/src/surf/host_ptask_L07.hpp @@ -102,7 +102,6 @@ public: void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) override {DIE_IMPOSSIBLE;}; Action *execute(double size) override {return p_cpu->execute(size);}; Action *sleep(double duration) override {return p_cpu->sleep(duration);}; - e_surf_resource_state_t getState() override; }; class CpuL07 : public Cpu {