]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/wx-console/wxbtableparser.h
- wxbRestorePanel : Fixed problem when the newly created job is not at the end of...
[bacula/bacula] / bacula / src / wx-console / wxbtableparser.h
index 0f07aae30cc9d129907dbcefccf96070518c188e..e7dc80b77336b5c2c078ea4c4369a402e31f464c 100644 (file)
 
 #include "wxbutils.h"
 
-#include <wx/hashmap.h>
+#include <wx/dynarray.h>
 
-/* int-indexed array of wxString, used for one line */
-WX_DECLARE_HASH_MAP( int, wxString, wxIntegerHash, wxIntegerEqual, wxbTableRow );
-/* int-indexed array of wxbTableRow, contains the whole table */
-WX_DECLARE_HASH_MAP( int, wxbTableRow, wxIntegerHash, wxIntegerEqual, wxbTable );
+/* 
+ * Allow the use of Object Array (auto-deletion, object returned as themselves 
+ * and not as pointers)
+ */
+class wxbArrayString: public wxArrayString, public wxObject {
+   public:
+      wxbArrayString(int n = 1);
+      virtual ~wxbArrayString();
+};
+
+WX_DECLARE_OBJARRAY( wxbArrayString, wxbTable );
 
 /*
  * Class used to parse tables received from director. Data can be accessed with
@@ -67,10 +74,9 @@ class wxbTableParser: public wxbTable, public wxbDataParser
       virtual ~wxbTableParser();
 
       /*
-       *   Receives director information, forwarded by the wxbPanel which
-       *  uses this parser.
+       *   Receives data to analyse.
        */
-      virtual void Print(wxString str, int status);
+      virtual bool Analyse(wxString str, int status);
 
       /*
        *   Return true table parsing has finished.
@@ -80,9 +86,9 @@ class wxbTableParser: public wxbTable, public wxbDataParser
       /*
        *   Returns table header as an array of wxStrings.
        */
-      wxbTableRow* GetHeader();
+      const wxbArrayString& GetHeader();
    private:
-      wxbTableRow tableHeader;
+      wxbArrayString tableHeader;
 
       /*
        * 0 - Table has not begun