summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-05-03 23:36:31 +0000
committerrandomdan <randomdan@localhost>2012-05-03 23:36:31 +0000
commitb87a9df9f8faf2114c4d78703ccba72bb548fce3 (patch)
tree09bc3dbfe7c6ea15ee2dc5b787418be94d64a663
parentRender subviews in the order they're defined (diff)
downloadproject2-b87a9df9f8faf2114c4d78703ccba72bb548fce3.tar.bz2
project2-b87a9df9f8faf2114c4d78703ccba72bb548fce3.tar.xz
project2-b87a9df9f8faf2114c4d78703ccba72bb548fce3.zip
Hook in the new onConfigLoad component loader event
-rw-r--r--project2/common/environment.cpp2
-rw-r--r--project2/common/scriptLoader.cpp5
-rw-r--r--project2/common/scriptLoader.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/project2/common/environment.cpp b/project2/common/environment.cpp
index 6010860..b13a1c0 100644
--- a/project2/common/environment.cpp
+++ b/project2/common/environment.cpp
@@ -84,6 +84,8 @@ Environment::init()
BOOST_FOREACH(const ConfigsMap::value_type & c, configs) {
c->loadInto(dcc);
}
+ LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onConfigLoad, _1));
+
Logger()->clear();
if (clLevel >= 0) {
Logger()->addLogger(LogDriverLoader::createNew("console", clLevel, std::string()));
diff --git a/project2/common/scriptLoader.cpp b/project2/common/scriptLoader.cpp
index 8237163..b13b3de 100644
--- a/project2/common/scriptLoader.cpp
+++ b/project2/common/scriptLoader.cpp
@@ -187,6 +187,11 @@ ComponentLoader::onPeriodic()
{
}
+void
+ComponentLoader::onConfigLoad()
+{
+}
+
const Options *
ComponentLoader::options() const
{
diff --git a/project2/common/scriptLoader.h b/project2/common/scriptLoader.h
index 776d0c5..9f0e9c6 100644
--- a/project2/common/scriptLoader.h
+++ b/project2/common/scriptLoader.h
@@ -125,6 +125,7 @@ class ComponentLoader {
virtual void onIdle(); // When the app engine goes idle
virtual void onIteration(); // When the app engine has completed an iteration
virtual void onPeriodic(); // When the app engine feels like it
+ virtual void onConfigLoad(); // When the environment reloads the configuration
virtual const Options * options() const; // Options to be populated from the common config file/env/etc
};