1 // vim: set expandtab tabstop=4 shiftwidth=4:
9 #include <libxml++/libxml++.h>
22 class Parser: public xmlpp::SaxParser {
25 typedef std::stack<Widget*> WidgetStack;
29 /// Widget attributes.
40 * Start document handler.
42 virtual void on_start_document(void);
45 * End document handler.
47 virtual void on_end_document(void);
50 * Start element handler.
52 * @param name Element name.
53 * @param attrs Element attributes.
55 virtual void on_start_element(const string&, const AttributeMap&);
58 * End element handler.
60 * @param name Element name.
62 virtual void on_end_element(const string&);
67 * @param chars Characters.
69 virtual void on_characters(const string&);
74 * @param text Comment text.
76 virtual void on_comment(const string&);
81 * @param warn Warning description.
83 virtual void on_warning(const string&);
88 * @param error Error description.
90 virtual void on_error(const string&);
93 * Fatal error handler.
95 * @param error Fatal error description.
97 virtual void on_fatal_error(const string&);
100 * Validity error handler.
102 * @param error Validity error description.
104 virtual void on_validity_error(const string&);
107 * Validity warning handler.
109 * @param warn Validity warning description.
111 virtual void on_validity_warning(const string&);
122 * @param fallback Fallback.
124 //Parser(const Fallback&); TODO
129 virtual ~Parser(void);
132 * Renders the widget using a HIT template.
134 * @param hit HIT template to use to render de widget.
135 * @return Rendered widget.
137 //virtual operator string(void) const;