diff options
Diffstat (limited to 'project2/variables.cpp')
-rw-r--r-- | project2/variables.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/project2/variables.cpp b/project2/variables.cpp index c6a65f1..b0aecea 100644 --- a/project2/variables.cpp +++ b/project2/variables.cpp @@ -1,8 +1,8 @@ #include "variables.h" #include "exceptions.h" #include "appEngine.h" -#include "perRowValues.h" #include "session.h" +#include "rowUser.h" #include <libxml++/nodes/textnode.h> #include <stdexcept> #include <boost/tokenizer.hpp> @@ -122,10 +122,10 @@ class VariableParent : public VariableImplDyn, public RowUser { if (!cacheValid) { try { if (!row) { - PerRowValues::RowValuesStack::const_reverse_iterator r = PerRowValues::Stack().rbegin(); + RowSet::RowValuesStack::const_reverse_iterator r = RowSet::Stack().rbegin(); for (size_t p = depth; p--; r++) ; - if (r == PerRowValues::Stack().rend()) { - throw PerRowValues::ParentOutOfRange(); + if (r == RowSet::Stack().rend()) { + throw RowSet::ParentOutOfRange(); } row = *r; row->use(this); @@ -135,13 +135,13 @@ class VariableParent : public VariableImplDyn, public RowUser { } getValue(cache, row); } - catch (PerRowValues::ParentOutOfRange) { + catch (RowSet::ParentOutOfRange) { if (!defaultValue) { throw; } cache = *defaultValue; } - catch (PerRowValues::FieldDoesNotExist) { + catch (RowSet::FieldDoesNotExist) { if (!defaultValue) { throw; } @@ -165,22 +165,22 @@ class VariableParent : public VariableImplDyn, public RowUser { if (name == "!rownum") { getValue = boost::bind(&assignHelper, _1, boost::bind(&boost::lexical_cast<Glib::ustring, unsigned int>, - boost::bind(&PerRowValues::getRowNum, _2))); + boost::bind(&RowSet::getRowNum, _2))); } else { - throw PerRowValues::FieldDoesNotExist(); + throw RowSet::FieldDoesNotExist(); } } else { - typedef const Glib::ustring & (PerRowValues::*gCV)(const Glib::ustring &) const; + typedef const Glib::ustring & (RowSet::*gCV)(const Glib::ustring &) const; getValue = boost::bind(&assignHelper, _1, - boost::bind((gCV)&PerRowValues::getCurrentValue, _2, name)); + boost::bind((gCV)&RowSet::getCurrentValue, _2, name)); } } - mutable const PerRowValues * row; + mutable const RowSet * row; const size_t depth; const RowUser * dep; - boost::function2<void, Glib::ustring &, const PerRowValues *> getValue; + boost::function2<void, Glib::ustring &, const RowSet *> getValue; }; class VariableParse : public VariableImplDyn, public RowUser { |