mc_observers::ObserverPipeline::PipelineObserver Struct Reference

#include <mc_observers/ObserverPipeline.h>

Public Member Functions

 PipelineObserver (const mc_observers::ObserverPtr &observer, const mc_rtc::Configuration &config)
 
const Observerobserver () const
 
Observerobserver ()
 
template<typename T >
const T & observer () const
 
template<typename T >
T & observer ()
 
bool update () const noexcept
 
bool log () const noexcept
 
bool gui () const noexcept
 
bool success () const noexcept
 
bool successRequired () const noexcept
 

Protected Attributes

ObserverPtr observer_ = nullptr
 
bool update_ = true
 
bool log_ = true
 
bool gui_ = true
 
bool successRequired_ = true
 
bool success_ = true
 

Friends

struct ObserverPipeline
 

Detailed Description

Holds an observer and its configuration within the ObserverPipeline

Constructor & Destructor Documentation

◆ PipelineObserver()

mc_observers::ObserverPipeline::PipelineObserver::PipelineObserver ( const mc_observers::ObserverPtr observer,
const mc_rtc::Configuration config 
)
inline

Member Function Documentation

◆ gui()

bool mc_observers::ObserverPipeline::PipelineObserver::gui ( ) const
inlinenoexcept

◆ log()

bool mc_observers::ObserverPipeline::PipelineObserver::log ( ) const
inlinenoexcept

◆ observer() [1/4]

Observer& mc_observers::ObserverPipeline::PipelineObserver::observer ( )
inline

◆ observer() [2/4]

template<typename T >
T& mc_observers::ObserverPipeline::PipelineObserver::observer ( )
inline

◆ observer() [3/4]

const Observer& mc_observers::ObserverPipeline::PipelineObserver::observer ( ) const
inline

◆ observer() [4/4]

template<typename T >
const T& mc_observers::ObserverPipeline::PipelineObserver::observer ( ) const
inline

Get a an observer of type T

Note
Requires the code from which this is called to link against the observer's library where type T is declared
Template Parameters
Ttype of the observer requested
Exceptions
Ifthe observer does not exist or does not have the right type

◆ success()

bool mc_observers::ObserverPipeline::PipelineObserver::success ( ) const
inlinenoexcept

Returns whether the last call to this observer succeeded

◆ successRequired()

bool mc_observers::ObserverPipeline::PipelineObserver::successRequired ( ) const
inlinenoexcept

Returns whether this observer must succeed or is allowed to fail When true, the whole pipeline will fail if this observer fails. Otherwise the pipeline will keep executing

◆ update()

bool mc_observers::ObserverPipeline::PipelineObserver::update ( ) const
inlinenoexcept

Friends And Related Function Documentation

◆ ObserverPipeline

friend struct ObserverPipeline
friend

Member Data Documentation

◆ gui_

bool mc_observers::ObserverPipeline::PipelineObserver::gui_ = true
protected

◆ log_

bool mc_observers::ObserverPipeline::PipelineObserver::log_ = true
protected

◆ observer_

ObserverPtr mc_observers::ObserverPipeline::PipelineObserver::observer_ = nullptr
protected

◆ success_

bool mc_observers::ObserverPipeline::PipelineObserver::success_ = true
protected

◆ successRequired_

bool mc_observers::ObserverPipeline::PipelineObserver::successRequired_ = true
protected

◆ update_

bool mc_observers::ObserverPipeline::PipelineObserver::update_ = true
protected

The documentation for this struct was generated from the following file: