#ifndef ROOT_TRootSnifferStore
#define ROOT_TRootSnifferStore
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class TDataMember;
class TFolder;
class TRootSnifferStore : public TObject {
protected:
void *fResPtr;
TClass *fResClass;
TDataMember *fResMember;
Int_t fResNumChilds;
Int_t fResRestrict;
public:
TRootSnifferStore();
virtual ~TRootSnifferStore();
virtual void CreateNode(Int_t, const char *) {}
virtual void SetField(Int_t, const char *, const char *, Bool_t) {}
virtual void BeforeNextChild(Int_t, Int_t, Int_t) {}
virtual void CloseNode(Int_t, Int_t) {}
void SetResult(void *_res, TClass *_rescl, TDataMember *_resmemb,
Int_t _res_chld, Int_t restr = 0);
void *GetResPtr() const
{
return fResPtr;
}
TClass *GetResClass() const
{
return fResClass;
}
TDataMember *GetResMember() const
{
return fResMember;
}
Int_t GetResNumChilds() const
{
return fResNumChilds;
}
Int_t GetResRestrict() const
{
return fResRestrict;
}
virtual Bool_t IsXml() const
{
return kFALSE;
}
ClassDef(TRootSnifferStore, 0)
};
class TRootSnifferStoreXml : public TRootSnifferStore {
protected:
TString *fBuf;
Bool_t fCompact;
public:
TRootSnifferStoreXml(TString &_buf, Bool_t _compact = kFALSE) :
TRootSnifferStore(),
fBuf(&_buf),
fCompact(_compact) {}
virtual ~TRootSnifferStoreXml() {}
virtual void CreateNode(Int_t lvl, const char *nodename);
virtual void SetField(Int_t lvl, const char *field, const char *value, Bool_t);
virtual void BeforeNextChild(Int_t lvl, Int_t nchld, Int_t);
virtual void CloseNode(Int_t lvl, Int_t numchilds);
virtual Bool_t IsXml() const
{
return kTRUE;
}
ClassDef(TRootSnifferStoreXml, 0)
};
class TRootSnifferStoreJson : public TRootSnifferStore {
protected:
TString *fBuf;
Bool_t fCompact;
public:
TRootSnifferStoreJson(TString &_buf, Bool_t _compact = kFALSE) :
TRootSnifferStore(),
fBuf(&_buf),
fCompact(_compact) {}
virtual ~TRootSnifferStoreJson() {}
virtual void CreateNode(Int_t lvl, const char *nodename);
virtual void SetField(Int_t lvl, const char *field, const char *value, Bool_t with_quotes);
virtual void BeforeNextChild(Int_t lvl, Int_t nchld, Int_t nfld);
virtual void CloseNode(Int_t lvl, Int_t numchilds);
ClassDef(TRootSnifferStoreJson, 0)
};
#endif