yasmine
state_machine_type.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 STATE_MACHINE_TYPE_DF8B2D7E_F25F_43B0_9B98_3A974487574C
12 #define STATE_MACHINE_TYPE_DF8B2D7E_F25F_43B0_9B98_3A974487574C
13 
14 #include <string>
15 
16 
17 namespace sxy
18 {
19 
20 
21 #ifndef SX_CPP03_BOOST
22 
23 
26  enum class state_machine_type
27  {
28  SMT_SYNC = 0, SMT_ASYNC = 1
29  };
30 
31 
32 #else
33 
34 
37  struct state_machine_type
38  {
41  enum inner
42  {
43  SMT_SYNC = 0, SMT_ASYNC = 1
44  };
45 
46 
48  state_machine_type() : value_( SMT_SYNC )
49  {
50  // Nothing to do...
51  }
52 
53 
56  state_machine_type( const inner _value ) : value_( _value )
57  {
58  // Nothing to do...
59  }
60 
61 
65  state_machine_type( const state_machine_type& _state_machine_type ) : value_( _state_machine_type.value_ )
66  {
67  // Nothing to do...
68  }
69 
70 
72  operator inner() const
73  {
74  return ( value_ );
75  }
76 
77 
79  inner value_;
80 
81  };
82 
83 #endif
84 
85  state_machine_type sm_type_from_string( const std::string& _type );
86  const std::string sm_type_to_string( const state_machine_type& _type );
87  const std::string get_state_machine_class_as_string( const state_machine_type& _type );
88  std::istream& operator >> ( std::istream& _in_stream, sxy::state_machine_type& _sm_type );
89 
90 
91 }
92 
93 
94 #endif
const std::string sm_type_to_string(const state_machine_type &_type)
Definition: state_machine_type.cpp:49
state_machine_type
Enumeration for state machine types.
Definition: state_machine_type.hpp:26
std::istream & operator>>(std::istream &_in_stream, sxy::state_machine_type &_sm_type)
Definition: state_machine_type.cpp:90
const std::string get_state_machine_class_as_string(const state_machine_type &_type)
Definition: state_machine_type.cpp:69
Definition: algorithm_parameters.hpp:16
state_machine_type sm_type_from_string(const std::string &_type)
Definition: state_machine_type.cpp:26