X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/9f62980f827505ed1f231b737ec126dda041a475..993710aae023efaccb75b56eee2347c340bdc71d:/parser.h/software/bife/bife++.git/blobdiff_plain/9f62980f827505ed1f231b737ec126dda041a475..993710aae023efaccb75b56eee2347c340bdc71d:/parser.h diff --git a/parser.h b/parser.h index f792646..4efb92b 100644 --- a/parser.h +++ b/parser.h @@ -3,9 +3,10 @@ #ifndef BIFE_PARSER_H #define BIFE_PARSER_H -#include "hit.h" -#include "hash.h" -#include "widget.h" +#include "libbife/hit.h" +#include "libbife/hash.h" +#include "libbife/widget.h" +#include "libbife/fallback.h" #include #include #include @@ -17,21 +18,35 @@ namespace bife { /** * Base Widget Class. * - * @todo + * @todo Better plug-in support. Cleanning (a lot). + * @todo Try to free some memeory :) */ class Parser: public xmlpp::SaxParser { // Typedefs. protected: + /// Stack of widget pointers. typedef std::stack WidgetStack; // Attributes. protected: - /// Stack TODO. + /** + * Widget stack. + * This is the stack of widgets to know what widget is the parser + * proccesing. + */ WidgetStack stack; - // TODO Fallback. + /// Fallback constructor function pointer. + Fallback::Constructor* fbNew; + + /// Fallback destructor function pointer. + Widget::Destructor* fbDel; + + /// Fallback class name. + string fbClass; + public: - /// Widget attributes. + /// Widget attributes (FIXME - this must be protected?). Widget* root; // Methods. @@ -114,14 +129,14 @@ namespace bife { /** * Constructor. */ - Parser(void); + //Parser(void); /** * Constructor. * - * @param fallback Fallback. + * @param fallback Fallback class name. */ - //Parser(const Fallback&); TODO + Parser(const string& = ""); /** * Destructor.