38 TMethodWrapperImpl(
TMethod*
m,
int overloadIdx):
39 fMeth(
m), fOverloadIdx(overloadIdx) {}
41 static void SetClass(
const TClass* cl) { fgClass = cl; }
45 Int_t GetNargs()
const {
return fMeth->GetNargs(); }
52 const TMethodWrapperImpl*
m =
dynamic_cast<const TMethodWrapperImpl*
>(obj);
57 if (GetNargs() <
m->GetNargs())
return -1;
58 else if (GetNargs() >
m->GetNargs())
return 1;
65 const char*
l(GetName());
67 if (
l[0] ==
'~' &&
r[0] ==
'~') {
79 if (lcl && fgClass->InheritsFrom(lcl)) {
80 if (rcl && fgClass->InheritsFrom(rcl)) {
85 }
else if (rcl && fgClass->InheritsFrom(rcl))
88 if (
l[0] ==
'~')
return -1;
89 if (
r[0] ==
'~')
return 1;
90 return (ret < 0) ? -1 : 1;
94 static const TClass* fgClass;
99 const TClass* TMethodWrapperImpl::fgClass = 0;
151 fHtml(docOutput.GetHtml()), fDocOutput(&docOutput), fLineNo(0),
152 fCurrentClass(cl), fRecentClass(0), fCurrentModule(0),
153 fDirectiveCount(0), fLineNumber(0), fDocContext(kIgnore),
154 fCheckForMethod(
kFALSE), fClassDocState(kClassDoc_Uninitialized),
165 TMethodWrapperImpl::SetClass(cl);
167 for (
int ia = 0; ia < 3; ++ia) {
181 while ((method = (
TMethod *) nextMethod())) {
191 fHtml(docOutput.GetHtml()), fDocOutput(&docOutput), fLineNo(0),
192 fCurrentClass(0), fRecentClass(0), fDirectiveCount(0),
193 fLineNumber(0), fDocContext(kIgnore),
194 fCheckForMethod(
kFALSE), fClassDocState(kClassDoc_Uninitialized),
205 TMethodWrapperImpl::SetClass(0);
214 for (std::map<std::string, Int_t>::const_iterator iMethod =
fMethodCounts.begin();
217 Info(
"~TDocParser",
"Implementation of method %s::%s could not be found.",
219 iMethod->first.c_str());
224 directive->
GetName(directiveName);
225 Warning(
"~TDocParser",
"Missing \"%s\" for macro %s", directive->
GetEndTag(), directiveName.
Data());
245 std::map<std::string, int> methOverloads;
247 while ((method = (
TMethod *) nextMethod())) {
249 if (!strcmp(method->
GetName(),
"Dictionary") ||
250 !strcmp(method->
GetName(),
"Class_Version") ||
251 !strcmp(method->
GetName(),
"Class_Name") ||
252 !strcmp(method->
GetName(),
"DeclFileName") ||
253 !strcmp(method->
GetName(),
"DeclFileLine") ||
254 !strcmp(method->
GetName(),
"ImplFileName") ||
255 !strcmp(method->
GetName(),
"ImplFileLine") ||
256 (bc && (method->
GetName()[0] ==
'~'
271 if (mtype == 0)
continue;
279 for (
Int_t access = 0; !hidden && access < 3; ++access) {
281 hidden |= (other) && (other->GetMethod()->GetClass() != method->
GetClass());
284 fMethods[mtype].
Add(
new TMethodWrapperImpl(method, methOverloads[method->
GetName()]));
285 ++methOverloads[method->
GetName()];
295 for (
Int_t access = 0; access < 3; ++access) {
317 if (!strcmp(dm->
GetName(),
"fgIsA"))
328 if (mtype == 0)
continue;
336 if ((dm->
Property() & flagEnumConst) == flagEnumConst
369 for (
Int_t access = 0; access < 6; ++access) {
382 const char base64String[65] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.";
390 anchor += base64String[hash % 52];
393 anchor += base64String[hash % 64];
428 if (!interpretDirectives) {
465 std::list<TClass*> currentType;
474 currentType.push_back(0);
484 Ssiz_t copiedToCommentUpTo = 0;
489 const char* endTag = directive->
GetEndTag();
492 if (posEndTag == 0 ||
line[posEndTag - 1] !=
'"')
494 if (posEndTag !=
kNPOS)
506 while(i <
line.Length())
508 copiedToCommentUpTo = i;
512 for (; i <
line.Length(); ++i) {
514 if (!currentType.back())
520 if (currentType.back())
523 if (
line[i + 1] ==
':') {
530 if (
line[i + 1] ==
'>') {
537 if (
line[i + 1] !=
'.') {
546 currentType.push_back(0);
551 if (currentType.size() > 1)
552 currentType.pop_back();
557 if (i >=
line.Length())
560 currentType.back() = 0;
566 && i > 2 &&
line[i] ==
'\'' &&
line[i-1] ==
';';
567 if (haveHtmlEscapedChar) {
569 while (posBegin > 0 &&
IsWord(
line[posBegin]))
571 haveHtmlEscapedChar = posBegin > 0 &&
572 line[posBegin] ==
'&' &&
line[posBegin - 1] ==
'\'';
578 && ( (i > 1 &&
line[i - 2] ==
'\'')
579 || (i > 3 &&
line[i - 2] ==
'\\' &&
line[i - 3] ==
'\'')))
580 || haveHtmlEscapedChar)
581 && (i == 0 ||
line[i - 1] !=
'\\');
583 if (
line[i] ==
'"' || (
line[i] ==
'\'' && (
585 (
line.Length() > i + 2 &&
line[i + 2] ==
'\'') ||
587 (
line.Length() > i + 3 &&
line[i + 1] ==
'\'' &&
line[i + 3] ==
'\'')))) {
591 currentType.back() = 0;
593 }
else if (context ==
kCode
594 &&
line[i] ==
'/' && (
line[i+1] ==
'/' ||
line[i+1] ==
'*')) {
596 if (
line[i+1] ==
'/')
598 currentType.back() = 0;
603 &&
line.Length() > i + 1
604 &&
line[i] ==
'*' &&
line[i+1] ==
'/') {
608 currentType.back() = 0;
616 copiedToCommentUpTo = i;
618 }
else if (startOfLine == i
620 && context ==
kCode) {
625 if (i <
line.Length())
633 currentType.back() = 0;
654 if ((i == 0 || (i > 0 &&
line[i - 1] !=
'"'))
657 currentType.back() = 0;
668 currentType.back() = 0;
683 const char* globalTypeName = 0;
684 if (currentType.empty()) {
685 Warning(
"DecorateKeywords",
"type context is empty!");
686 currentType.push_back(0);
688 TClass* lookupScope = currentType.back();
690 if (scoping == kNada) {
697 if (scoping == kNada) {
701 if (!subType && !subClass) {
714 if (!subType && !subClass) {
719 if (!subType && !subClass) {
721 while (isspace(
line[endWord])) ++endWord;
722 if (
line[endWord] ==
'<' ||
line[endWord] ==
'>') {
724 Ssiz_t endWordT = endWord + 1;
725 int templateLevel = 1;
726 while (endWordT <
line.Length()
729 ||
line[endWordT] ==
'<'
730 ||
line[endWordT] ==
'>')) {
731 if (
line[endWordT] ==
'<')
733 else if (
line[endWordT] ==
'>')
739 word =
line(i, endWordT - i);
744 if (lookupScope && !subType && !subClass) {
745 if (scoping == kScope) {
747 subClassName +=
"::";
748 subClassName += word;
753 if (!subClass && !subType) {
759 if (!subClass && !subType && !datamem && !meth) {
761 while (isspace(
line[endWord])) ++endWord;
762 if (
line[endWord] ==
'<' ||
line[endWord] ==
'>') {
764 Ssiz_t endWordT = endWord + 1;
765 int templateLevel = 1;
766 while (endWordT <
line.Length()
769 ||
line[endWordT] ==
'<'
770 ||
line[endWordT] ==
'>')) {
771 if (
line[endWordT] ==
'<')
773 else if (
line[endWordT] ==
'>')
778 subClassName +=
"::";
779 subClassName +=
line(i, endWordT - i);
782 word =
line(i, endWordT - i);
794 globalTypeName ? globalTypeName : subType->
GetName());
795 currentType.back() = 0;
796 }
else if (subClass) {
798 globalTypeName ? globalTypeName : subClass->
GetName());
800 currentType.back() = subClass;
802 }
else if (datamem || meth) {
815 while (
IsWord(retTypeName[pos]) || retTypeName[pos]==
'<' || retTypeName[pos]==
'>' || retTypeName[pos]==
':')
822 currentType.back() = 0;
829 if (i >
line.Length())
837 currentType.back() = 0;
861 currentType.back() = 0;
871 typedef std::map<std::string ,
Int_t > MethodCount_t;
874 --(iMethodName->second);
875 if (iMethodName->second <= 0)
888 while ((cl = (
TClass*) iClass()))
892 if (!directive)
continue;
917 Ssiz_t posInclude =
line.Index(
"include", pos);
918 if (posInclude !=
kNPOS) {
920 Ssiz_t posStartFilename = posInclude + 7;
921 if (
line.Tokenize(
filename, posStartFilename,
"[<\"]")) {
922 Ssiz_t posEndFilename = posStartFilename;
931 line.Remove(posStartFilename,
line.Length());
935 line +=
"<a href=\"./";
939 posEndOfLine =
line.Length() - 1;
952 posEndOfLine =
line.Length();
955 Ssiz_t posHashAfterDecoration = posHash;
957 posEndOfLine += posHashAfterDecoration - posHash;
970 else out_module =
"(UNKNOWN MODULE WHILE PARSING)";
978 Ssiz_t& copiedToCommentUpTo)
996 copiedToCommentUpTo = pos;
1011 if (begin &&
line[pos] ==
'(') {
1012 std::list<char> waitForClosing;
1013 Ssiz_t endParam = pos + 1;
1014 for (; endParam <
line.Length()
1015 && (
line[endParam] !=
')' || !waitForClosing.empty()); ++endParam) {
1016 const char c =
line[endParam];
1017 if (!waitForClosing.empty() && waitForClosing.back() ==
c) {
1018 waitForClosing.pop_back();
1023 if (waitForClosing.empty() || waitForClosing.back() !=
'\'')
1024 waitForClosing.push_back(
'"');
1027 if (waitForClosing.empty() || waitForClosing.back() !=
'"')
1028 waitForClosing.push_back(
'\'');
1031 if (waitForClosing.empty() || (waitForClosing.back() !=
'"' && waitForClosing.back() !=
'\''))
1032 waitForClosing.push_back(
')');
1040 if (waitForClosing.empty()) {
1041 params =
line(pos + 1, endParam - (pos + 1));
1042 pos += params.
Length() + 2;
1049 const char* endTag = directive->
GetEndTag();
1050 Ssiz_t lenEndTag = strlen(endTag);
1052 if (
line[posEndTag - 1] ==
'"') {
1053 posEndTag += lenEndTag;
1058 if (posEndTag !=
kNPOS) {
1067 posEndTag =
line.Length();
1072 line.Remove(posEndTag,
line.Length());
1074 while (pos <
line.Length())
1077 pos =
line.Length();
1079 copiedToCommentUpTo =
line.Length();
1088 else pos += word.
Length() - 2;
1093 Warning(
"HandleDirective",
"Cannot find directive handler object %s !",
1112 pos =
line.Length();
1115 copiedToCommentUpTo = pos;
1163 for (std::list<UInt_t>::const_reverse_iterator iPC =
fParseContext.rbegin();
1165 if (!lowerContext || ((lowerContext && ((*iPC &
kParseContextMask) == lowerContext))
1166 && (!contextFlag || (contextFlag && (*iPC & contextFlag)))))
1257 if (pos > 0 &&
line[pos - 1] ==
'"')
1277 tag[0] -=
'a' -
'A';
1283 if (
gDebug > 0 && !clDirective)
1284 Warning(
"IsDirective",
"Unknown THtml directive %s in line %d!", word.
Data(),
fLineNo);
1305 if (isalnum(
c) ||
c ==
'_' ||
c ==
'~')
1328 if (isalpha(
c) ||
c ==
'_' ||
c ==
'~')
1345 Bool_t& isconst, std::ostream &srcOut,
1346 TString &anchor, std::ifstream& sourceFile,
1349 typedef std::map<std::string ,
Int_t > MethodCount_t;
1352 if (posMethodName ==
kNPOS) {
1357 if (posQuote !=
kNPOS && (posBlock ==
kNPOS || posQuote < posBlock))
1358 posBlock = posQuote;
1359 if (posBlock ==
kNPOS)
1361 for (MethodCount_t::iterator iMethodName =
fMethodCounts.begin();
1363 TString lookFor(iMethodName->first);
1365 if (posMethodName !=
kNPOS && posMethodName < posBlock
1366 && (posMethodName == 0 || !
IsWord(
fLineRaw[posMethodName - 1]))) {
1369 Ssiz_t posMethodEnd = posMethodName + lookFor.
Length();
1371 if (
fLineRaw[posMethodEnd] ==
'(') {
1373 srcOut, anchor, sourceFile, allowPureVirtual);
1391 while (didSomething) {
1394 didSomething =
kTRUE;
1398 didSomething =
kTRUE;
1402 didSomething =
kTRUE;
1411 if (posParam ==
kNPOS ||
1421 if (
name.BeginsWith(
"operator")) {
1423 Ssiz_t checkOpBracketParam = posParam + 1;
1424 while (isspace((
UChar_t)
name[checkOpBracketParam]))
1425 ++checkOpBracketParam;
1426 if (
name[checkOpBracketParam] ==
')') {
1427 ++checkOpBracketParam;
1428 while (isspace((
UChar_t)
name[checkOpBracketParam]))
1429 ++checkOpBracketParam;
1430 if (
name[checkOpBracketParam] ==
'(')
1431 posParam = checkOpBracketParam;
1435 if (posParam ==
kNPOS) {
1442 params =
name(posParam,
name.Length() - posParam);
1443 name.Remove(posParam);
1446 if (!
name.Length()) {
1454 if (iMethodName ==
fMethodCounts.end() || iMethodName->second <= 0) {
1463 Int_t bracketLevel = 1;
1464 while (bracketLevel) {
1465 const char* paramEnd = strpbrk(params.
Data() + posParamEnd,
")(\"'");
1473 srcOut <<
"<a name=\"" << anchor <<
"\"></a>";
1480 if (sourceFile.eof()) {
1481 Error(
"LocateMethodInCurrentLine",
1482 "Cannot find end of signature for function %s!",
1496 posParamEnd = params.
Length();
1499 posParamEnd = paramEnd - params.
Data();
1500 switch (params[posParamEnd]) {
1501 case '(': ++bracketLevel; ++posParamEnd;
break;
1502 case ')': --bracketLevel; ++posParamEnd;
break;
1505 while (params.
Length() > posParamEnd && params[posParamEnd] !=
'"') {
1507 if (params[posParamEnd] ==
'\\') ++posParamEnd;
1510 if (params.
Length() <= posParamEnd) {
1521 if (params[posParamEnd] ==
'\\') ++posParamEnd;
1532 isconst = pastParams.
BeginsWith(
"const") && !(isalnum(pastParams[5]) || pastParams[5] ==
'_');
1536 Ssiz_t posSemicolon = params.
Index(
';', posParamEnd);
1537 Ssiz_t posPureVirt = params.
Index(
'=', posParamEnd);
1538 if (posSemicolon !=
kNPOS)
1539 if ((posBlock ==
kNPOS || (posSemicolon < posBlock)) &&
1540 (posPureVirt ==
kNPOS || !allowPureVirtual)
1541 && !allowPureVirtual)
1545 params.
Remove(posParamEnd);
1553 posMethodName = posParam + posParamEnd;
1608 Bool_t lookForSourceInfo ,
1610 Bool_t allowPureVirtual ,
1611 const char* methodPattern ,
1612 const char* sourceExt )
1616 if (!sourceFileName.
Length()) {
1618 Error(
"LocateMethods",
"Can't find source file '%s' for class %s!",
1622 std::ifstream sourceFile(sourceFileName.
Data());
1623 if (!sourceFile || !sourceFile.good()) {
1624 Error(
"LocateMethods",
"Can't open file '%s' for reading!", sourceFileName.
Data());
1628 TPMERegexp patternRE(methodPattern ? methodPattern :
"");
1640 std::ofstream srcHtmlOut;
1642 if (sourceExt && sourceExt[0]) {
1650 srcHtmlOutName +=
".h.html";
1658 while (!sourceFile.eof()) {
1664 if (sourceFile.eof())
break;
1681 Strip(strippedComment);
1682 if (strippedComment.
Length() > 0) {
1697 while ((posLastScope =
name.Index(
"::")) !=
kNPOS)
1698 name.Remove(0, posLastScope + 2);
1701 if (posName !=
kNPOS) {
1702 Ssiz_t posClosingParen = posName +
name.Length();
1703 while (isspace(
fLineStripped[posClosingParen])) ++posClosingParen;
1717 if (methodName.
Length() && !wroteMethodNowWaitingForOpenBlock) {
1719 if (useDocxxStyle && docxxComment.
Length()) {
1723 WriteMethod(out, methodRet, methodName, methodParam, methodIsConst,
1726 if (savedComment[0]) {
1731 if (!wroteMethodNowWaitingForOpenBlock) {
1734 if (methodPattern) {
1737 if (posPattern !=
kNPOS && methodPattern) {
1739 static const char vetoChars[] =
"{\"";
1740 for (
int ich = 0; posPattern !=
kNPOS && vetoChars[ich]; ++ich) {
1742 if (posVeto !=
kNPOS && posVeto < posPattern)
1746 if (posPattern !=
kNPOS || !methodPattern) {
1747 if (methodPattern) {
1749 posPattern += patternRE[0].Length();
1752 methodParam, methodIsConst, srcHtmlOut,
1753 anchor, sourceFile, allowPureVirtual);
1754 if (methodName.
Length()) {
1756 needAnchor = !anchor.
Length();
1775 if (methodName.
Length() && !wroteMethodNowWaitingForOpenBlock) {
1777 if (!codeOneLiner.Length() &&
1782 codeOneLiner.
Remove(0, codeOneLiner.Index(
'{'));
1783 codeOneLiner.
Remove(codeOneLiner.Index(
'}') + 1);
1787 else if (!methodName.
Length() && !useDocxxStyle)
1793 srcHtmlOut <<
"<a name=\"" << anchor <<
"\"></a>";
1800 if (lookForSourceInfo)
1813 else if (needAnchor)
1818 if (methodName.
Length()) {
1819 if (useDocxxStyle && docxxComment.
Length())
1821 WriteMethod(out, methodRet, methodName, methodParam, methodIsConst,
1827 srcHtmlOut <<
"</pre>" << std::endl;
1831 srcHtmlOut <<
"</div>" << std::endl;
1854 while ((posLastScope = pattern.
Index(
"::")) !=
kNPOS)
1855 pattern.
Remove(0, posLastScope + 2);
1861 kFALSE , pattern,
".cxx.html");
1863 if (posGt !=
kNPOS) {
1866 if (posLt !=
kNPOS && posLt < posGt) {
1867 pattern.
Replace(posLt + 1, posGt - posLt - 1,
".*");
1869 kFALSE , pattern,
".cxx.html");
1887 while ((posLastScope = pattern.
Index(
"::")) !=
kNPOS)
1888 pattern.
Remove(0, posLastScope + 1);
1896 if (posGt !=
kNPOS) {
1899 if (posLt !=
kNPOS && posLt < posGt) {
1900 pattern.
Replace(posLt + 1, posGt - posLt - 1,
".*");
1918 kTRUE , 0,
".h.html");
1953 while ((mustDealWithCommentAtBOL && posSpanEnd !=
kNPOS) || posComment !=
kNPOS) {
1954 Int_t spanLevel = 1;
1956 while (spanLevel > 1 || (posSpan !=
kNPOS && posSpan < posSpanEnd)) {
1958 if (posSpan !=
kNPOS && posSpan < posSpanEnd) {
1968 if (posSpanEnd !=
kNPOS) {
1970 commentLine.
Remove(posSpanEnd, 7);
1971 if (posComment !=
kNPOS)
1972 commentLine.
Remove(posComment, 22);
1974 mustDealWithCommentAtBOL =
kFALSE;
1981 if (posComment !=
kNPOS)
1982 commentLine.
Remove(posComment, 22);
1997 char start_or_end = 0;
1999 if (commentLine.
Length()>1 && commentLine[0] ==
'/'
2000 && (commentLine[1] ==
'/' || commentLine[1] ==
'*')) {
2001 start_or_end = commentLine[1];
2002 commentLine.
Remove(0, 2);
2005 if (start_or_end !=
'/' && commentLine.
Length()>1
2006 && commentLine[commentLine.
Length() - 2] ==
'*'
2007 && commentLine[commentLine.
Length() - 1] ==
'/') {
2008 start_or_end = commentLine[commentLine.
Length() - 2];
2013 if (start_or_end && commentLine.
Length() > 3) {
2019 if (
c == lineAllOneChar[
len - 2] &&
c == lineAllOneChar[
len - 3]) {
2021 Strip(lineAllOneCharStripped);
2022 if (!lineAllOneCharStripped.
Length()) {
2038 if (commentLine.
Length() > 0 && start_or_end == commentLine[commentLine.
Length() - 1])
2043 while (commentLine.
Length() > 2
2044 && !
IsWord(commentLine[0])
2045 && commentLine[0] == commentLine[commentLine.
Length() - 1])
2049 while (start_or_end && commentLine[0] == start_or_end)
2050 commentLine.
Remove(0, 1);
2065 for (std::list<UInt_t>::iterator iContext =
fParseContext.begin();
2067 if (*iContext == lookFor) iComment =iContext;
2077 Bool_t changed = str[0] ==
' ' || str[0] ==
'\t' || str[0] ==
'\n';
2079 && (str[str.
Length() - 1] ==
' ' || str[str.
Length() - 1] ==
'\t'
2080 || str[str.
Length() - 1] ==
'\n');
2081 if (!changed)
return kFALSE;
2083 while (str[i] ==
' ' || str[i] ==
'\t' || str[i] ==
'\n')
2087 while (i >= 0 && (str[i] ==
' ' || str[i] ==
'\t' || str[i] ==
'\n'))
2107 static void RemoveUnneededSpaces(
TString& s) {
2114 if (((isalnum(
p) ||
p ==
'_') && (isalnum(
n) ||
n ==
'_'))
2115 || (
p ==
'>' &&
n ==
'>')) {
2118 while (isspace(s[i])) {
2126 static void ParseParameters(
TString& strippedParams,
TList& paramArr) {
2131 bool quoted =
false;
2135 switch (strippedParams[i]) {
2138 case '[': ++nest;
break;
2141 case ']': --nest;
break;
2142 case '=':
init =
true;
break;
2143 case '\'': ++i;
if (strippedParams[i] ==
'\\') ++i; ++i;
continue;
2144 case '\\': ++i;
continue;
break;
2145 case '"': quoted = !quoted;
break;
2147 if (!quoted && !nest) {
2157 arg += strippedParams[i];
2161 if (strippedLastArg.Length()) {
2171 TIter iCandidate(candidates);
2172 int nparams = paramArr->
GetSize();
2173 for (
int iparam = 0; iparam < nparams && candidates->
GetSize() > 1; ++iparam) {
2176 while (noParName.Length()
2177 && (isalnum(noParName[noParName.Length() - 1]) || noParName[noParName.Length() - 1] ==
'_'))
2178 noParName.Remove(noParName.Length() - 1);
2181 if (noParName.Length()) {
2182 RemoveUnneededSpaces(noParName);
2184 RemoveUnneededSpaces(srcArg);
2189 for (
int comparison = 0; comparison < 5; ++comparison) {
2190 if (comparison == 1 && noParName == srcArg)
2199 RemoveUnneededSpaces(sMethArg);
2200 bool matches =
false;
2201 switch (comparison) {
2202 case 0: matches = (srcArg == sMethArg);
break;
2203 case 1: matches = (noParName == sMethArg);
break;
2204 case 2: matches = srcArg.
Contains(sMethArg) || sMethArg.
Contains(srcArg);
break;
2207 suppressed.
Add(method);
2221 if (candidates->
GetSize() > 1) {
2251 TString strippedParams(params);
2252 if (strippedParams[0] ==
'(') {
2253 strippedParams.
Remove(0, 1);
2260 ParseParameters(strippedParams, paramArr);
2261 int nparams = paramArr.
GetSize();
2265 for (
int access = 0; access < 3; ++access) {
2267 if (!methList)
continue;
2269 TIter nextMethod(methList);
2275 candidates.
Add(method);
2280 if (nparams && candidates.
GetSize() > 1) {
2281 MatchOverloadSignatures(&candidates, ¶mArr);
2285 if (candidates.
GetSize() == 1) {
2291 fComment, codeOneLiner, guessedMethod);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char text
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
Each class (see TClass) has a linked list of its base class(es).
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
TMethod * GetMethodAny(const char *method)
Return pointer to method without looking at parameters.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Collection abstract base class.
virtual void RemoveAll(TCollection *col)
Remove all objects in collection col from this collection.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
TDataType * GetDataType() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
Basic data type descriptor (datatype information is obtained from CINT).
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
const char * GetName() const
Returns name of object.
virtual Bool_t GetResult(TString &result)=0
void SetCounter(Int_t count)
void SetTag(const char *tag)
virtual const char * GetEndTag() const =0
void SetParameters(const char *params)
Given a string containing parameters in params, we call AddParameter() for each of them.
virtual void DeleteOutput() const
void SetParser(TDocParser *parser)
Set the parser, and fDocOutput, fHtml from that.
virtual void AddLine(const TSubString &line)=0
virtual Int_t GetOverloadIdx() const =0
virtual TMethod * GetMethod() const =0
virtual void DecorateEntityBegin(TString &str, Ssiz_t &pos, TDocParser::EParseContext type)
Add some colors etc to a source entity, contained in str.
virtual void NameSpace2FileName(TString &name)
Replace "::" in name by "__" Replace "<", ">", " ", ",", "~", "=" in name by "_" Replace "A::X<A::Y>"...
void WriteLineNumbers(std::ostream &out, Long_t nLines, const TString &infileBase) const
Create a div containing the line numbers (for a source listing) 1 to nLines.
virtual void ReferenceEntity(TSubString &str, TClass *entity, const char *comment=0)
Create a reference to a class documentation page.
Bool_t CopyHtmlFile(const char *sourceName, const char *destName="")
Copy file to HTML directory.
void WriteHtmlFooter(std::ostream &out, const char *dir, const char *lastUpdate, const char *author, const char *copyright, const char *footer)
Write HTML footer.
virtual const char * ReplaceSpecialChars(char c)
Replace ampersand, less-than and greater-than character, writing to out.
virtual void DecorateEntityEnd(TString &str, Ssiz_t &pos, TDocParser::EParseContext type)
Add some colors etc to a source entity, contained in str.
virtual void FixupAuthorSourceInfo(TString &authors)
Special author treatment; called when TDocParser::fSourceInfo[kInfoAuthor] is set.
virtual void AdjustSourcePath(TString &line, const char *relpath="../")
adjust the path of links for source files, which are in src/, but need to point to relpath (usually "...
static void AnchorFromLine(const TString &line, TString &anchor)
Create an anchor from the given line, by hashing it and convertig the hash into a custom base64 strin...
static Bool_t IsWord(UChar_t c)
Check if c is a valid first character for C++ name.
EParseContext Context() const
void LocateMethodsInSource(std::ostream &out)
Given fCurrentClass, look for methods in its source file, and extract documentation to out,...
@ kClassDoc_LookingNothingFound
@ kClassDoc_LookingHaveSomething
void WriteClassDoc(std::ostream &out, Bool_t first=kTRUE)
Write the class description depending (among others) on fClassDocState.
std::set< UInt_t > fExtraLinesWithAnchor
void LocateMethodsInHeaderClassDecl(std::ostream &out)
Given fCurrentClass, look for methods in its header file's class declaration block,...
virtual void ExpandCPPLine(TString &line, Ssiz_t &pos)
Expand preprocessor statements.
void LocateMethodsInHeaderInline(std::ostream &out)
Given fCurrentClass, look for methods in its header file, and extract documentation to out.
virtual TClass * IsDirective(const TString &line, Ssiz_t pos, const TString &word, Bool_t &begin) const
return whether word at line's pos is a valid directive, and returns its TDocDirective's TClass object...
static Bool_t Strip(TString &s)
strips ' ', tabs, and newlines from both sides of str
void WriteMethod(std::ostream &out, TString &ret, TString &name, TString ¶ms, Bool_t isconst, const char *file, TString &anchor, TString &codeOneLiner)
Write a method, forwarding to TClassDocOutput.
TMethod * LocateMethodInCurrentLine(Ssiz_t &posMethodName, TString &ret, TString &name, TString ¶ms, Bool_t &isconst, std::ostream &srcOut, TString &anchor, std::ifstream &sourcefile, Bool_t allowPureVirtual)
Search for a method starting at posMethodName, and return its return type, its name,...
void InitKeywords() const
fill C++ keywords into fgKeywords
void RemoveCommentContext(Bool_t cxxcomment)
remove the top-most comment context that matches cxxcomment,
TString fSourceInfoTags[kNumSourceInfos]
TString fCurrentMethodTag
TString fSourceInfo[kNumSourceInfos]
TDocParser(TClassDocOutput &docOutput, TClass *cl)
Constructor called for parsing class sources.
void DecrementMethodCount(const char *name)
reduce method count for method called name, removing it from fMethodCounts once the count reaches 0.
virtual Bool_t ProcessComment()
Parse the current line as a comment, handling directives and re-formatting the comment: remove "/*",...
static Bool_t IsName(UChar_t c)
Check if c is a valid C++ name character.
virtual ~TDocParser()
destructor, checking whether all methods have been found for gDebug > 3
void GetCurrentModule(TString &out_module) const
Return the name of module for which sources are currently parsed.
void Convert(std::ostream &out, std::istream &in, const char *relpath, Bool_t isCode, Bool_t interpretDirectives)
Parse text file "in", add links etc, and write output to "out".
void LocateMethods(std::ostream &out, const char *filename, Bool_t lookForSourceInfo=kTRUE, Bool_t useDocxxStyle=kFALSE, Bool_t allowPureVirtual=kFALSE, const char *methodPattern=0, const char *sourceExt=0)
Collect methods from the source or header file called filename.
TDocOutput * GetDocOutput() const
std::list< UInt_t > fParseContext
UInt_t InContext(Int_t context) const
checks whether we are in a parse context, return the entry closest to the current context.
void AddClassMethodsRecursively(TBaseClass *bc)
Add accessible (i.e.
std::map< std::string, Int_t > fMethodCounts
void WriteSourceLine(std::ostream &out)
Write fLineSource to out.
static std::set< std::string > fgKeywords
void AddClassDataMembersRecursively(TBaseClass *bc)
Add data members of fCurrentClass and of bc to datamembers, recursively.
virtual void DecorateKeywords(std::ostream &out, const char *text)
Expand keywords in text, writing to out.
virtual Bool_t HandleDirective(TString &keyword, Ssiz_t &pos, TString &word, Ssiz_t &copiedToCommentUpTo)
Process directives to the documentation engine, like "Begin_Html" / "End_Html", "Begin_Macro" / "End_...
virtual void DeleteDirectiveOutput() const
Delete output generated by prior runs of all known directives; the output file names might have chang...
enum TDocParser::@100 fClassDocState
virtual void Parse(std::ostream &out)
Locate methods, starting in the source file, then inline, then immediately inside the class declarati...
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
Global variables class (global variables are obtained from CINT).
virtual const char * GetTypeName() const
Get type of global variable, e,g.: "class TDirectory*" -> "TDirectory".
void Rehash(Int_t newCapacity)
Rehash the hashlist.
const TList * GetListForObject(const char *name) const
Return the THashTable's list (bucket) in which obj can be found based on its hash; see THashTable::Ge...
virtual bool GetFileNameFromInclude(const char *included, TString &out_fsname) const
Set out_fsname to the full pathname corresponding to a file included as "included".
const TString & GetClassDocTag() const
virtual TClass * GetClass(const char *name) const
Return pointer to class with name.
const TString & GetCopyrightTag() const
const TString & GetAuthorTag() const
const TString & GetDocStyle() const
virtual bool GetDeclFileName(TClass *cl, Bool_t filesys, TString &out_name) const
Return declaration file name; return the full path if filesys is true.
const TString & GetLastUpdateTag() const
virtual void GetModuleNameForClass(TString &module, TClass *cl) const
Return the module name for a given class.
TVirtualMutex * GetMakeClassMutex() const
virtual bool GetImplFileName(TClass *cl, Bool_t filesys, TString &out_name) const
Return implementation file name.
const TPathDefinition & GetPathDefinition() const
Return the TModuleDefinition (or derived) object as set by SetModuleDefinition(); create and return a...
void Clear(Option_t *option="") override
Remove all objects from the list.
virtual TObjLink * LastLink() const
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
Each ROOT class (see TClass) has a linked list of methods.
TClass * GetClass() const
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
const char * GetName() const override
Returns name of object.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Bool_t IsSortable() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
virtual ULong_t Hash() const
Return hash value for this object.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
void ToLower()
Change string to lower-case.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
TString & Remove(Ssiz_t pos)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)
Read a line from stream upto newline skipping any whitespace.
A zero length substring is legal.
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
RPY_EXPORTED TCppMethod_t GetMethod(TCppScope_t scope, TCppIndex_t imeth)
void init()
Inspect hardware capabilities, and load the optimal library for RooFit computations.