8 #define DRIPLINE_API_EXPORTS
19 return static_cast< unsigned >( an_op );
23 return static_cast< op_t >( an_op_uint );
27 return a_os <<
to_uint( an_op );
36 default:
return "unknown";
45 throw dripline_error() <<
"unable to map <" << an_op_str <<
"> to an op_t value";
52 return static_cast< unsigned >( a_msg );
56 return static_cast< msg_t >( a_msg_uint );
60 return a_os <<
to_uint( a_msg );
69 default:
return "unknown";
78 throw dripline_error() <<
"unable to map <" << a_msg_str <<
"> to a msg_t value";
Dripline-specific errors.
std::ostream & operator<<(std::ostream &a_os, op_t an_op)
Pass the integer-equivalent of a message-operation enum to an ostream.
std::string to_string(op_t an_op)
Gives the human-readable version of a message operation.
unsigned to_uint(op_t an_op)
Convert a message-operation enum to an integer.
op_t to_op_t(unsigned an_op_uint)
msg_t to_msg_t(unsigned a_msg_uint)