00001 #ifndef _GTAG_H
00002 #define _GTAG_H
00003
00004 #include "GVariant.h"
00005 #include "GMap.h"
00006 #include "GXmlTree.h"
00007
00008 class GNamedVariant : public GVariant, public GObj
00009 {
00010 public:
00011 GNamedVariant(char *s = 0)
00012 {
00013 if (s) Name(s);
00014 }
00015 };
00016
00017 class GTag : public List<GNamedVariant>, public GDom
00018 {
00019 protected:
00020 char *Element;
00021 bool ObscurePasswords;
00022
00023 GVariantType TypeOf(char *Name);
00024
00025 public:
00026 GTag(char *e);
00027 ~GTag();
00028
00029 bool IsNumber(char *s);
00030 bool operator ==(char *s);
00031 GTag &operator =(GTag &t);
00032 GNamedVariant *GetNamed(char *Name);
00033 void Empty();
00034 bool Read(GXmlTag *t);
00035 void Write(GFile &f);
00036 bool GetVariant(char *Name, GVariant &Value, char *Array = 0);
00037 bool SetVariant(char *Name, GVariant &Value, char *Array = 0);
00038 void SerializeUI(GView *Dlg, GMap<char*,int> &Fields, bool To);
00039 };
00040
00041 #endif