63 fBuf->Append(
TString::Format(
"%*s<item _name=\"%s\"", fCompact ? 0 : (lvl + 1) * 2,
"", nodename));
72 if (strpbrk(value,
"<>&\'\"") == 0) {
76 const char *
v = value;
86 fBuf->Append(
"&");
89 fBuf->Append(
"'");
92 fBuf->Append(
""");
110 if (nchld == 0) fBuf->Append(
TString::Format(
">%s", (fCompact ?
"" :
"\n")));
120 fBuf->Append(
TString::Format(
"%*s</item>%s", fCompact ? 0 : (lvl + 1) * 2,
"", (fCompact ?
"" :
"\n")));
143 if (!fCompact) fBuf->Append(
"\n");
144 fBuf->Append(
TString::Format(
"%*s\"_name\"%s\"%s\"", fCompact ? 0 : lvl * 4 + 2,
"", (fCompact ?
":" :
" : "), nodename));
151 const char *value,
Bool_t with_quotes)
154 if (!fCompact) fBuf->Append(
"\n");
155 fBuf->Append(
TString::Format(
"%*s\"%s\"%s", fCompact ? 0 : lvl * 4 + 2,
"", field, (fCompact ?
":" :
" : ")));
160 for (
const char *
v = value; *
v != 0;
v++)
169 fBuf->Append(
"\\\"");
172 fBuf->Append(
"\\\\");
187 if ((*
v > 31) && (*
v < 127))
202 if (!fCompact) fBuf->Append(
"\n");
204 fBuf->Append(
TString::Format(
"%*s\"_childs\"%s", (fCompact ? 0 : lvl * 4 + 2),
"", (fCompact ?
":[" :
" : [\n")));
214 fBuf->Append(
TString::Format(
"%s%*s]", (fCompact ?
"" :
"\n"), fCompact ? 0 : lvl * 4 + 2,
""));
215 fBuf->Append(
TString::Format(
"%s%*s}", (fCompact ?
"" :
"\n"), fCompact ? 0 : lvl * 4,
""));
All ROOT classes may have RTTI (run time type identification) support added.
Storage of hierarchy scan in TRootSniffer in JSON format.
TDataMember * fResMember
class of found item
Int_t fResRestrict
count of found childs, -1 by default
Int_t fResNumChilds
datamember pointer of found item
Abstract interface for storage of hierarchy scan in TRootSniffer.
virtual void BeforeNextChild(Int_t lvl, Int_t nchld, Int_t nfld)
called before next child node created
virtual void CloseNode(Int_t lvl, Int_t numchilds)
called when node should be closed depending from number of childs different xml format is applied ...
virtual ~TRootSnifferStore()
destructor
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void CloseNode(Int_t lvl, Int_t numchilds)
called when node should be closed depending from number of childs different xml format is applied ...
virtual void SetField(Int_t lvl, const char *field, const char *value, Bool_t with_quotes)
set field (json field) in current node
Storage of hierarchy scan in TRootSniffer in XML format.
void SetResult(void *_res, TClass *_rescl, TDataMember *_resmemb, Int_t _res_chld, Int_t restr=0)
set pointer on found element, class and number of childs
The ROOT global object gROOT contains a list of all defined classes.
virtual void BeforeNextChild(Int_t lvl, Int_t nchld, Int_t)
called before next child node created
TClass * fResClass
pointer on found item
virtual void CreateNode(Int_t, const char *)
Mother of all ROOT objects.
typedef void((*Func_t)())
virtual void SetField(Int_t lvl, const char *field, const char *value, Bool_t)
set field (xml attribute) in current node