X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.hh;h=971d68fe1e28eb59e3536056dd19c4355ec0668c;hp=112b87ea8dba3ea07f8d1cbefe5407003e045b4e;hb=bfa6212d09d8735d8fd5e2638188e4a99f21ada4;hpb=c2321281bf12a7efaedde930422c7ddbc92080d4 diff --git a/src/Moof/Engine.hh b/src/Moof/Engine.hh index 112b87e..971d68f 100644 --- a/src/Moof/Engine.hh +++ b/src/Moof/Engine.hh @@ -29,6 +29,8 @@ #ifndef _MOOF_ENGINE_HH_ #define _MOOF_ENGINE_HH_ +#include + #include #include @@ -46,12 +48,12 @@ class Video; class Engine : public Singleton { public: - Engine(const std::string& name, int argc, char* argv[], - const std::string& configFile); + Engine(int argc, char* argv[], const std::string& configFile, + const std::string& name, const std::string& iconFile); virtual ~Engine(); int run(); - void stop(); + void stop(int exitCode = 0); void setTimestep(Scalar ts); Scalar getTimestep(); @@ -66,9 +68,15 @@ public: virtual void draw(Scalar alpha); virtual void handleEvent(const Event& event); + struct Exception : std::runtime_error + { + explicit Exception(const std::string& what_arg) : + std::runtime_error(what_arg) {} + }; + private: - class EngineImpl; - boost::shared_ptr impl_; + class Impl; + boost::shared_ptr impl_; };