X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/08ddd90ede6ae87880ab6aefe213001b224de841..9caf173e476622d309cc5653a83d224d05787cc7:/include/simgrid/kernel/resource/Resource.hpp diff --git a/include/simgrid/kernel/resource/Resource.hpp b/include/simgrid/kernel/resource/Resource.hpp index 1c281bc64a..ee037cd3b7 100644 --- a/include/simgrid/kernel/resource/Resource.hpp +++ b/include/simgrid/kernel/resource/Resource.hpp @@ -11,6 +11,8 @@ #include #include +#include + namespace simgrid { namespace kernel { namespace resource { @@ -36,9 +38,9 @@ public: Model* model() const; /** @brief Get the name of the current Resource */ - const std::string& getName() const; + const std::string& get_name() const; /** @brief Get the name of the current Resource */ - const char* getCname() const; + const char* get_cname() const; bool operator==(const Resource& other) const; @@ -51,7 +53,7 @@ public: virtual void apply_event(TraceEvent* event, double value) = 0; /** @brief Check if the current Resource is used (if it currently serves an action) */ - virtual bool isUsed() = 0; + virtual bool is_used() = 0; /** @brief returns the current load (in flops per second, byte per second or similar) */ virtual double getLoad(); @@ -68,7 +70,7 @@ public: private: std::string name_; Model* model_; - bool isOn_ = true; + bool is_on_ = true; public: /* LMM */ /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */ @@ -93,7 +95,7 @@ template <> class hash { public: std::size_t operator()(const simgrid::kernel::resource::Resource& r) const { - return (std::size_t)xbt_str_hash(r.getCname()); + return (std::size_t)xbt_str_hash(r.get_cname()); } }; } // namespace std