Equalizer 1.0

co::base::Monitor< T > Class Template Reference

A monitor primitive. More...

#include <monitor.h>

Inheritance diagram for co::base::Monitor< T >:
Collaboration diagram for co::base::Monitor< T >:

List of all members.

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)
Changing the monitored value.
Monitoroperator++ ()
 Increment the monitored value, prefix only.
Monitoroperator-- ()
 Decrement the monitored value, prefix only.
Monitoroperator= (const T &value)
 Assign a new value.
Monitoroperator|= (const T &value)
 Perform an or operation on the value.
void set (const T &value)
 Set a new value.
Monitor the 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.
Comparison Operators. @version 1.0
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
Data Access.
const T & operator-> () const
const T & get () const
operator+ (const T &value) const
operator| (const T &value) const
operator& (const T &value) const

Detailed Description

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.


Constructor & Destructor Documentation

template<typename T>
co::base::Monitor< T >::Monitor ( ) [inline]

Constructs a new monitor with a default value of 0.

Version:
1.0

Definition at line 45 of file monitor.h.

template<typename T>
co::base::Monitor< T >::Monitor ( const T &  value) [inline]

Constructs a new monitor with a given default value.

Version:
1.0

Definition at line 48 of file monitor.h.

template<typename T>
co::base::Monitor< T >::~Monitor ( ) [inline]

Destructs the monitor.

Version:
1.0

Definition at line 51 of file monitor.h.


Member Function Documentation

template<typename T>
const T& co::base::Monitor< T >::get ( ) const [inline]
Returns:
the current value.
Version:
1.0

Definition at line 211 of file monitor.h.

Referenced by eq::Config::getFinishedFrame(), eq::FrameData::isReady(), and co::base::operator<<().

Here is the caller graph for this function:

template<typename T>
T co::base::Monitor< T >::operator& ( const T &  value) const [inline]
Returns:
the current and the given value.
Version:
1.0

Definition at line 221 of file monitor.h.

template<typename T>
T co::base::Monitor< T >::operator+ ( const T &  value) const [inline]
Returns:
the current plus the given value.
Version:
1.0

Definition at line 214 of file monitor.h.

template<typename T>
Monitor& co::base::Monitor< T >::operator++ ( void  ) [inline]

Increment the monitored value, prefix only.

Version:
1.0

Definition at line 56 of file monitor.h.

template<typename T>
Monitor& co::base::Monitor< T >::operator-- ( void  ) [inline]

Decrement the monitored value, prefix only.

Version:
1.0

Definition at line 66 of file monitor.h.

template<typename T>
const T& co::base::Monitor< T >::operator-> ( ) const [inline]
Returns:
the current value.
Version:
1.0

Definition at line 208 of file monitor.h.

template<typename T>
Monitor& co::base::Monitor< T >::operator= ( const T &  value) [inline]

Assign a new value.

Version:
1.0

Definition at line 76 of file monitor.h.

template<typename T>
T co::base::Monitor< T >::operator| ( const T &  value) const [inline]
Returns:
the current or'ed with the given value.
Version:
1.0

Definition at line 217 of file monitor.h.

template<typename T>
Monitor& co::base::Monitor< T >::operator|= ( const T &  value) [inline]

Perform an or operation on the value.

Version:
1.0

Definition at line 83 of file monitor.h.

template<typename T>
void co::base::Monitor< T >::set ( const T &  value) [inline]

Set a new value.

Version:
1.0

Definition at line 93 of file monitor.h.

template<typename T>
const T& co::base::Monitor< T >::waitEQ ( const T &  value) const [inline]

Block until the monitor has the given value.

Returns:
the value when reaching the condition.
Version:
1.0

Definition at line 109 of file monitor.h.

template<typename T>
const T& co::base::Monitor< T >::waitGE ( const T &  value) const [inline]

Block until the monitor has a value greater or equal to the given value.

Returns:
the value when reaching the condition.
Version:
1.0

Definition at line 154 of file monitor.h.

Referenced by eq::FrameData::waitReady().

Here is the caller graph for this function:

template<typename T>
const T& co::base::Monitor< T >::waitLE ( const T &  value) const [inline]

Block until the monitor has a value less or equal to the given value.

Returns:
the value when reaching the condition.
Version:
1.0

Definition at line 170 of file monitor.h.

template<typename T>
const T& co::base::Monitor< T >::waitNE ( const T &  v1,
const T &  v2 
) const [inline]

Block until the monitor has none of the given values.

Returns:
the value when reaching the condition.
Version:
1.0

Definition at line 138 of file monitor.h.

template<typename T>
const T& co::base::Monitor< T >::waitNE ( const T &  value) const [inline]

Block until the monitor has not the given value.

Returns:
the value when reaching the condition.
Version:
1.0

Definition at line 123 of file monitor.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3