Port to boost::signals2

This commit is contained in:
Aleric Inglewood
2011-06-09 15:25:03 +02:00
parent 5d87098bd0
commit 425e1581ae
11 changed files with 16 additions and 24 deletions

View File

@@ -33,7 +33,7 @@
#include "aithreadsafe.h"
#include "llfasttimer.h"
#include <boost/signal.hpp>
#include <boost/signals2.hpp>
//!
// A AIStateMachine is a base class that allows derived classes to
@@ -194,12 +194,12 @@ class AIStateMachine {
bool mAbortParent; //!< If true, abort parent on abort(). Otherwise continue as normal.
// From outside a state machine:
struct callback_type {
typedef boost::signal<void (bool)> signal_type;
typedef boost::signals2::signal<void (bool)> signal_type;
callback_type(signal_type::slot_type const& slot) { connection = signal.connect(slot); }
~callback_type() { connection.disconnect(); }
void callback(bool success) const { signal(success); }
private:
boost::signals::connection connection;
boost::signals2::connection connection;
signal_type signal;
};
callback_type* mCallback; //!< Pointer to signal/connection, or NULL when not connected.