#ifndef ROOT_TDataMember
#define ROOT_TDataMember

//+SEQ,CopyRight,T=NOINCLUDE.

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TDataMember                                                          //
//                                                                      //
// Dictionary interface for a class data member.                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TDictionary
//*KEEP,TDictionary.
#include "TDictionary.h"
//*KEND.
#endif

class TList;
class TClass;
class TDataType;
class G__DataMemberInfo;
class TMethodCall;

class TDataMember : public TDictionary {

private:
   G__DataMemberInfo  *fInfo;        //pointer to CINT data member info
   TClass             *fClass;       //pointer to the class
   TDataType          *fDataType;    //pointer to data basic type descriptor

   // The following fields allows to access all (even private) datamembers and
   // provide a possibility of having options with names and strings.
   // These options are defined in a comment to a field!
   TMethodCall        *fValueGetter; //method that returns a value;
   TMethodCall        *fValueSetter; //method which sets value;
   TList              *fOptions;     //list of possible values 0=no restrictions

public:
   TDataMember(G__DataMemberInfo *info = 0, TClass *cl = 0);
   virtual       ~TDataMember();
   Int_t          GetArrayDim() const;
   Int_t          GetMaxIndex(Int_t dim) const;
   TClass        *GetClass() const { return fClass; }
   TDataType     *GetDataType() const { return fDataType; } //only for basic type
   const char    *GetName() const;
   Int_t          GetOffset() const;
   const char    *GetTitle() const;
   const char    *GetTypeName() const;
   const char    *GetFullTypeName() const;

   TList         *GetOptions();
   TMethodCall   *SetterMethod();
   TMethodCall   *GetterMethod();

   Int_t          Compare(TObject *obj);
   ULong_t        Hash();
   Bool_t         IsBasic() const;
   Bool_t         IsEnum() const;
   Bool_t         IsaPointer() const;
   Bool_t         IsPersistent() const { return TestBit(kObjIsPersistent); }
   Long_t         Property() const;

   ClassDef(TDataMember,0)  //Dictionary for a class data member
};


// This class implements one option in options list. All Data members are public
// for cenvenience reasons.

class TOptionListItem : public TObject {

public:
   TDataMember     *fDataMember;     //Data member to which this option belongs
   Long_t           fValue;          //Numerical value assigned to option
   Long_t           fValueMaskBit;   //Not used yet: bitmask used when option is a toggle group
   Long_t           fToggleMaskBit;  //Not used yet: bitmask used when toggling value
   Text_t          *fOptName;        //Text assigned to option which appears in option menu
   Text_t          *fOptLabel;       //Text (or enum) value assigned to option.

   TOptionListItem(TDataMember *m,Long_t val, Long_t valmask, Long_t tglmask,
                   const Text_t *name, const Text_t *label);
  ~TOptionListItem();
};

#endif