1 #ifndef SUBORDINATION_PPL_PIPELINE_BASE_HH     2 #define SUBORDINATION_PPL_PIPELINE_BASE_HH     5 #include <unistdx/base/log_message>     9     enum struct pipeline_state {
    21         typedef clock_type::time_point time_point;
    22         typedef clock_type::duration duration;
    25         volatile pipeline_state _state = pipeline_state::initial;
    26         time_point _start = time_point(duration::zero());
    27         const char* _name = 
"ppl";
    44         setstate(pipeline_state rhs) noexcept {
    46             if (rhs == pipeline_state::starting) {
    52         state() 
const noexcept {
    57         is_starting() 
const noexcept {
    58             return this->_state == pipeline_state::starting;
    62         has_started() 
const noexcept {
    63             return this->_state == pipeline_state::started;
    67         is_running() 
const noexcept {
    68             return this->_state == pipeline_state::starting ||
    69                    this->_state == pipeline_state::started;
    73         is_stopping() 
const noexcept {
    74             return this->_state == pipeline_state::stopping;
    78         has_stopped() 
const noexcept {
    79             return this->_state == pipeline_state::stopped;
    83         start_time_point() 
const noexcept {
    88         has_start_time_point() 
const noexcept {
    89             return this->_start != time_point(duration::zero());
    93         name() 
const noexcept {
    98         set_name(
const char* rhs) noexcept {
   103         set_number(
unsigned rhs) noexcept {
   107         template <
class ... Args>
   109         log(
const Args& ... args)
 const {
   110             sys::log_message(this->_name, args ...);
   115             sys::log_message(this->_name, 
"error: _", err.
what());
   122 #endif // vim:filetype=cpp Definition: pipeline_base.hh:17