1 #ifndef _SIGX_LOCK_ACQUIRER_H_
2 #define _SIGX_LOCK_ACQUIRER_H_
29 #include <tr1/type_traits>
30 #include <boost/mpl/eval_if.hpp>
31 #include <boost/mpl/identity.hpp>
87 template<locking_policy I_policy,
typename T_type,
typename T_mutex,
typename T_islockable>
94 typedef typename std::tr1::remove_reference<acquired_type>::type
value_type;
96 typedef typename boost::mpl::eval_if_c<
98 std::tr1::add_const<value_type>,
99 boost::mpl::identity<value_type>
102 typedef typename std::tr1::add_reference<typename std::tr1::remove_volatile<const_or_value_type>::type>::type
reference_type;
112 return l.access_acquiree();
132 template<
typename T_lockfwd_arg1>
134 m_lock(_a_mutex, lockfwd_arg1),
161 template<
typename T_type,
typename T_mutex,
typename T_islockable>
179 template<
typename T_lockfwd_arg1>
180 writelock_acquirer(volatile_reference_type _a_value, mutex_type& _a_mutex, T_lockfwd_arg1 lockfwd_arg1):
185 template<
typename T_type,
typename T_mutex,
typename T_islockable>
203 template<
typename T_lockfwd_arg1>
241 template<locking_policy I_policy,
typename T_type,
typename T_mutex>
247 typename boost::mpl::eval_if<
248 std::tr1::is_const<T_type>,
250 std::tr1::add_const<typename T_type::acquired_type>,
252 boost::mpl::identity<typename T_type::acquired_type>
261 typename boost::mpl::eval_if<
262 std::tr1::is_const<T_type>,
263 std::tr1::add_const<typename T_type::acquired_type>,
264 boost::mpl::identity<typename T_type::acquired_type>
269 typedef T_type lockable_type;
277 parent_type(_a_lockable.access_volatile(), _a_lockable.mutex())
283 template<
typename T_lockfwd_arg1>
285 parent_type(_a_lockable.access_volatile(), _a_lockable.mutex(), lockfwd_arg1)
292 template<
typename T_type,
typename T_mutex>
296 typedef T_type lockable_type;
310 template<
typename T_lockfwd_arg1>
319 template<
typename T_type,
typename T_mutex>
323 typedef T_type lockable_type;
337 template<
typename T_lockfwd_arg1>
351 #endif // end file guard