]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.hh
no more useless singleton class
[chaz/yoink] / src / Moof / Engine.hh
index 76120c49c890b45bba4beb618504f3ea76403df2..aa751356f6a81b6ec1712cf1ee7bdf322384d749 100644 (file)
@@ -36,7 +36,6 @@
 #include <Moof/Dispatcher.hh>
 #include <Moof/Event.hh>
 #include <Moof/Math.hh>
-#include <Moof/Singleton.hh>
 
 
 namespace Mf {
@@ -45,11 +44,15 @@ namespace Mf {
 // forward declaration
 class Video;
 
-class Engine : public Singleton<Engine>
+class Engine
 {
-public:
+protected:
+
        Engine(int argc, char* argv[], const std::string& configFile,
                        const std::string& name, const std::string& iconFile);
+
+public:
+
        virtual ~Engine();
 
        int run();
@@ -63,7 +66,7 @@ public:
        Video& getVideo();
        long getFrameRate();
 
-       // Override these if you want.
+       // override these if you want
        virtual void update(Scalar t, Scalar dt);
        virtual void draw(Scalar alpha);
        virtual void handleEvent(const Event& event);
@@ -75,8 +78,10 @@ public:
        };
 
 private:
-       class EngineImpl;
-       boost::shared_ptr<EngineImpl> impl_;
+       Engine() {} // this class must be subclassed to be useful
+
+       class Impl;
+       boost::shared_ptr<Impl> impl_;
 };
 
 
This page took 0.020841 seconds and 4 git commands to generate.