sigx++
2.0.1
Main Page
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
sigx
auto_tunneler.h
Go to the documentation of this file.
1
#ifndef _SIGX_AUTO_TUNNELER_HPP_
2
#define _SIGX_AUTO_TUNNELER_HPP_
3
4
/*
5
* Copyright 2005 Tim Mayberry
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/internal_types.h
>
25
#include <
sigx/tunnel_functor.h
>
26
27
28
namespace
sigx
29
{
30
31
namespace
internal
32
{
33
39
template
<
typename
T_functor,
40
bool
I_istunneled =
is_functor_tunneled<T_functor>::value
>
41
struct
auto_tunneler
42
{
43
static
const
bool
is_tunneled
=
false
;
44
typedef
tunnel_functor<ASYNC, T_functor>
functor_type
;
45
static
functor_type
auto_open_tunnel
(
const
T_functor& _A_func)
46
{
47
return
open_tunnel
(_A_func);
48
}
49
};
50
55
template
<
typename
T_functor>
56
struct
auto_tunneler
<T_functor, true>
57
{
58
static
const
bool
is_tunneled
=
true
;
59
typedef
T_functor
functor_type
;
60
static
const
functor_type
&
auto_open_tunnel
(
const
T_functor& _A_func)
61
{
62
return
_A_func;
63
}
64
};
65
66
67
}
// namespace internal
68
69
}
// namespace sigx
70
71
72
#endif // end file guard
Generated on Fri Oct 25 2013 11:35:30 for sigx++ by
1.8.4