X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7cd237f9659b2df47fca65a4340ca7b5407f46a0..aa4c8eeb3051e5adfef317cda2ae590ca13e6f3e:/include/simgrid/smpi/replay.hpp diff --git a/include/simgrid/smpi/replay.hpp b/include/simgrid/smpi/replay.hpp index 1a0d2a5a45..4da7a7ee7a 100644 --- a/include/simgrid/smpi/replay.hpp +++ b/include/simgrid/smpi/replay.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -181,22 +181,26 @@ public: * In other words: The logic goes here, the setup is done by the ActionArgParser. */ template class ReplayAction { + const std::string name_; + const aid_t my_proc_id_ = s4u::this_actor::get_pid(); + T args_; + protected: - const std::string name; - const aid_t my_proc_id = s4u::this_actor::get_pid(); - T args; + const std::string& get_name() const { return name_; } + aid_t get_pid() const { return my_proc_id_; } + const T& get_args() const { return args_; } public: - explicit ReplayAction(const std::string& name) : name(name) {} + explicit ReplayAction(const std::string& name) : name_(name) {} virtual ~ReplayAction() = default; void execute(xbt::ReplayAction& action) { // Needs to be re-initialized for every action, hence here double start_time = smpi_process()->simulated_elapsed(); - args.parse(action, name); + args_.parse(action, name_); kernel(action); - if (name != "Init") + if (name_ != "Init") log_timed_action(action, start_time); }