#include "commonObjects.h" #include #include RowSetPtr CommonObjects::getSource(const std::string & name) const { RowSets::index::type::const_iterator i = rowSets.get().find(name); if (i != rowSets.get().end()) { return *i; } throw CommonObjects::DataSourceNotFound(name); } DataSources::index::type::const_iterator CommonObjects::loadDataSource(const std::string & name) const { xmlpp::DomParser xml("datasources/" + name + ".xml"); while (xmlXIncludeProcessFlags(xml.get_document()->cobj(), XML_PARSE_NOXINCNODE) > 0); LoaderBase loader("http://project2.randomdan.homeip.net", true); loader.supportedStorers.insert(Storer::into(&datasources)); loader.collectAll(xml.get_document()->get_root_node(), false); DataSources::index::type::const_iterator i = datasources.get().find(name); if (i == datasources.get().end()) { throw DataSourceNotFound(name); } return i; }