yasmine
event_impl.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 EVENT_IMPL_447B2A6E_B2CC_4851_A3EB_68ACC838AEA2
13 #define EVENT_IMPL_447B2A6E_B2CC_4851_A3EB_68ACC838AEA2
14 
15 
16 #include "event.hpp"
17 
18 
19 namespace sxy
20 {
21 
25 class event_impl:
26  public event
27 {
28 public:
29  explicit event_impl( const event_id _event_id, const event_priority _event_priority = DEFAULT_EVENT_PRIORITY );
30  virtual ~event_impl() SX_NOEXCEPT SX_OVERRIDE;
31  SX_NO_COPY(event_impl)
32 
33 
34  virtual event_id get_id() const SX_OVERRIDE;
36 
39  virtual std::string get_name() const SX_OVERRIDE;
40 
43  virtual event_priority get_priority() const SX_OVERRIDE;
44 
48  virtual bool operator>(const event& _rhs) const SX_OVERRIDE;
49 
55  static event_sptr create( const event_id _event_id, const event_priority _event_priority = DEFAULT_EVENT_PRIORITY );
56 
57 
58 private:
59  event_id event_id_;
60  event_priority event_priority_;
61 };
62 
63 
64 }
65 
66 
67 #endif
sxe::int8_t event_priority
The type alias for yasmine's event priorities.
Definition: event_priority.hpp:26
virtual bool operator>(const event &_rhs) const SX_OVERRIDE
Method for comparing the priorities between the current event and a given event.
Definition: event_impl.cpp:57
virtual event_priority get_priority() const SX_OVERRIDE
Getter of event's priority.
Definition: event_impl.cpp:51
sxe::uint32_t event_id
The type alias for yasmine'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
Definition: adapter_cpp11.hpp:21
static event_sptr create(const event_id _event_id, const event_priority _event_priority=DEFAULT_EVENT_PRIORITY)
Static method for creating an event with the given ID and a priority. has DEFAULT_EVENT_PRIORITY as ...
Definition: event_impl.cpp:63
constexpr event_priority DEFAULT_EVENT_PRIORITY
yasmine's predefined default event priority.
Definition: event_priority.hpp:42
Events that are processed by the state machine. An event can have an ID, a name and a priority (for p...
Definition: event_impl.hpp:25
sxe::shared_ptr< event > event_sptr
Definition: event_fwd.hpp:25
virtual std::string get_name() const SX_OVERRIDE
Getter of event&#39;s name.
Definition: event_impl.cpp:45
event_impl(const event_id _event_id, const event_priority _event_priority=DEFAULT_EVENT_PRIORITY)
Definition: event_impl.cpp:24
virtual ~event_impl() SX_NOEXCEPT SX_OVERRIDE
Definition: event_impl.cpp:33
virtual event_id get_id() const SX_OVERRIDE
Getter of event&#39;s ID.
Definition: event_impl.cpp:39