From: Frederic Suter Date: Sat, 2 Dec 2017 18:07:27 +0000 (+0100) Subject: add getProperties to Actor X-Git-Tag: v3.18~182^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/682bc98938d5e7c1da8aed596d295d5efedb10c3 add getProperties to Actor Netzone is public, include it from s4u.hpp --- diff --git a/include/simgrid/s4u.hpp b/include/simgrid/s4u.hpp index e1dfeda7e0..1b82b8c781 100644 --- a/include/simgrid/s4u.hpp +++ b/include/simgrid/s4u.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index bca444cce0..d22640c269 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -269,6 +269,7 @@ public: simix::ActorImpl* getImpl(); /** Retrieve the property value (or nullptr if not set) */ + std::map* getProperties(); const char* getProperty(const char* key); void setProperty(const char* key, const char* value); Actor* restart(); diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 02b8a9ae51..ddb8fac0cf 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -173,6 +173,11 @@ void Actor::killAll(int resetPid) simcall_process_killall(resetPid); } +std::map* Actor::getProperties() +{ + return simgrid::simix::kernelImmediate([this] { return this->pimpl_->getProperties(); }); +} + /** Retrieve the property value (or nullptr if not set) */ const char* Actor::getProperty(const char* key) {