]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/api/TransitionComm.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar fixes
[simgrid.git] / src / mc / api / TransitionComm.hpp
index 0d1264bb235cc73c5944dd022dfb37cf211a8c3a..f65f282df65129fc723b48b817c3005ee65acb0d 100644 (file)
@@ -10,6 +10,7 @@
 #include "src/kernel/actor/SimcallObserver.hpp"
 #include "src/mc/api/Transition.hpp"
 
+#include <sstream>
 #include <string>
 
 namespace simgrid {
@@ -33,7 +34,7 @@ class CommWaitTransition : public Transition {
   friend CommTestTransition;
 
 public:
-  CommWaitTransition(aid_t issuer, int times_considered, char* buffer);
+  CommWaitTransition(aid_t issuer, int times_considered, std::stringstream& stream);
   std::string to_string(bool verbose) const override;
   bool depends(const Transition* other) const override;
 };
@@ -49,7 +50,7 @@ class CommTestTransition : public Transition {
   friend CommRecvTransition;
 
 public:
-  CommTestTransition(aid_t issuer, int times_considered, char* buffer);
+  CommTestTransition(aid_t issuer, int times_considered, std::stringstream& stream);
   std::string to_string(bool verbose) const override;
   bool depends(const Transition* other) const override;
 };
@@ -59,7 +60,7 @@ class CommRecvTransition : public Transition {
   void* dst_buff_;
 
 public:
-  CommRecvTransition(aid_t issuer, int times_considered, char* buffer);
+  CommRecvTransition(aid_t issuer, int times_considered, std::stringstream& stream);
   std::string to_string(bool verbose) const override;
   bool depends(const Transition* other) const override;
 };
@@ -70,13 +71,22 @@ class CommSendTransition : public Transition {
   size_t size_;
 
 public:
-  CommSendTransition(aid_t issuer, int times_considered, char* buffer);
+  CommSendTransition(aid_t issuer, int times_considered, std::stringstream& stream);
+  std::string to_string(bool verbose) const override;
+  bool depends(const Transition* other) const override;
+};
+
+class TestAnyTransition : public Transition {
+  std::vector<Transition*> transitions_;
+
+public:
+  TestAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream);
   std::string to_string(bool verbose) const override;
   bool depends(const Transition* other) const override;
 };
 
 /** Make a new transition from serialized description */
-Transition* recv_transition(aid_t issuer, int times_considered, Transition::Type simcall, char* buffer);
+Transition* recv_transition(aid_t issuer, int times_considered, std::stringstream& stream);
 
 } // namespace mc
 } // namespace simgrid