+
+std::string getName() /* deprecated */
+{
+ return get_name();
+}
+const char* getCname() /* deprecated */
+{
+ return get_cname();
+}
+bool isMaestro() /* deprecated */
+{
+ return is_maestro();
+}
+aid_t getPid() /* deprecated */
+{
+ return get_pid();
+}
+aid_t getPpid() /* deprecated */
+{
+ return get_ppid();
+}
+Host* getHost() /* deprecated */
+{
+ return get_host();
+}
+bool isSuspended() /* deprecated */
+{
+ return is_suspended();
+}
+void onExit /* deprecated */ (int_f_pvoid_pvoid_t fun, void* data)
+{
+ on_exit(fun, data);
+}
+
+} // namespace this_actor
+} // namespace s4u
+} // namespace simgrid
+
+/* **************************** Public C interface *************************** */
+
+/** \ingroup m_actor_management
+ * \brief Returns the process ID of \a actor.
+ *
+ * This function checks whether \a actor is a valid pointer and return its PID (or 0 in case of problem).
+ */
+int sg_actor_get_PID(sg_actor_t actor)
+{
+ /* Do not raise an exception here: this function is called by the logs
+ * and the exceptions, so it would be called back again and again */
+ if (actor == nullptr || actor->get_impl() == nullptr)
+ return 0;
+ return actor->get_pid();
+}
+
+/** \ingroup m_actor_management
+ * \brief Returns the process ID of the parent of \a actor.
+ *
+ * This function checks whether \a actor is a valid pointer and return its parent's PID.
+ * Returns -1 if the actor has not been created by any other actor.
+ */
+int sg_actor_get_PPID(sg_actor_t actor)
+{
+ return actor->get_ppid();
+}
+
+/** \ingroup m_actor_management
+ * \brief Return the name of an actor.
+ */
+const char* sg_actor_get_name(sg_actor_t actor)
+{
+ return actor->get_cname();
+}
+
+sg_host_t sg_actor_get_host(sg_actor_t actor)
+{
+ return actor->get_host();
+}
+
+/** \ingroup m_actor_management
+ * \brief Returns the value of a given actor property
+ *
+ * \param actor an actor
+ * \param name a property name
+ * \return value of a property (or nullptr if the property is not set)
+ */
+const char* sg_actor_get_property_value(sg_actor_t actor, const char* name)
+{
+ return actor->get_property(name);
+}
+
+/** \ingroup m_actor_management
+ * \brief Return the list of properties
+ *
+ * This function returns all the parameters associated with an actor
+ */
+xbt_dict_t sg_actor_get_properties(sg_actor_t actor)
+{
+ xbt_assert(actor != nullptr, "Invalid parameter: First argument must not be nullptr");
+ xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
+ std::map<std::string, std::string>* props = actor->get_properties();
+ if (props == nullptr)
+ return nullptr;
+ for (auto const& elm : *props) {
+ xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()), nullptr);
+ }
+ return as_dict;