00001 #ifndef gHTML_CTRL_X_H
00002 #define gHTML_CTRL_X_H
00003
00004 #include "gHtmlParser.h"
00005 #include "gHtmlLog.h"
00006
00007
00008
00009
00010
00011 #ifdef DEBUG_WEB1 // Checker&Consolidation, Parsing Trees blocks
00012 #define DBGPRINT_WEB1(args...) printf(args)
00013 #else
00014 #define DBGPRINT_WEB1(args...) ;
00015 #endif //DEBUG_WEB1
00016
00017 #ifdef DEBUG_WEB2 // Parsing Trees details
00018 #define DBGPRINT_WEB2(args...) printf(args)
00019 #else
00020 #define DBGPRINT_WEB2(args...) ;
00021 #endif //DEBUG_WEB2
00022
00023 #ifdef DEBUG_WEB3 // Parser tidying, etc
00024 #define DBGPRINT_WEB3(args...) printf(args)
00025 #else
00026 #define DBGPRINT_WEB3(args...) ;
00027 #endif //DEBUG_WEB3
00028
00029 #ifdef DEBUG_WEBA1 // (e.g. attributes)
00030 #define DBGPRINT_WEBA1(args...) printf(args)
00031 #else
00032 #define DBGPRINT_WEBA1(args...) ;
00033 #endif //DEBUG_WEBA1
00034
00035 #ifdef DEBUG_WEBA2 // (attributes in detail)
00036 #define DBGPRINT_WEBA2(args...) printf(args)
00037 #else
00038 #define DBGPRINT_WEBA2(args...) ;
00039 #endif //DEBUG_WEBA2
00040
00041
00042
00043 #define HTML_LOG(args...) gHtmlCtrl::Self().hLog.Log(args)
00044
00045
00046 class gHtmlCtrl {
00047 public:
00048 virtual ~gHtmlCtrl () ;
00049 static gHtmlCtrl& Self () {
00050 return myself;
00051 }
00052
00053 gHtmlLog hLog;
00054
00055
00056 virtual gHtmlParser* ParserPtr () {
00057 Init();
00058 return parserPtr;
00059 }
00060
00061
00062 virtual int Init () ;
00063 virtual void ReleaseHash () ;
00064
00065 protected:
00066 gHtmlCtrl () ;
00067
00068 private:
00069 static gHtmlCtrl myself;
00070 static gHtmlParser* parserPtr;
00071
00072
00073 gHtmlCtrl (gHtmlCtrl& ) ;
00074 gHtmlCtrl& operator= (gHtmlCtrl& ) ;
00075 };
00076
00077 #endif //gHTML_CTRL_X_H
00078