#include "dumpTask.h" #include "rowSet.h" #include "xmlObjectLoader.h" #include #include ElementLoaderImpl dumptaskLoader("dumptask"); DumpTask::DumpTask(const xmlpp::Element * p) : SourceObject(p), Task(p) { } DumpTask::~DumpTask() { } void DumpTask::loadComplete(const CommonObjects *) { } void DumpTask::execute() const { const RowSet::RowValuesStack::value_type & r = RowSet::Stack().back(); unsigned int cols = r->columnCount(); for (unsigned int c = 0; c < cols; c += 1) { if (c > 0) { fprintf(stderr, ", "); } try { fprintf(stderr, "%s = '%s'", r->getColumnName(c).c_str(), r->getCurrentValue(c).c_str()); } catch (const RowSet::FieldDoesNotExist &) { fprintf(stderr, "%s = null", r->getColumnName(c).c_str()); } } fprintf(stderr, "\n"); }