diff options
author | randomdan <randomdan@localhost> | 2012-04-03 18:43:12 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2012-04-03 18:43:12 +0000 |
commit | ae47ec4b2a5cbf801d31535af4415dea3a535d41 (patch) | |
tree | 0270398351963d43dedbc854ea0046581f98ee0a | |
parent | Fix default default value to not always be 'false', there can be no default (diff) | |
download | project2-ae47ec4b2a5cbf801d31535af4415dea3a535d41.tar.bz2 project2-ae47ec4b2a5cbf801d31535af4415dea3a535d41.tar.xz project2-ae47ec4b2a5cbf801d31535af4415dea3a535d41.zip |
Create app engine on the heap as SourceObjects are now self registering (smart pointered)
-rw-r--r-- | project2/console/consoleAppEngine.h | 2 | ||||
-rw-r--r-- | project2/console/p2consoleMain.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/project2/console/consoleAppEngine.h b/project2/console/consoleAppEngine.h index 4368c6b..3bfd9ed 100644 --- a/project2/console/consoleAppEngine.h +++ b/project2/console/consoleAppEngine.h @@ -12,7 +12,7 @@ class ConsoleEnvironment; -class ConsoleApplicationEngine : public ApplicationEngine, TaskHost, ViewHost { +class ConsoleApplicationEngine : public ApplicationEngine, public TaskHost, public ViewHost { public: ConsoleApplicationEngine(const ConsoleEnvironment *, ScriptReaderPtr); virtual ~ConsoleApplicationEngine(); diff --git a/project2/console/p2consoleMain.cpp b/project2/console/p2consoleMain.cpp index 19b3f9d..9b3ceec 100644 --- a/project2/console/p2consoleMain.cpp +++ b/project2/console/p2consoleMain.cpp @@ -15,10 +15,10 @@ main(int argc, char ** argv) BOOST_FOREACH(const ConsoleEnvironment::ToDo & todo, env.todoList()) { LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onBefore, _1)); Logger()->messagef(LOG_DEBUG, "%s: Beginning script '%s/%s'", __FUNCTION__, todo.get<0>().c_str(), todo.get<1>().c_str()); - ConsoleApplicationEngine app(&env, env.resolveScript(todo.get<0>(), todo.get<1>(), false)); + boost::intrusive_ptr<ConsoleApplicationEngine> app(new ConsoleApplicationEngine(&env, env.resolveScript(todo.get<0>(), todo.get<1>(), false))); Logger()->messagef(LOG_DEBUG, "%s: Processing file", __FUNCTION__); - app.process(); + app->process(); Logger()->messagef(LOG_DEBUG, "%s: Complete", __FUNCTION__); LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1)); |