summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/signals/signal_template.hpp')
-rw-r--r--3rdParty/Boost/src/boost/signals/signal_template.hpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/3rdParty/Boost/src/boost/signals/signal_template.hpp b/3rdParty/Boost/src/boost/signals/signal_template.hpp
index 6b0b91a..94e1d1a 100644
--- a/3rdParty/Boost/src/boost/signals/signal_template.hpp
+++ b/3rdParty/Boost/src/boost/signals/signal_template.hpp
@@ -1,54 +1,53 @@
// Boost.Signals library
// Copyright Douglas Gregor 2001-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// For more information, see http://www.boost.org
// This file intentionally does not have include guards, because it is meant
// to be included multiple times (one for each signalN class). The
// BOOST_SIGNALS_SIGNAL_TEMPLATE_HEADER_INCLUDED macro merely serves to
// suppress reinclusion of the files that this header depends on.
#ifndef BOOST_SIGNALS_SIGNAL_TEMPLATE_HEADER_INCLUDED
#define BOOST_SIGNALS_SIGNAL_TEMPLATE_HEADER_INCLUDED
# include <boost/config.hpp>
# include <boost/signals/connection.hpp>
-# include <boost/utility.hpp>
# include <boost/ref.hpp>
# include <boost/signals/slot.hpp>
# include <boost/last_value.hpp>
# include <boost/signals/detail/signal_base.hpp>
# include <boost/signals/detail/slot_call_iterator.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/type_traits/is_convertible.hpp>
# include <cassert>
# include <functional>
# include <memory>
#endif // !BOOST_SIGNALS_SIGNAL_TEMPLATE_HEADER_INCLUDED
#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_PREFIX
#endif
// Include the appropriate functionN header
#define BOOST_SIGNAL_FUNCTION_N_HEADER BOOST_JOIN(<boost/function/function,BOOST_SIGNALS_NUM_ARGS.hpp>)
#include BOOST_SIGNAL_FUNCTION_N_HEADER
// Determine if a comma should follow a listing of the arguments/parameters
#if BOOST_SIGNALS_NUM_ARGS == 0
# define BOOST_SIGNALS_COMMA_IF_NONZERO_ARGS
#else
# define BOOST_SIGNALS_COMMA_IF_NONZERO_ARGS ,
#endif // BOOST_SIGNALS_NUM_ARGS > 0
// Define class names used
#define BOOST_SIGNALS_SIGNAL BOOST_JOIN(signal,BOOST_SIGNALS_NUM_ARGS)
#define BOOST_SIGNALS_FUNCTION BOOST_JOIN(function,BOOST_SIGNALS_NUM_ARGS)
#define BOOST_SIGNALS_ARGS_STRUCT BOOST_JOIN(args,BOOST_SIGNALS_NUM_ARGS)
#define BOOST_SIGNALS_CALL_BOUND BOOST_JOIN(call_bound,BOOST_SIGNALS_NUM_ARGS)
// Define commonly-used instantiations
#define BOOST_SIGNALS_ARGS_STRUCT_INST \
@@ -178,103 +177,95 @@ namespace boost {
typedef typename Combiner::result_type result_type;
// Combiner type
typedef Combiner combiner_type;
// Slot type
typedef slot<slot_function_type> slot_type;
// Slot name type and comparison
typedef Group group_type;
typedef GroupCompare group_compare_type;
typedef BOOST_SIGNALS_NAMESPACE::detail::slot_call_iterator<
call_bound_slot, iterator> slot_call_iterator;
explicit
BOOST_SIGNALS_SIGNAL(const Combiner& c = Combiner(),
const GroupCompare& comp = GroupCompare()) :
BOOST_SIGNALS_NAMESPACE::detail::signal_base(real_group_compare_type(comp),
c)
{
}
// Connect a slot to this signal
BOOST_SIGNALS_NAMESPACE::connection
connect(const slot_type&,
BOOST_SIGNALS_NAMESPACE::connect_position at
= BOOST_SIGNALS_NAMESPACE::at_back);
BOOST_SIGNALS_NAMESPACE::connection
connect(const group_type&, const slot_type&,
BOOST_SIGNALS_NAMESPACE::connect_position at
= BOOST_SIGNALS_NAMESPACE::at_back);
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- // MSVC 6.0 and 7.0 don't handle the is_convertible test well
- void disconnect(const group_type& group)
- {
- impl->disconnect(group);
- }
-#else
template<typename T>
void disconnect(const T& t)
{
typedef mpl::bool_<(is_convertible<T, group_type>::value)> is_group;
this->do_disconnect(t, is_group());
}
private:
// Disconnect a named slot
void do_disconnect(const group_type& group, mpl::bool_<true>)
{
impl->disconnect(group);
}
template<typename Function>
void do_disconnect(const Function& f, mpl::bool_<false>)
{
// Notify the slot handling code that we are iterating through the slots
BOOST_SIGNALS_NAMESPACE::detail::call_notification notification(this->impl);
for (iterator i = impl->slots_.begin(); i != impl->slots_.end(); ++i) {
slot_function_type& s = *unsafe_any_cast<slot_function_type>(&i->second);
if (s == f) i->first.disconnect();
}
}
-#endif
public:
// Emit the signal
result_type operator()(BOOST_SIGNALS_PARMS);
result_type operator()(BOOST_SIGNALS_PARMS) const;
Combiner& combiner()
{ return *unsafe_any_cast<Combiner>(&impl->combiner_); }
const Combiner& combiner() const
{ return *unsafe_any_cast<const Combiner>(&impl->combiner_); }
};
template<
typename R,
BOOST_SIGNALS_TEMPLATE_PARMS
BOOST_SIGNALS_COMMA_IF_NONZERO_ARGS
typename Combiner,
typename Group,
typename GroupCompare,
typename SlotFunction
>
BOOST_SIGNALS_NAMESPACE::connection
BOOST_SIGNALS_SIGNAL<
R, BOOST_SIGNALS_TEMPLATE_ARGS
BOOST_SIGNALS_COMMA_IF_NONZERO_ARGS
Combiner, Group, GroupCompare, SlotFunction
>::connect(const slot_type& in_slot,
BOOST_SIGNALS_NAMESPACE::connect_position at)
{
using boost::BOOST_SIGNALS_NAMESPACE::detail::stored_group;
// If the slot has been disconnected, just return a disconnected
// connection