yasmine
transition.hpp
Go to the documentation of this file.
1 // //
3 // This file is part of the Seadex yasmine ecosystem (http://yasmine.seadex.de). //
4 // Copyright (C) 2016-2017 Seadex GmbH //
5 // //
6 // Licensing information is available in the folder "license" which is part of this distribution. //
7 // The same information is available on the www @ http://yasmine.seadex.de/Licenses.html. //
8 // //
10 
11 
12 #ifndef TRANSITION_9D568568_F100_40E3_B02C_1141C218D7D8
13 #define TRANSITION_9D568568_F100_40E3_B02C_1141C218D7D8
14 
15 
17 
18 #include "transition_kind.hpp"
19 #include "event_id.hpp"
20 #include "transition_fwd.hpp"
21 
22 
23 namespace sxy
24 {
25 
26 
27 class vertex;
28 class constraint;
29 class behavior;
30 class event;
31 class event_collector;
32 
33 
34 class transition:
35  public virtual state_machine_element
36 {
37 public:
39  {
40  // Nothing to do...
41  }
42 
43 
44  virtual ~transition() SX_NOEXCEPT SX_OVERRIDE
45  {
46  // Nothing to do...
47  }
48 
49 
50  SX_NO_COPY(transition)
51  virtual const vertex& get_source() const = 0;
52  virtual const vertex& get_target() const = 0;
53  virtual vertex& get_target() = 0;
54  virtual const constraint * get_guard() const = 0;
55  virtual const behavior * get_behavior() const = 0;
56  virtual sxy::transition_kind get_kind() const = 0;
57  virtual void on_transition_behavior( const event& _event, event_collector& _event_collector ) const = 0;
58  virtual bool check_guard( const event& _event, event_collector& _event_collector ) const = 0;
59  virtual bool check( state_machine_defects& _defects ) const SX_OVERRIDE = 0;
60  virtual bool can_accept_event( const event_id _event ) const = 0;
61 };
62 
63 
64 }
65 
66 
67 #endif
Definition: event_collector.hpp:25
virtual ~transition() SX_NOEXCEPT SX_OVERRIDE
Definition: transition.hpp:44
virtual const behavior * get_behavior() const =0
std::vector< state_machine_defect > state_machine_defects
Definition: state_machine_defect_fwd.hpp:23
transition()
Definition: transition.hpp:38
Definition: state_machine_element.hpp:26
virtual bool can_accept_event(const event_id _event) const =0
sxe::uint32_t event_id
The type alias for yasmine&#39;s event IDs.
Definition: event_id.hpp:26
Interface of an event. An event has an ID, a name and a priority (for processing by the async state m...
Definition: event.hpp:28
virtual const vertex & get_target() const =0
Definition: adapter_cpp11.hpp:21
Definition: constraint.hpp:28
virtual bool check_guard(const event &_event, event_collector &_event_collector) const =0
Definition: vertex.hpp:36
Definition: behavior.hpp:26
Definition: transition.hpp:34
virtual bool check(state_machine_defects &_defects) const SX_OVERRIDE=0
virtual sxy::transition_kind get_kind() const =0
virtual void on_transition_behavior(const event &_event, event_collector &_event_collector) const =0
virtual const vertex & get_source() const =0
transition_kind
Definition: transition_kind.hpp:25
virtual const constraint * get_guard() const =0