From afd1cd3370cbf98b94d1f39f02688846bccf6a73 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sat, 15 Oct 2011 01:36:08 +0000 Subject: Allow view/columns to be (functional) variables --- project2/common/rowView.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/project2/common/rowView.cpp b/project2/common/rowView.cpp index 014e648..08f96b1 100644 --- a/project2/common/rowView.cpp +++ b/project2/common/rowView.cpp @@ -17,11 +17,9 @@ RowView::RowView(const xmlpp::Element * p) : rootName(p->get_attribute_value("rootname")), recordName(p->get_attribute_value("recordname")) { - BOOST_FOREACH(xmlpp::Node * node, p->find("columns/column")) { - const xmlpp::Element * elem = dynamic_cast(node); - if (elem) { - viewColumns.insert(Columns::value_type(elem->get_attribute_value("name"), - Variable::makeParent(elem->get_child_text()->get_content(), elem->get_attribute_value("source") == "attribute", 0))); + BOOST_FOREACH(xmlpp::Node * node, p->find("columns/*")) { + if (const xmlpp::Element * elem = dynamic_cast(node)) { + viewColumns.insert(Parameters::value_type(elem->get_name(), Variable(elem, boost::optional()))); } } LoaderBase loader(true); -- cgit v1.2.3