summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestManager.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-17 05:33:01 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-17 05:33:01 +0200
commit039c218a7b1f2eae4f8e8305bc8e8bf70a67beab (patch)
tree362a59253abd77b5e41800d73a7c5dacf18617f7 /src/Common/RequestManager.h
parenta0cffb5475d35f0a19b95af2ce56bf6c90c82256 (diff)
downloadmad-039c218a7b1f2eae4f8e8305bc8e8bf70a67beab.tar
mad-039c218a7b1f2eae4f8e8305bc8e8bf70a67beab.zip
Interface der Request-Klassen verbessert; muss noch vereinfacht werden
Diffstat (limited to 'src/Common/RequestManager.h')
-rw-r--r--src/Common/RequestManager.h11
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();
};