-/* 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. */
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
class ActivityTestSimcall final : public ResultingSimcall<bool> {
activity::ActivityImpl* const activity_;
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> {
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_; }
{
}
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_; }
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_; }
{
}
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_; }
{
}
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_; }
auto const& get_copy_data_fun() const { return copy_data_fun_; }
};
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif