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