summaryrefslogtreecommitdiff
path: root/project2/view.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/view.hpp')
-rw-r--r--project2/view.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/project2/view.hpp b/project2/view.hpp
index 820360f..a065097 100644
--- a/project2/view.hpp
+++ b/project2/view.hpp
@@ -24,8 +24,10 @@ _GenericView<Driver>::rowReady() const
xmlpp::Element * record = node->add_child(recordName);
unsigned int cols = Driver::columnCount();
for (unsigned int col = 0; col < cols; col += 1) {
- xmlpp::Element * ch = record->add_child(Driver::getColumnName(col));
- ch->set_child_text(Driver::getCurrentValue(col));
+ if (!Driver::isNull(col)) {
+ xmlpp::Element * ch = record->add_child(Driver::getColumnName(col));
+ ch->set_child_text(Driver::getCurrentValue(col));
+ }
}
executeChildren(record);
}
@@ -45,6 +47,13 @@ _GenericView<Driver>:: loadComplete()
}
template <class Driver>
+bool
+_GenericView<Driver>:: isNull(const unsigned int id) const
+{
+ return Driver::isNull(id);
+}
+
+template <class Driver>
const Glib::ustring &
_GenericView<Driver>:: getCurrentValue(const unsigned int id) const
{