PageRenderTime 45ms CodeModel.GetById 42ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/signals2/detail/replace_slot_function.hpp

http://hadesmem.googlecode.com/
C++ Header | 32 lines | 20 code | 5 blank | 7 comment | 0 complexity | 06f8b0fbf5647bb12250add619a725b0 MD5 | raw file
 1// Copyright Frank Mori Hess 2007-2009
 2//
 3// Use, modification and
 4// distribution is subject to the Boost Software License, Version
 5// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 6// http://www.boost.org/LICENSE_1_0.txt)
 7
 8// For more information, see http://www.boost.org
 9
10#ifndef BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
11#define BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
12
13#include <boost/signals2/slot_base.hpp>
14
15namespace boost
16{
17  namespace signals2
18  {
19    namespace detail
20    {
21      template<typename ResultSlot, typename SlotIn, typename SlotFunction>
22        ResultSlot replace_slot_function(const SlotIn &slot_in, const SlotFunction &fun)
23      {
24        ResultSlot slot(fun);
25        slot.track(slot_in);
26        return slot;
27      }
28    } // namespace detail
29  } // namespace signals2
30} // namespace boost
31
32#endif // BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP