public:
explicit ReplayReader(const char* filename)
{
- fs = new std::ifstream(filename, std::ifstream::in);
+ XBT_VERB("Prepare to replay file '%s'", filename);
+ fs = new std::ifstream(filename, std::ifstream::in);
+ xbt_assert(fs->is_open(), "Cannot read replay file '%s'", filename);
}
~ReplayReader()
{
/**
* \ingroup XBT_replay
* \brief function used internally to actually run the replay
-
- * \param argc argc .
- * \param argv argv
*/
int replay_runner(int argc, char* argv[])
{
{
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));
+}