29 #include <boost/shared_ptr.hpp>
32 #include <boost/function.hpp>
35 #include <boost/signals2/signal.hpp>
38 #include <boost/thread.hpp>
49 friend class WCondition_test;
54 typedef boost::shared_ptr< WCondition >
SPtr;
59 typedef boost::shared_ptr< const WCondition >
ConstSPtr;
74 virtual void wait()
const;
93 boost::signals2::connection
subscribeSignal( t_ConditionNotifierType notifier )
const;
119 #endif // WCONDITION_H
boost::signals2::connection subscribeSignal(t_ConditionNotifierType notifier) const
Subscribes a specified function to be notified on condition change.
boost::signals2::signal< void(void)> t_ConditionSignalType
Type used for condition notification.
boost::function0< void > t_ConditionNotifierType
Type used for signalling condition changes.
t_ConditionSignalType signal_ConditionFired
Signal getting fired whenever the condition fires.
boost::shared_mutex m_mutex
The mutex used for the condition.
boost::shared_ptr< const WCondition > ConstSPtr
Const shared pointer type for WCondition.
Class to encapsulate boost::condition_variable_any.
virtual void notify()
Notifies all waiting threads.
boost::condition_variable_any m_condition
The condition.
WCondition()
Default constructor.
virtual ~WCondition()
Destructor.
boost::shared_ptr< WCondition > SPtr
Shared pointer type for WCondition.
virtual void wait() const
Wait for the condition.