summaryrefslogtreecommitdiff
path: root/project2/iterate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/iterate.cpp')
-rw-r--r--project2/iterate.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/project2/iterate.cpp b/project2/iterate.cpp
new file mode 100644
index 0000000..02fc149
--- /dev/null
+++ b/project2/iterate.cpp
@@ -0,0 +1,41 @@
+#include "iterate.h"
+#include <boost/foreach.hpp>
+#include <syslog.h>
+#include "xmlObjectLoader.h"
+#include "sqlIterate.h"
+#include "task.h"
+
+_Iterate::_Iterate(const xmlpp::Element * p) :
+ _SourceObject(p),
+ _NoOutputExecute(p)
+{
+ Loaders loaders;
+ _Iterate::AddLoaders(loaders, subIterates);
+ _Task::AddLoaders(loaders, subIterates);
+ _LoaderBase::collectAll(loaders, "project2", p, true, true);
+}
+
+_Iterate::~_Iterate()
+{
+}
+
+void
+_Iterate::AddLoaders(Loaders & l, Iterates & iterates)
+{
+ l.insert(LoadersVT("sqliterate", _LoaderBase::Make<_SqlIterate, _Iterate, std::string, _SourceObject, &_SourceObject::name>(&iterates)));
+}
+
+void
+_Iterate::AddLoaders(Loaders & l, NoOutputExecutes & iterates)
+{
+ l.insert(LoadersVT("sqliterate", _LoaderBase::Make<_SqlIterate, _NoOutputExecute, unsigned int, _SourceObject, &_SourceObject::order>(&iterates)));
+}
+
+void
+_Iterate::executeChildren(const ApplicationEngine * ep, const PerRowValues * parent) const
+{
+ BOOST_FOREACH(NoOutputExecutes::value_type sq, subIterates) {
+ sq.second->execute(ep, this);
+ }
+}
+