Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
give s4u::Actor a cname() method
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 13 Mar 2017 00:53:11 +0000 (01:53 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 13 Mar 2017 00:53:11 +0000 (01:53 +0100)
include/simgrid/s4u/Actor.hpp
src/s4u/s4u_actor.cpp

index 0a14c7d..9b28492 100644 (file)
@@ -202,7 +202,9 @@ public:
 
   // ***** Methods *****
 
 
   // ***** 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();
   simgrid::xbt::string name();
   /** Retrieves the host on which that actor is running */
   s4u::Host* host();
index 257717f..426b850 100644 (file)
@@ -57,6 +57,11 @@ s4u::Host* Actor::host()
   return this->pimpl_->host;
 }
 
   return this->pimpl_->host;
 }
 
+const char* Actor::cname()
+{
+  return this->pimpl_->name.c_str();
+}
+
 simgrid::xbt::string Actor::name()
 {
   return this->pimpl_->name;
 simgrid::xbt::string Actor::name()
 {
   return this->pimpl_->name;