]> 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 4eb8e79eba12d0b7132c5bc5c105dcbd0f9839ff..4efb92beae2fff3a97323abb9d981bcd4400b3a6 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -3,9 +3,10 @@
 #ifndef BIFE_PARSER_H
 #define BIFE_PARSER_H
 
 #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>
 #include <libxml++/libxml++.h>
 #include <string>
 #include <stack>
@@ -17,22 +18,36 @@ namespace bife {
     /**
      * Base Widget Class.
      *
     /**
      * 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:
      */
     class Parser: public xmlpp::SaxParser {
         // Typedefs.
         protected:
+            /// Stack of widget pointers.
             typedef std::stack<Widget*> WidgetStack;
 
         // Attributes.
             typedef std::stack<Widget*> 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;
 
             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:
 
         // Methods.
         protected:
@@ -114,14 +129,14 @@ namespace bife {
             /**
              * Constructor.
              */
             /**
              * Constructor.
              */
-            Parser(void);
+            //Parser(void);
 
             /**
              * Constructor.
              *
 
             /**
              * Constructor.
              *
-             * @param fallback Fallback.
+             * @param fallback Fallback class name.
              */
              */
-            //Parser(const Fallback&); TODO
+            Parser(const string& = "");
 
             /**
              * Destructor.
 
             /**
              * Destructor.