summaryrefslogtreecommitdiffstats
path: root/src/Client/InformationManager.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-12-17 21:32:20 +0100
committerMatthias Schiffer <matthias@gamezock.de>2008-12-17 21:32:20 +0100
commit389960211861736ef321df82f6abcb59f6302897 (patch)
treecbf44ddc93736ad8f059b947a08c26a31d242ee7 /src/Client/InformationManager.h
parente28a9c25c143635ffe8a1f9cee1d377a69a4f923 (diff)
downloadmad-389960211861736ef321df82f6abcb59f6302897.tar
mad-389960211861736ef321df82f6abcb59f6302897.zip
Sinnlose Klassen SharedPtr und SingletonPtr entfernt
Diffstat (limited to 'src/Client/InformationManager.h')
-rw-r--r--src/Client/InformationManager.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Client/InformationManager.h b/src/Client/InformationManager.h
index 1464e2f..80dab9f 100644
--- a/src/Client/InformationManager.h
+++ b/src/Client/InformationManager.h
@@ -24,8 +24,8 @@
#include <memory>
#include <Common/HostInfo.h>
+#include <Common/Initializable.h>
#include <Common/Request.h>
-#include <Common/SingletonPtr.h>
namespace Mad {
@@ -40,7 +40,7 @@ class HostListPacket;
namespace Client {
-class InformationManager {
+class InformationManager : public Common::Initializable {
private:
class DaemonStateUpdateRequest : public Common::RequestHandler {
protected:
@@ -50,7 +50,7 @@ class InformationManager {
DaemonStateUpdateRequest() {}
};
- static Common::SingletonPtr<InformationManager> informationManager;
+ static InformationManager informationManager;
std::map<std::string, Common::HostInfo> daemons;
@@ -60,16 +60,19 @@ class InformationManager {
InformationManager(const InformationManager &o);
InformationManager& operator=(const InformationManager &o);
+ InformationManager() : updating(false) {}
+
void daemonListRequestFinished(const Common::Request<Net::Packets::HostListPacket> &request);
+ protected:
+ virtual void doInit();
+ virtual void doDeinit();
+
public:
- static InformationManager* get() {
- return informationManager.get();
+ static InformationManager *get() {
+ return &informationManager;
}
- InformationManager();
- virtual ~InformationManager();
-
void updateDaemonList(Net::Connection *con);
bool isUpdating() const {