diff options
author | randomdan <randomdan@localhost> | 2013-07-05 00:01:26 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2013-07-05 00:01:26 +0000 |
commit | 5507f618e094554f04f61a950d9c6d2b55865d3e (patch) | |
tree | 6f3a750f79ad26047ff5322522219798d19aa64c /project2/json/presenter.cpp | |
parent | Move remaining options out of environment (diff) | |
download | project2-5507f618e094554f04f61a950d9c6d2b55865d3e.tar.bz2 project2-5507f618e094554f04f61a950d9c6d2b55865d3e.tar.xz project2-5507f618e094554f04f61a950d9c6d2b55865d3e.zip |
Massive refactor to remove the appEngine and environment complication and instead have an execution context that's passed around from the original call site
Diffstat (limited to 'project2/json/presenter.cpp')
-rw-r--r-- | project2/json/presenter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/project2/json/presenter.cpp b/project2/json/presenter.cpp index 111ae5c..2eabeac 100644 --- a/project2/json/presenter.cpp +++ b/project2/json/presenter.cpp @@ -15,7 +15,7 @@ JsonPresenter::JsonPresenter(ScriptNodePtr s, ObjectSource os, const Glib::ustri returnObject(s, "object", Null()) { } -JsonPresenter::JsonPresenter(ScriptNodePtr s, ObjectSource os) : +JsonPresenter::JsonPresenter(ScriptNodePtr s, ObjectSource os, ExecContext *) : TransformSource(s, os), MultiRowSetPresenter(os), ContentPresenter("application/json"), @@ -25,7 +25,7 @@ JsonPresenter::JsonPresenter(ScriptNodePtr s, ObjectSource os) : } void -JsonPresenter::init() +JsonPresenter::init(ExecContext *) { while (!curRowSet.empty()) { curRowSet.pop(); @@ -131,13 +131,13 @@ JsonPresenter::getContentClass() const } void -JsonPresenter::writeTo(std::ostream & o, const std::string & encoding) const +JsonPresenter::writeTo(std::ostream & o, const std::string & encoding, ExecContext * ec) const { - if (returnObject().isNull()) { + if (returnObject(ec).isNull()) { serializeObject(object, o, encoding); } else { - serializeValue(*object[returnObject()], o, encoding); + serializeValue(*object[returnObject(ec)], o, encoding); } } |