new script engine, and things maybe be bugged for a while

This commit is contained in:
Eduardo Bart
2011-07-26 20:13:27 -03:00
parent ab7394f357
commit 70f0b0dace
137 changed files with 2905 additions and 2578 deletions

View File

@@ -31,19 +31,18 @@
#include <net/outputmessage.h>
#include <boost/asio.hpp>
#include <boost/function.hpp>
typedef boost::function<void(boost::system::error_code&)> ErrorCallback;
typedef boost::function<void(InputMessage*)> RecvCallback;
typedef std::function<void(boost::system::error_code&)> ErrorCallback;
typedef std::function<void(InputMessage*)> RecvCallback;
class Connection : public boost::enable_shared_from_this<Connection>, boost::noncopyable
class Connection : public std::enable_shared_from_this<Connection>, boost::noncopyable
{
public:
Connection();
static void poll();
void connect(const std::string& host, uint16 port, const boost::function<void()>& connectCallback);
void connect(const std::string& host, uint16 port, const std::function<void()>& connectCallback);
void send(OutputMessage *outputMessage);
void setErrorCallback(const ErrorCallback& errorCallback) { m_errorCallback = errorCallback; }
@@ -66,7 +65,7 @@ public:
private:
ErrorCallback m_errorCallback;
RecvCallback m_recvCallback;
boost::function<void()> m_connectCallback;
std::function<void()> m_connectCallback;
ConnectionState_t m_connectionState;
boost::asio::deadline_timer m_timer;
@@ -76,6 +75,6 @@ private:
};
typedef boost::shared_ptr<Connection> ConnectionPtr;
typedef std::shared_ptr<Connection> ConnectionPtr;
#endif