28 :
TObject(), fResPtr(0), fResClass(0), fResMember(0), fResNumChilds(-1), fResRestrict(0)
68 fBuf->Append(
TString::Format(
"%*s<item _name=\"%s\"", fCompact ? 0 : (lvl + 1) * 2,
"", nodename));
76 if (strpbrk(value,
"<>&\'\"") == 0) {
80 const char *
v = value;
83 case '<': fBuf->Append(
"<");
break;
84 case '>': fBuf->Append(
">");
break;
85 case '&': fBuf->Append(
"&");
break;
86 case '\'': fBuf->Append(
"'");
break;
87 case '\"': fBuf->Append(
""");
break;
88 default: fBuf->Append(*v);
break;
102 if (nchld == 0) fBuf->Append(
TString::Format(
">%s", (fCompact ?
"" :
"\n")));
112 fBuf->Append(
TString::Format(
"%*s</item>%s", fCompact ? 0 : (lvl + 1) * 2,
"", (fCompact ?
"" :
"\n")));
135 if (!fCompact) fBuf->Append(
"\n");
137 TString::Format(
"%*s\"_name\"%s\"%s\"", fCompact ? 0 : lvl * 4 + 2,
"", (fCompact ?
":" :
" : "), nodename));
146 if (!fCompact) fBuf->Append(
"\n");
147 fBuf->Append(
TString::Format(
"%*s\"%s\"%s", fCompact ? 0 : lvl * 4 + 2,
"", field, (fCompact ?
":" :
" : ")));
152 for (
const char *
v = value; *
v != 0;
v++)
switch (*
v) {
153 case '\n': fBuf->Append(
"\\n");
break;
154 case '\t': fBuf->Append(
"\\t");
break;
155 case '\"': fBuf->Append(
"\\\"");
break;
156 case '\\': fBuf->Append(
"\\\\");
break;
157 case '\b': fBuf->Append(
"\\b");
break;
158 case '\f': fBuf->Append(
"\\f");
break;
159 case '\r': fBuf->Append(
"\\r");
break;
160 case '/': fBuf->Append(
"\\/");
break;
162 if ((*
v > 31) && (*
v < 127))
177 if (!fCompact) fBuf->Append(
"\n");
179 fBuf->Append(
TString::Format(
"%*s\"_childs\"%s", (fCompact ? 0 : lvl * 4 + 2),
"", (fCompact ?
":[" :
" : [\n")));
188 if (numchilds > 0) fBuf->Append(
TString::Format(
"%s%*s]", (fCompact ?
"" :
"\n"), fCompact ? 0 : lvl * 4 + 2,
""));
189 fBuf->Append(
TString::Format(
"%s%*s}", (fCompact ?
"" :
"\n"), fCompact ? 0 : lvl * 4,
""));
void * fResPtr
! pointer on found item
All ROOT classes may have RTTI (run time type identification) support added.
Storage of hierarchy scan in TRootSniffer in JSON format.
virtual void CreateNode(Int_t lvl, const char *nodename)
starts new xml node, will be closed by CloseNode
TDataMember * fResMember
! datamember pointer of found item
Int_t fResRestrict
! restriction for result, 0-default, 1-readonly, 2-full
Int_t fResNumChilds
! count of found childs, -1 by default
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 CreateNode(Int_t lvl, const char *nodename)
starts new json object, will be closed by CloseNode
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
TRootSnifferStore()
normal constructor
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
! class of found item
Mother of all ROOT objects.
virtual void SetField(Int_t lvl, const char *field, const char *value, Bool_t)
set field (xml attribute) in current node