#include <xbt/str.h>
#include <xbt/utility.hpp>
+#include <string>
+
namespace simgrid {
namespace kernel {
namespace resource {
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;
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();
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) */
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