FSM Library - C++ version
FsmTransition.h
1 /*
2  * Copyright. GaĆ«l Dottel, Christoph Hilken, and Jan Peleska 2016 - 2021
3  *
4  * Licensed under the EUPL V.1.1
5  */
6 #ifndef FSM_FSM_FSMTRANSITION_H_
7 #define FSM_FSM_FSMTRANSITION_H_
8 
9 #include <memory>
10 
11 #include "fsm/FsmLabel.h"
12 
13 class FsmNode;
14 
16 {
17 private:
21  std::weak_ptr<FsmNode> source;
22 
26  std::weak_ptr<FsmNode> target;
27 
31  FsmLabel label;
32 public:
39  FsmTransition(const std::shared_ptr<FsmNode> source, const std::shared_ptr<FsmNode> target, const FsmLabel & label);
40 
45  std::shared_ptr<FsmNode> getSource() const;
46 
51  std::shared_ptr<FsmNode> getTarget() const;
52 
57  FsmLabel getLabel() const;
58 
65  friend std::ostream & operator<<(std::ostream & out, const FsmTransition & transition);
66 };
67 #endif //FSM_FSM_FSMTRANSITION_H_
friend std::ostream & operator<<(std::ostream &out, const FsmTransition &transition)
Definition: FsmTransition.cpp:30
std::shared_ptr< FsmNode > getTarget() const
Definition: FsmTransition.cpp:20
Definition: FsmLabel.h:13
FsmLabel getLabel() const
Definition: FsmTransition.cpp:25
std::shared_ptr< FsmNode > getSource() const
Definition: FsmTransition.cpp:15
FsmTransition(const std::shared_ptr< FsmNode > source, const std::shared_ptr< FsmNode > target, const FsmLabel &label)
Definition: FsmTransition.cpp:9
Definition: FsmNode.h:27
Definition: FsmTransition.h:15