sigx++  2.0.1
locking_dispatcher_ptr.h
Go to the documentation of this file.
1 #ifndef _SIGX_LOCKING_DISPATCHER_PTR_H_
2 #define _SIGX_LOCKING_DISPATCHER_PTR_H_
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 <sigx/fwddecl.h>
25 #include <sigx/lock_acquirer.h>
26 
27 
28 namespace sigx
29 {
30 
40 {
41 public:
42  explicit DispatcherPtr(shared_dispatchable& _A_disp):
43  m_locker(*_A_disp.m_disp_ptr)
44  {}
45 
49  { return access_acquiree(m_locker); }
50  operator bool()
51  { return access_acquiree(m_locker); }
52  bool operator !()
53  { return !access_acquiree(m_locker); }
55  { return other != access_acquiree(m_locker); }
56 
57 private:
59 };
60 
61 
62 } // namespace sigx
63 
64 
65 #endif // file guard