]> git.llucax.com Git - software/bife/bife++.git/blobdiff - parser.h
- Normalized Fallback constructor to be the same of Widget (or Container).
[software/bife/bife++.git] / parser.h
index f79264664294f9c5ac08ee114f55da2d0dbd89e9..4efb92beae2fff3a97323abb9d981bcd4400b3a6 100644 (file)
--- 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 <libxml++/libxml++.h>
 #include <string>
 #include <stack>
@@ -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<Widget*> 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.