Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New function xbt_replay_action_get(): Retrieve the function previously associated...
[simgrid.git] / src / xbt / xbt_replay.cpp
index 4e9f9fc..408c7f4 100644 (file)
@@ -180,3 +180,14 @@ void xbt_replay_action_register(const char* action_name, action_fun function)
 {
   simgrid::xbt::action_funs.insert({std::string(action_name), function});
 }
 {
   simgrid::xbt::action_funs.insert({std::string(action_name), function});
 }
+
+/**
+ * \ingroup XBT_replay
+ * \brief Get the function that was previously registered to handle a kind of action
+ *
+ * This can be useful if you want to override and extend an existing action.
+ */
+action_fun xbt_replay_action_get(const char* action_name)
+{
+  return simgrid::xbt::action_funs.at(std::string(action_name));
+}