Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename ActivityImpl::surf_action_ to ActivityImpl::model_action_
[simgrid.git] / src / kernel / actor / CommObserver.hpp
index 2358e5a08eb74ef204e50e70619a3c4d8eaf0eec..77584250bd8cd8c99c2106b779ea249c3e9cbd06 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2023. 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. */
@@ -13,9 +13,7 @@
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 class ActivityTestSimcall final : public ResultingSimcall<bool> {
   activity::ActivityImpl* const activity_;
@@ -28,6 +26,7 @@ public:
   bool is_visible() const override { return true; }
   activity::ActivityImpl* get_activity() const { return activity_; }
   void serialize(std::stringstream& stream) const override;
+  std::string to_string() const override;
 };
 
 class ActivityTestanySimcall final : public ResultingSimcall<ssize_t> {
@@ -40,7 +39,8 @@ public:
   bool is_visible() const override { return true; }
   bool is_enabled() override { return true; /* can return -1 if no activity is ready */ }
   void serialize(std::stringstream& stream) const override;
-  int get_max_consider() override;
+  std::string to_string() const override;
+  int get_max_consider() const override;
   void prepare(int times_considered) override;
   const std::vector<activity::ActivityImpl*>& get_activities() const { return activities_; }
   int get_value() const { return next_value_; }
@@ -56,6 +56,7 @@ public:
   {
   }
   void serialize(std::stringstream& stream) const override;
+  std::string to_string() const override;
   bool is_visible() const override { return true; }
   bool is_enabled() override;
   activity::ActivityImpl* get_activity() const { return activity_; }
@@ -73,9 +74,10 @@ public:
   ActivityWaitanySimcall(ActorImpl* actor, const std::vector<activity::ActivityImpl*>& activities, double timeout);
   bool is_enabled() override;
   void serialize(std::stringstream& stream) const override;
+  std::string to_string() const override;
   bool is_visible() const override { return true; }
   void prepare(int times_considered) override;
-  int get_max_consider() override;
+  int get_max_consider() const override;
   const std::vector<activity::ActivityImpl*>& get_activities() const { return activities_; }
   double get_timeout() const { return timeout_; }
   int get_value() const { return next_value_; }
@@ -118,6 +120,7 @@ public:
   {
   }
   void serialize(std::stringstream& stream) const override;
+  std::string to_string() const override;
   bool is_visible() const override { return true; }
   activity::MailboxImpl* get_mailbox() const { return mbox_; }
   double get_payload_size() const { return payload_size_; }
@@ -162,6 +165,7 @@ public:
   {
   }
   void serialize(std::stringstream& stream) const override;
+  std::string to_string() const override;
   bool is_visible() const override { return true; }
   activity::MailboxImpl* get_mailbox() const { return mbox_; }
   double get_rate() const { return rate_; }
@@ -175,8 +179,6 @@ public:
   auto const& get_copy_data_fun() const { return copy_data_fun_; }
 };
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif