From: Martin Quinson Date: Mon, 13 Mar 2017 00:53:11 +0000 (+0100) Subject: give s4u::Actor a cname() method X-Git-Tag: v3_15~139 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ccae9b178683382c85fbb8aaddfbc6d791c70f78 give s4u::Actor a cname() method --- diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 0a14c7d089..9b28492c3f 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -202,7 +202,9 @@ public: // ***** Methods ***** - /** Retrieves the name of that actor */ + /** Retrieves the name of that actor as a C string */ + const char* cname(); + /** Retrieves the name of that actor as a C++ string */ simgrid::xbt::string name(); /** Retrieves the host on which that actor is running */ s4u::Host* host(); diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 257717fec6..426b85048c 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -57,6 +57,11 @@ s4u::Host* Actor::host() return this->pimpl_->host; } +const char* Actor::cname() +{ + return this->pimpl_->name.c_str(); +} + simgrid::xbt::string Actor::name() { return this->pimpl_->name;