/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. // For more information, see http://www.boost.org
  8. #ifndef BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
  9. #define BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
  10. #include <boost/signals2/slot_base.hpp>
  11. namespace boost
  12. {
  13. namespace signals2
  14. {
  15. namespace detail
  16. {
  17. template<typename ResultSlot, typename SlotIn, typename SlotFunction>
  18. ResultSlot replace_slot_function(const SlotIn &slot_in, const SlotFunction &fun)
  19. {
  20. ResultSlot slot(fun);
  21. slot.track(slot_in);
  22. return slot;
  23. }
  24. } // namespace detail
  25. } // namespace signals2
  26. } // namespace boost
  27. #endif // BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP