diff options
Diffstat (limited to 'project2/xml/rawView.cpp')
-rw-r--r-- | project2/xml/rawView.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/project2/xml/rawView.cpp b/project2/xml/rawView.cpp index 5226caf..1cd1676 100644 --- a/project2/xml/rawView.cpp +++ b/project2/xml/rawView.cpp @@ -13,10 +13,10 @@ class RawViewBase : public View { RawViewBase(ScriptNodePtr p) : SourceObject(p), View(p) { } - void execute(const MultiRowSetPresenter * mp) const + void execute(const MultiRowSetPresenter * mp, ExecContext * ec) const { if (const Presenter * p = dynamic_cast<const Presenter *>(mp)) { - BOOST_FOREACH(const auto * node, getCopyRoot()->get_children()) { + BOOST_FOREACH(const auto * node, getCopyRoot(ec)->get_children()) { const xmlpp::Element * e = dynamic_cast<const xmlpp::Element *>(node); if (e) { copyNode(p, e); @@ -26,7 +26,7 @@ class RawViewBase : public View { } protected: - virtual const xmlpp::Element * getCopyRoot() const = 0; + virtual const xmlpp::Element * getCopyRoot(ExecContext *) const = 0; private: void copyNode(const Presenter * p, const xmlpp::Element * n) const @@ -59,7 +59,7 @@ class RawView : public RawViewBase { { } protected: - const xmlpp::Element * getCopyRoot() const { return copyRoot; } + const xmlpp::Element * getCopyRoot(ExecContext *) const { return copyRoot; } private: const xmlpp::Element * copyRoot; }; @@ -75,13 +75,13 @@ class XmlResourceView : public RawViewBase, XmlDocumentCache, VariableCurlHelper { } protected: - const xmlpp::Element * getCopyRoot() const + const xmlpp::Element * getCopyRoot(ExecContext * ec) const { - return getDocument(url(), encoding())->get_root_node(); + return getDocument(url(ec), encoding(ec), ec)->get_root_node(); } - bool asHtml() const { return false; } - bool withWarnings() const { return true; } - CurlPtr newCurl() const { return VariableCurlHelper::newCurl(); } + bool asHtml(ExecContext *) const { return false; } + bool withWarnings(ExecContext *) const { return true; } + CurlPtr newCurl(ExecContext * ec) const { return VariableCurlHelper::newCurl(ec); } private: Variable encoding; |