X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/efa6c9315719fc0b98483abdc26341d061b4a4b4..993710aae023efaccb75b56eee2347c340bdc71d:/parser.h/software/bife/bife++.git/blobdiff_plain/efa6c9315719fc0b98483abdc26341d061b4a4b4..993710aae023efaccb75b56eee2347c340bdc71d:/parser.h?ds=sidebyside diff --git a/parser.h b/parser.h index 4eb8e79..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,22 +18,36 @@ 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. - public: - /// Widget attributes. - Widget* root; - - /// Stack TODO. + protected: + /** + * 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 (FIXME - this must be protected?). + Widget* root; // Methods. protected: @@ -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.