diff options
Diffstat (limited to 'project2/fileRows.cpp')
-rw-r--r-- | project2/fileRows.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp index 600ab7c..28de335 100644 --- a/project2/fileRows.cpp +++ b/project2/fileRows.cpp @@ -2,6 +2,7 @@ #include "rowProcessor.h" #include "xmlObjectLoader.h" #include "exceptions.h" +#include "genericVisitor.h" #include <boost/algorithm/string/predicate.hpp> ElementLoaderImpl<FileRows> filerowsLoader("filerows"); @@ -117,10 +118,10 @@ FileRows::execute(const RowProcessor * rp) const } } -const Glib::ustring & +VariableType FileRows::getCurrentValue(unsigned int col) const { - return *values[col]; + return values[col]; } bool @@ -135,13 +136,13 @@ FileRows::isNull(const Glib::ustring & col) const return false; } -const Glib::ustring & +VariableType FileRows::getCurrentValue(const Glib::ustring & id) const { Values::const_iterator v = values.begin(); for (Columns::const_iterator i = columns.begin(); i != columns.end(); i++, v++) { if (*i == id) { - return **v; + return *v; } } throw RowSet::FieldDoesNotExist(); @@ -165,7 +166,7 @@ FileRows::addColumn(const Glib::ustring & rawtok) const FileStarChannel FileRows::doOpen() const { - FILE * f = fopen(path->c_str(), "r"); + FILE * f = LexicalCall<const char *, FILE *>(boost::bind(&popen, _1, "r"), path()); if (!f) { throw FileNotReadable(); } |