X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0c675d990c2f0c5060cf49c746a83db99949ef2c..19cd5a52131b50275fa26e0e53c4a8bd333f2937:/src/surf/surf_interface.hpp diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index f465a21607..0e2b5cad2a 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -118,8 +118,12 @@ public: /** @brief Destructor */ virtual ~Action(); - /** @brief Mark that the action is now finished */ - void finish(); + /** + * @brief Mark that the action is now finished + * + * @param state the new [state](\ref simgrid::surf::Action::State) of the current Action + */ + void finish(Action::State state); /** @brief Get the [state](\ref simgrid::surf::Action::State) of the current Action */ Action::State getState(); /**< get the state*/ @@ -223,7 +227,7 @@ private: /* LMM */ public: - virtual void updateRemainingLazy(double now); + virtual void updateRemainingLazy(double now) { THROW_IMPOSSIBLE; }; void heapInsert(xbt_heap_t heap, double key, enum heap_action_type hat); void heapRemove(xbt_heap_t heap); void heapUpdate(xbt_heap_t heap, double key, enum heap_action_type hat); @@ -363,7 +367,7 @@ public: * @param name The name of the Resource * @param constraint The lmm constraint associated to this Resource if it is part of a LMM component */ - Resource(Model *model, const char *name, lmm_constraint_t constraint); + Resource(Model * model, const std::string& name, lmm_constraint_t constraint); virtual ~Resource(); @@ -412,13 +416,9 @@ protected: } namespace std { - template <> - struct hash - { - std::size_t operator()(const simgrid::surf::Resource& r) const - { - return (std::size_t) xbt_str_hash(r.cname()); - } +template <> class hash { +public: + std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.cname()); } }; }