summaryrefslogtreecommitdiff
path: root/project2/xmlObjectLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/xmlObjectLoader.cpp')
-rw-r--r--project2/xmlObjectLoader.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/project2/xmlObjectLoader.cpp b/project2/xmlObjectLoader.cpp
index faa5b2a..5cc28f0 100644
--- a/project2/xmlObjectLoader.cpp
+++ b/project2/xmlObjectLoader.cpp
@@ -94,6 +94,7 @@ LoaderBase::collectAll(const CommonObjects * co, const xmlpp::Element * node, bo
if (depth != 0) {
throw std::logic_error("Cannot set CommonObjects in subloader");
}
+ loadedObjects.clear();
collectAll(node, childrenOnly, uh);
BOOST_FOREACH(SourceObjectPtr o, loadedObjects) {
o->loadComplete(co);
@@ -102,29 +103,10 @@ LoaderBase::collectAll(const CommonObjects * co, const xmlpp::Element * node, bo
}
void
-LoaderBase::onIdle()
-{
- BOOST_FOREACH(ComponentLoaderSet::value_type l, *componentLoaders()) {
- l->onIdle();
- }
-}
-
-void
-LoaderBase::onIteration()
-{
- // This is a fail safe in the event that something goes pearshape
- loadedObjects.clear();
-
- BOOST_FOREACH(ComponentLoaderSet::value_type l, *componentLoaders()) {
- l->onIteration();
- }
-}
-
-void
-LoaderBase::onPeriodic()
+LoaderBase::onAllComponents(const boost::function1<void, ComponentLoader *> & func)
{
BOOST_FOREACH(ComponentLoaderSet::value_type l, *componentLoaders()) {
- l->onPeriodic();
+ func(l.get());
}
}
@@ -159,3 +141,9 @@ ComponentLoader::onPeriodic()
{
}
+boost::program_options::options_description *
+ComponentLoader::options()
+{
+ return NULL;
+}
+