summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/ut/testPresenter.cpp20
-rw-r--r--project2/ut/testPresenter.h5
2 files changed, 23 insertions, 2 deletions
diff --git a/project2/ut/testPresenter.cpp b/project2/ut/testPresenter.cpp
index e93d7aa..2b9c952 100644
--- a/project2/ut/testPresenter.cpp
+++ b/project2/ut/testPresenter.cpp
@@ -6,7 +6,7 @@
#include <boost/format.hpp>
TestPresenter::TestPresenter() :
- MultiRowSetPresenter(Default)
+ Presenter(Default)
{
}
@@ -59,6 +59,24 @@ TestPresenter::finishArray(bool objects) const
}
void
+TestPresenter::pushSub(const Glib::ustring & name, const Glib::ustring & ns) const
+{
+ presenterData.push_back(stringbf("%s: %s:%s", __FUNCTION__, ns, name));
+}
+
+void
+TestPresenter::popSub() const
+{
+ presenterData.push_back(stringbf("%s", __FUNCTION__));
+}
+
+void
+TestPresenter::addText(const VariableType & value) const
+{
+ presenterData.push_back(stringbf("%s: %s", __FUNCTION__, value));
+}
+
+void
TestPresenter::init(ExecContext *)
{
presenterData.push_back(stringbf("%s", __FUNCTION__));
diff --git a/project2/ut/testPresenter.h b/project2/ut/testPresenter.h
index a6772ea..74e5e0d 100644
--- a/project2/ut/testPresenter.h
+++ b/project2/ut/testPresenter.h
@@ -8,7 +8,7 @@
typedef std::vector<std::string> PresenterData;
-class TestPresenter : public MultiRowSetPresenter {
+class TestPresenter : public Presenter {
public:
TestPresenter();
@@ -20,6 +20,9 @@ class TestPresenter : public MultiRowSetPresenter {
void finishRowSet() const override;
void addNewArray(const Glib::ustring & name, bool objects) const override;
void finishArray(bool objects) const override;
+ void pushSub(const Glib::ustring & name, const Glib::ustring & ns) const override;
+ void popSub() const override;
+ void addText(const VariableType & value) const override;
void init(ExecContext *) override;
const PresenterData & GetPresenterData() const;