Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / mc / transition / TransitionAny.hpp
1 /* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_TRANSITION_ANY_HPP
7 #define SIMGRID_MC_TRANSITION_ANY_HPP
8
9 #include "src/kernel/actor/SimcallObserver.hpp"
10 #include "src/mc/transition/Transition.hpp"
11
12 #include <sstream>
13 #include <string>
14
15 namespace simgrid::mc {
16
17 class TestAnyTransition : public Transition {
18   std::vector<Transition*> transitions_;
19
20 public:
21   TestAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream);
22   std::string to_string(bool verbose) const override;
23   bool depends(const Transition* other) const override;
24
25   Transition* get_current_transition() const { return transitions_.at(times_considered_); }
26 };
27
28 class WaitAnyTransition : public Transition {
29   std::vector<Transition*> transitions_;
30
31 public:
32   WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream);
33   std::string to_string(bool verbose) const override;
34   bool depends(const Transition* other) const override;
35
36   Transition* get_current_transition() const { return transitions_.at(times_considered_); }
37 };
38
39 } // namespace simgrid::mc
40
41 #endif