00001 #ifndef gHTML_ATTR_X_H 00002 #define gHTML_ATTR_X_H 00003 00004 #include "garg.h" 00005 //////////////////////////////////////////////////////////// 00006 class gHAttrList : public gControl { 00007 public: 00008 gHAttrList () ; 00009 virtual ~gHAttrList () ; 00010 00011 // Get methods 00012 virtual bool IsEmpty () { 00013 return nAttr<=0; 00014 } 00015 00016 virtual unsigned N () ; 00017 00018 virtual short NAttr () { 00019 return nAttr; 00020 } 00021 00022 virtual char* Str () ; 00023 00024 virtual gParam* GetAttrParam (short iAttr) ; 00025 00026 virtual char* GetAttr (short iAttr) ; 00027 virtual char* GetAttrValue (short iAttr) ; 00028 virtual char* GetAttrLValue (short iAttr) ; 00029 virtual char* GetAttrRValue (short iAttr) ; 00030 00031 virtual int ValidateValue (char* s) ; 00032 00033 // Set methods 00034 virtual void Reset () ; 00035 virtual void Set (char* s) ; 00036 virtual void CopyAttr (gHAttrList& copy) ; 00037 00038 // Special methods 00039 char* Find (char* strAttr, bool doUnquote=true) { 00040 gList otherL; 00041 return Find( strAttr, doUnquote, otherL ); 00042 } 00043 char* Find (char* strAttr, bool doUnquote, gList& otherL) ; 00044 00045 protected: 00046 short nAttr; 00047 gParam* originalLst; 00048 gParam** pAttrAssign; 00049 00050 gString sAttr, sOAttr; 00051 gString sThisVal; // Only one returned attribute value 00052 00053 int thisValidateValue (gString& s) ; 00054 00055 private: 00056 // Operators,empty 00057 gHAttrList (gHAttrList& ) ; //empty 00058 gHAttrList& operator= (gHAttrList& ) ; //empty 00059 }; 00060 //////////////////////////////////////////////////////////// 00061 #endif //gHTML_ATTR_X_H 00062