yasmine
simple_state_model_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 #ifndef SIMPLE_STATE_MODEL_IMPL_D70699AF_2D8D_4556_8F0B_A16E3FF78852
12 #define SIMPLE_STATE_MODEL_IMPL_D70699AF_2D8D_4556_8F0B_A16E3FF78852
13 
14 
15 #include "simple_state_model.hpp"
16 #include "state_model_impl.hpp"
17 #include "region_model_fwd.hpp"
18 
19 
20 namespace sxy
21 {
22 
23 
24 namespace model
25 {
26 
27 
30 class simple_state_model_impl SX_FINAL:
31  public virtual simple_state_model, public state_model_impl
32 {
33 public:
42  explicit simple_state_model_impl( const std::string& _name, const std::string& _enter_behavior = "",
43  const std::string& _do_behavior = "", const std::string& _exit_behavior = "",
44  const event_ids& _deferred_events = event_ids(), event_sptr _error_event = event_sptr(), bool _is_async = false );
45  virtual ~simple_state_model_impl() SX_NOEXCEPT SX_OVERRIDE;
46  SX_NO_COPY( simple_state_model_impl )
48  virtual const std::string& get_enter_behavior() const SX_OVERRIDE;
50  virtual void set_enter_behavior( const std::string& _enter_behavior ) SX_OVERRIDE;
52  virtual const std::string& get_do_behavior() const SX_OVERRIDE;
54  virtual void set_do_behavior( const std::string& _do_behavior ) SX_OVERRIDE;
56  virtual const std::string& get_exit_behavior() const SX_OVERRIDE;
58  virtual void set_exit_behavior( const std::string& _exit_behavior ) SX_OVERRIDE;
59  virtual const raw_const_region_models get_regions() const SX_OVERRIDE;
60  virtual void accept( model_vertex_visitor& _constructor_visitor ) const SX_OVERRIDE;
63  virtual event_sptr get_error_event() const SX_OVERRIDE;
65  virtual void set_error_event( event_sptr _error_event ) SX_OVERRIDE;
68  virtual bool is_async() const SX_OVERRIDE;
70  virtual void set_is_async( bool _is_async ) SX_OVERRIDE;
71 
72 
73 private:
74  std::string enter_behavior_;
75  std::string do_behavior_;
76  std::string exit_behavior_;
77  event_sptr error_event_;
78  bool is_async_;
79 };
80 
81 
82 }
83 
84 
85 }
86 
87 
88 #endif
std::vector< const region_model * > raw_const_region_models
Definition: region_model_fwd.hpp:35
A simple state in the model.
std::vector< event_id > event_ids
The type alias for yasmine model&#39;s event ID list.
Definition: event_model_id.hpp:35
Definition: algorithm_parameters.hpp:16
sxe::shared_ptr< event_model > event_sptr
Definition: event_model_id.hpp:48