summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-10-15 01:36:08 +0000
committerrandomdan <randomdan@localhost>2011-10-15 01:36:08 +0000
commitccabc8b13fda5fe943cc70aea32e69d588a459ad (patch)
treead95637f57b060a654374456b2fa5da4b4670bff
parentRemove some dead code (diff)
downloadproject2-ccabc8b13fda5fe943cc70aea32e69d588a459ad.tar.bz2
project2-ccabc8b13fda5fe943cc70aea32e69d588a459ad.tar.xz
project2-ccabc8b13fda5fe943cc70aea32e69d588a459ad.zip
Allow view/columns to be (functional) variables
-rw-r--r--project2/common/rowView.cpp8
1 files 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<const xmlpp::Element *>(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<const xmlpp::Element *>(node)) {
+ viewColumns.insert(Parameters::value_type(elem->get_name(), Variable(elem, boost::optional<Glib::ustring>())));
}
}
LoaderBase loader(true);