sigx++  2.0.1
lockable_fwddecl.h
Go to the documentation of this file.
1 #ifndef _SIGX_LOCKABLE_FWDDECL_HPP_
2 #define _SIGX_LOCKABLE_FWDDECL_HPP_
3 
4 /*
5  * Copyright 2008 Klaus Triendl
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21 */
22 
23 #include <tr1/type_traits>
24 
25 
26 namespace sigx
27 {
28 
29 //enum locking_policy;
31 {
34 };
35 
36 template<typename T_mutex, locking_policy I_policy>
37 struct choose_lock;
38 
39 template<typename T_mutex>
40 struct lockable_base;
41 template<typename T_type, typename T_mutex>
42 struct lockable;
43 template<typename T_type, typename T_mutex>
44 struct safe_lockable;
45 
46 template<locking_policy I_policy, typename T_type, typename T_mutex = typename T_type::mutex_type, typename T_islockable = typename std::tr1::is_base_of<lockable_base<T_mutex>, T_type>::type>
47 class lock_acquirer;
48 template<typename T_type, typename T_mutex = typename T_type::mutex_type, typename T_islockable = typename std::tr1::is_base_of<lockable_base<T_mutex>, T_type>::type>
49 class writelock_acquirer;
50 template<typename T_type, typename T_mutex = typename T_type::mutex_type, typename T_islockable = typename std::tr1::is_base_of<lockable_base<T_mutex>, T_type>::type>
51 class readlock_acquirer;
52 
53 }
54 
55 
56 #endif // end file guard