summaryrefslogtreecommitdiff
path: root/project2/xmlPresenter.h
diff options
context:
space:
mode:
Diffstat (limited to 'project2/xmlPresenter.h')
-rw-r--r--project2/xmlPresenter.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/project2/xmlPresenter.h b/project2/xmlPresenter.h
new file mode 100644
index 0000000..c16cc2c
--- /dev/null
+++ b/project2/xmlPresenter.h
@@ -0,0 +1,31 @@
+#ifndef XMLPRESENTER_H
+#define XMLPRESENTER_H
+
+#include "presenter.h"
+
+class XmlPresenter : public Presenter {
+ public:
+ typedef boost::shared_ptr<xmlpp::Document> XmlDocumentPtr;
+ XmlPresenter(const std::string & group, const std::string & file);
+ ~XmlPresenter();
+
+ void pushSub(const Glib::ustring & name, const Glib::ustring & ns) const;
+ void addAttr(const Glib::ustring & name, const Glib::ustring & ns, const Glib::ustring & value) const;
+ void setText(const Glib::ustring & value) const;
+ void popSub() const;
+
+ virtual XmlDocumentPtr getDataDocument() const;
+
+ const Glib::ustring responseRootNodeName;
+ const Glib::ustring responseStyle;
+ const Glib::ustring contentType;
+
+ private:
+ XmlDocumentPtr responseDoc;
+ mutable std::vector<xmlpp::Element *> nodeStack;
+};
+
+typedef boost::intrusive_ptr<XmlPresenter> XmlPresenterPtr;
+
+#endif
+