diff options
Diffstat (limited to 'src/Common/RequestManager.h')
-rw-r--r-- | src/Common/RequestManager.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Common/RequestManager.h b/src/Common/RequestManager.h index c050d1d..2013860 100644 --- a/src/Common/RequestManager.h +++ b/src/Common/RequestManager.h @@ -20,7 +20,6 @@ #ifndef MAD_COMMON_REQUESTMANAGER_H_ #define MAD_COMMON_REQUESTMANAGER_H_ -#include "RequestHandler.h" #include <Net/Connection.h> #include <map> @@ -30,7 +29,8 @@ namespace Mad { namespace Common { -class Request; +class RequestBase; +class RequestHandler; class RequestManager { private: @@ -42,10 +42,7 @@ class RequestManager { public: RequestMap() {} - ~RequestMap() { - for(iterator it = begin(); it != end(); ++it) - delete it->second; - } + ~RequestMap(); bool addRequest(uint16_t id, RequestHandler *info); RequestHandler* findRequest(uint16_t id); @@ -105,7 +102,7 @@ class RequestManager { void unregisterPacketType(Net::Packet::Type type); - bool sendRequest(Net::Connection *connection, Request *request); + bool sendRequest(Net::Connection *connection, std::auto_ptr<RequestBase> request); virtual ~RequestManager(); }; |