diff options
Diffstat (limited to 'project2/common/presenter.cpp')
-rw-r--r-- | project2/common/presenter.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/project2/common/presenter.cpp b/project2/common/presenter.cpp new file mode 100644 index 0000000..9544743 --- /dev/null +++ b/project2/common/presenter.cpp @@ -0,0 +1,50 @@ +#include "presenter.h" +#include "dataSource.h" +#include "appEngine.h" +#include <boost/foreach.hpp> + +Presenter::Presenter() +{ +} + +Presenter::~Presenter() +{ +} + +void +Presenter::pushSub(const Glib::ustring & name) const +{ + pushSub(name, Glib::ustring()); +} + +void +Presenter::addAttr(const Glib::ustring & name, const VariableType & value) const +{ + addAttr(name, Glib::ustring(), value); +} + +void +Presenter::addAttr(const Glib::ustring & name, const Glib::ustring & ns, const VariableType & value) const +{ + addField(name, ns, value); +} + +void +Presenter::addField(const Glib::ustring & name, const VariableType & value) const +{ + addField(name, Glib::ustring(), value); +} + +void +Presenter::addField(const Glib::ustring & name, const Glib::ustring & ns, const VariableType & value) const +{ + pushSub(name, ns); + addText(value); + popSub(); +} + +ContentPresenter::ContentPresenter(const Glib::ustring & ct) : + contentType(ct) +{ +} + |