#ifndef _MOOF_ENGINE_HH_
#define _MOOF_ENGINE_HH_
+#include <stdexcept>
+
#include <boost/shared_ptr.hpp>
#include <Moof/Dispatcher.hh>
class Engine : public Singleton<Engine>
{
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();
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<EngineImpl> impl_;
+ class Impl;
+ boost::shared_ptr<Impl> impl_;
};