SyDEVS  v0.6.7
Multiscale Simulation and Systems Modeling Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
data_mode.h
Go to the documentation of this file.
1 #pragma once
2 #ifndef SYDEVS_SYSTEMS_DATA_MODE_H_
3 #define SYDEVS_SYSTEMS_DATA_MODE_H_
4 
6 #include <string>
7 
8 namespace sydevs {
9 namespace systems {
10 
11 
16 enum class data_mode : int8 {
17  flow,
18  message,
19 };
20 
21 
22 const auto flow = data_mode::flow;
24 
25 
26 const std::string& string_from_data_mode(data_mode dmode);
27 
28 data_mode data_mode_from_string(const std::string& dmode_string);
29 
30 
34 inline constexpr int64 int64_from_data_mode(data_mode dmode)
35 {
36  return static_cast<std::underlying_type<data_mode>::type>(dmode);
37 }
38 
39 
40 } // namespace
41 } // namespace
42 
43 #endif
data_mode
Indicates the relevant data communication paradigm: dataflow (flow) or message-passing (message)...
Definition: data_mode.h:16
constexpr int64 int64_from_data_mode(data_mode dmode)
Returns the integer representation of the dmode value.
Definition: data_mode.h:34
const auto flow
Equivalent to data_mode::flow.
Definition: data_mode.h:22
Indicates message-passing.
data_mode data_mode_from_string(const std::string &dmode_string)
Returns the data_mode value indicated by dmode_string.
Definition: data_mode.cpp:27
const auto message
Equivalent to data_mode::message.
Definition: data_mode.h:23
const std::string & string_from_data_mode(data_mode dmode)
Returns the std::string representation of the dmode value.
Definition: data_mode.cpp:21
int64_t int64
Definition: number_types.h:14
int8_t int8
Definition: number_types.h:11