request_f.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 /* Do not edit! -- generated file */
00003 
00004 
00005 #ifndef _SIGXMACROS_REQUEST_F_H_
00006 #define _SIGXMACROS_REQUEST_F_H_
00007 
00008 
00009 /*
00010  * Copyright 2007 Klaus Triendl
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Library General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Library General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Library General Public
00023  * License along with this library; if not, write to the Free
00024  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025 */
00026 
00027 #include <sigc++/slot.h>
00028 #include <sigx/noncopyable.h>
00029 #include <sigx/nonheapallocatable.h>
00030 #include <sigx/nonpointeraliasing.h>
00031 #include <sigx/internal_types.h>
00032 #include <sigx/static_assert.h>
00033 
00034 
00035 namespace sigx
00036 {
00037 
00091 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>
00092 class request_f: noncopyable, nonheapallocatable, nonpointeraliasing, protected sigc::slot<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>
00093 {
00094 public:
00095     typedef sigc::slot<void,T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7> parent_type;
00096     
00097     // allow function operator to be used
00098     using parent_type::operator ();
00099 
00109     template<typename T_functor>
00110     explicit request_f(const T_functor& _A_func): 
00111         parent_type(tunnel_functor<ASYNC, T_functor>(_A_func))
00112     {
00113         // passed in functor must not be tunneled
00114         SIGX_STATIC_ASSERT((internal::is_functor_tunneled<T_functor>::value == false));
00115 
00116         // passed in functor must not be a slot or adapt a slot;
00117         // we have to apply this restriction because slots might have bound
00118         // trackables that can cause non-threadsafe access to the passed in slot
00119         // which will live in the context of the server thread
00120         SIGX_STATIC_ASSERT((sigx::internal::is_or_adapts_slot<T_functor>::value == false));
00121     }
00122 };
00123 
00124 
00125 } // namespace sigx
00126 #endif /* _SIGXMACROS_REQUEST_F_H_ */

Generated on Sun May 17 15:47:34 2009 for sigx++ by  doxygen 1.5.9