Public Member Functions |
| Monitor () |
| Constructs a new monitor with a default value of 0.
|
| Monitor (const T &value) |
| Constructs a new monitor with a given default value.
|
| ~Monitor () |
| Destructs the monitor.
|
template<> |
Monitor< bool > & | operator++ () |
template<> |
Monitor< bool > & | operator-- () |
template<> |
Monitor< bool > & | operator|= (const bool &value) |
|
Monitor & | operator++ () |
| Increment the monitored value, prefix only.
|
Monitor & | operator-- () |
| Decrement the monitored value, prefix only.
|
Monitor & | operator= (const T &value) |
| Assign a new value.
|
Monitor & | operator|= (const T &value) |
| Perform an or operation on the value.
|
void | set (const T &value) |
| Set a new value.
|
|
const T & | waitEQ (const T &value) const |
| Block until the monitor has the given value.
|
const T & | waitNE (const T &value) const |
| Block until the monitor has not the given value.
|
const T & | waitNE (const T &v1, const T &v2) const |
| Block until the monitor has none of the given values.
|
const T & | waitGE (const T &value) const |
| Block until the monitor has a value greater or equal to the given value.
|
const T & | waitLE (const T &value) const |
| Block until the monitor has a value less or equal to the given value.
|
|
bool | operator== (const T &value) const |
bool | operator!= (const T &value) const |
bool | operator< (const T &value) const |
bool | operator> (const T &value) const |
bool | operator<= (const T &value) const |
bool | operator>= (const T &value) const |
bool | operator== (const Monitor< T > &rhs) const |
bool | operator!= (const Monitor< T > &rhs) const |
bool | operator< (const Monitor< T > &rhs) const |
bool | operator> (const Monitor< T > &rhs) const |
bool | operator<= (const Monitor< T > &rhs) const |
bool | operator>= (const Monitor< T > &rhs) const |
|
const T & | operator-> () const |
const T & | get () const |
T | operator+ (const T &value) const |
T | operator| (const T &value) const |
T | operator& (const T &value) const |
template<typename T>
class co::base::Monitor< T >
A monitor primitive.
A monitor has a value, which can be monitored to reach a certain state. The caller is blocked until the condition is fulfilled. The concept is similar to a pthread condition, with more usage convenience.
Definition at line 41 of file monitor.h.