sigx++
2.0.1
Main Page
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
sigx
request_f.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
/* Do not edit! -- generated file */
3
4
5
#ifndef _SIGXMACROS_REQUEST_F_H_
6
#define _SIGXMACROS_REQUEST_F_H_
7
8
9
/*
10
* Copyright 2007 Klaus Triendl
11
*
12
* This library is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU Library General Public
14
* License as published by the Free Software Foundation; either
15
* version 2 of the License, or (at your option) any later version.
16
*
17
* This library is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* Library General Public License for more details.
21
*
22
* You should have received a copy of the GNU Library General Public
23
* License along with this library; if not, write to the Free
24
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
*/
26
27
#include <sigc++/slot.h>
28
#include <
sigx/noncopyable.h
>
29
#include <
sigx/nonheapallocatable.h
>
30
#include <
sigx/nonpointeraliasing.h
>
31
#include <
sigx/internal_types.h
>
32
#include <
sigx/static_assert.h
>
33
34
35
namespace
sigx
36
{
37
91
template
<
typename
T_arg1 = sigc::nil,
typename
T_arg2 = sigc::nil,
typename
T_arg3 = sigc::nil,
typename
T_arg4 = sigc::nil,
typename
T_arg5 = sigc::nil,
typename
T_arg6 = sigc::nil,
typename
T_arg7 = sigc::nil>
92
class
request_f
:
noncopyable
,
nonheapallocatable
,
nonpointeraliasing
,
protected
sigc::slot<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>
93
{
94
public
:
95
typedef
sigc::slot<void,T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>
parent_type
;
96
97
// allow function operator to be used
98
using
parent_type::operator ();
99
109
template
<
typename
T_functor>
110
explicit
request_f
(
const
T_functor& _A_func):
111
parent_type
(
tunnel_functor
<
ASYNC
, T_functor>(_A_func))
112
{
113
// passed in functor must not be tunneled
114
SIGX_STATIC_ASSERT
((
internal::is_functor_tunneled<T_functor>::value
==
false
));
115
116
// passed in functor must not be a slot or adapt a slot;
117
// we have to apply this restriction because slots might have bound
118
// trackables that can cause non-threadsafe access to the passed in slot
119
// which will live in the context of the server thread
120
SIGX_STATIC_ASSERT
((
sigx::internal::is_or_adapts_slot<T_functor>::value
==
false
));
121
}
122
};
123
124
125
}
// namespace sigx
126
#endif
/* _SIGXMACROS_REQUEST_F_H_ */
Generated on Fri Oct 25 2013 11:35:30 for sigx++ by
1.8.4