sigx++  2.0.1
tunnel_validity_tracker.h
Go to the documentation of this file.
1 #ifndef _SIGX_TUNNEL_VALIDITY_TRACKER_HPP_
2 #define _SIGX_TUNNEL_VALIDITY_TRACKER_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 <sigxconfig.h>
24 #include <sigx/fwddecl.h>
25 
26 
27 namespace sigx
28 {
29 
30 
35 {
36 public:
39  tunnel_validity_tracker& operator =(const tunnel_validity_tracker& other);
41 
42 
50  void do_bind_to_trackable(const sigc::trackable* t) const;
51 
52  void add_connection(const connection_wrapper& c);
53 
58  bool is_valid() const;
59 
63  void activate();
64 
65 
66 
77  static void* notify_from_trackable(void* data);
78 
89  static void notify_dispatcher_change(void* data);
90 
91 private:
92  static void clear_connections(internal::validity_trackable* t);
93  static void cleanup(void* data, bool cleanup_dispatcher);
94  static void on_last_functor(tunnel_validity_tracker& data);
95 
96 
97 private:
99 };
100 
101 
102 } // namespace sigx
103 
104 
105 #endif // end file guard
Interface for tracking the validity of a tunnel.
Definition: tunnel_validity_tracker.h:34
A threadsafe representation of a sigc::connection.
Definition: connection_wrapper.h:35
Lynchpin to track the validity of a tunnel functor and storing information about who needs to be noti...
Definition: validity_trackable.h:42
thread safe dispatcher reference that can be passed around.
Definition: shared_dispatchable.h:50