53 TDocOutput(html), fHierarchyLines(0), fCurrentClass(cl),
54 fCurrentClassesTypedefs(typedefs), fParser(0)
92 if (!classFile.good()) {
125 classFile << std::endl <<
"<div id=\"functions\">" << std::endl;
128 classFile <<
"<h2><a id=\"" << mangled
129 <<
":Function_Members\"></a>Function Members (Methods)</h2>" << std::endl;
131 const char* tab4nbsp=
" ";
135 classFile <<
" <br /><b>"
136 << tab4nbsp <<
"This is an abstract class, constructors will not be documented.<br />" << std::endl
137 << tab4nbsp <<
"Look at the <a href=\""
139 <<
"\">header</a> to check for available constructors.</b><br />" << std::endl;
150 classFile <<
"<div class=\"access\" ";
151 const char* accessID [] = {
"priv",
"prot",
"publ"};
152 const char* accesstxt[] = {
"private",
"protected",
"public"};
154 classFile <<
"id=\"func" << accessID[access] <<
"\"><b>"
155 << accesstxt[access] <<
":</b>" << std::endl
156 <<
"<table class=\"func\" id=\"tabfunc" << accessID[access] <<
"\" cellspacing=\"0\">" << std::endl;
158 TIter iMethWrap(methods);
168 classFile <<
"<tr class=\"func";
171 classFile <<
"\"><td class=\"funcret\">";
174 classFile <<
"virtual ";
176 classFile <<
" virtual";
180 classFile <<
"static ";
182 if (!isctor && !isdtor)
187 classFile <<
"</td><td class=\"funcname\"><a class=\"funcname\" href=\"";
191 classFile << htmlFile;
193 classFile <<
"#" << mangledM;
200 mangledM += overloadIdx;
202 classFile << mangledM <<
"\">";
204 classFile <<
"<span class=\"baseclass\">";
206 classFile <<
"::</span>";
212 bool propSignal =
false;
213 bool propMenu =
false;
214 bool propToggle =
false;
215 bool propGetter =
false;
217 propSignal = (strstr(method->
GetTitle(),
"*SIGNAL*"));
218 propMenu = (strstr(method->
GetTitle(),
"*MENU*"));
219 propToggle = (strstr(method->
GetTitle(),
"*TOGGLE*"));
220 propGetter = (strstr(method->
GetTitle(),
"*GETTER"));
221 if (propSignal || propMenu || propToggle || propGetter) {
222 classFile <<
"<span class=\"funcprop\">";
223 if (propSignal) classFile <<
"<abbr title=\"emits a signal\">SIGNAL</abbr> ";
224 if (propMenu) classFile <<
"<abbr title=\"has a popup menu entry\">MENU</abbr> ";
225 if (propToggle) classFile <<
"<abbr title=\"toggles a state\">TOGGLE</abbr> ";
229 getter.Remove(0, posGetter + 8);
230 classFile <<
"<abbr title=\"use " +
getter +
"() as getter\">GETTER</abbr> ";
232 classFile <<
"</span>";
235 classFile <<
"</td></tr>" << std::endl;
237 classFile << std::endl <<
"</table></div>" << std::endl;
240 classFile <<
"</div>" << std::endl;
256 if (!haveDataMembers)
return;
258 classFile << std::endl <<
"<div id=\"datamembers\">" << std::endl;
261 classFile <<
"<h2><a name=\"" << mangled
262 <<
":Data_Members\"></a>Data Members</h2>" << std::endl;
265 const TList* datamembers = 0;
271 classFile <<
"<div class=\"access\" ";
272 const char*
what =
"data";
273 if (access > 2) what =
"enum";
274 const char* accessID [] = {
"priv",
"prot",
"publ"};
275 const char* accesstxt[] = {
"private",
"protected",
"public"};
277 classFile <<
"id=\"" << what << accessID[access%3] <<
"\"><b>"
278 << accesstxt[access%3] <<
":</b>" << std::endl
279 <<
"<table class=\"data\" id=\"tab" << what << accessID[access%3] <<
"\" cellspacing=\"0\">" << std::endl;
281 TIter iDM(datamembers);
289 if (prevEnumName.
Length()) {
290 classFile <<
"<tr class=\"data";
293 classFile <<
"\"><td class=\"datatype\">};</td><td></td><td></td></tr>" << std::endl;
298 classFile <<
"<tr class=\"data";
302 classFile <<
"\"><td class=\"datatype\">";
308 if (enumName.EndsWith(
"::"))
309 enumName +=
"<i>[unnamed]</i>";
310 Ssiz_t startClassName = 0;
311 if (!enumName.BeginsWith(
"enum "))
312 classFile <<
"enum ";
317 if (endClassName !=
kNPOS && endClassName > 0 && enumName[endClassName - 1] ==
':') {
319 TSubString substr(enumName(startClassName, endClassName - startClassName + 1));
322 enumName.Insert(substr.
Start() + substr.
Length(),
"</span>");
323 enumName.Insert(substr.
Start(),
"<span class=\"baseclass\">");
325 classFile << enumName <<
" { ";
329 classFile <<
"static ";
336 classFile <<
"</td><td class=\"dataname\"><a ";
338 classFile <<
"href=\"";
341 classFile << htmlFile <<
"#";
343 classFile <<
"name=\"";
344 classFile << mangledM;
348 classFile << mangledM <<
"\">";
352 classFile <<
"<span class=\"baseclass\">";
354 classFile <<
"::</span>";
363 classFile <<
"[" << member->
GetMaxIndex(indx) <<
"]";
367 classFile <<
"</td>";
369 classFile <<
"<td class=\"datadesc\">";
371 }
else classFile <<
"<td>";
372 classFile <<
"</td></tr>" << std::endl;
375 if (prevEnumName.
Length()) {
376 classFile <<
"<tr class=\"data";
379 classFile <<
"\"><td class=\"datatype\">};</td><td></td><td></td></tr>" << std::endl;
381 classFile << std::endl <<
"</table></div>" << std::endl;
384 classFile <<
"</div>" << std::endl;
421 filenameInh +=
"_Inh";
423 !
RunDot(filenameInh, &out))
429 filenameInhMem +=
"_InhMem";
431 RunDot(filenameInhMem, &out);
436 filenameIncl +=
"_Incl";
438 RunDot(filenameIncl, &out);
443 filenameLib +=
"_Lib";
445 RunDot(filenameLib, &out);
447 out <<
"<div class=\"tabs\">" << std::endl
448 <<
"<a id=\"img" <<
title <<
"_Inh\" class=\"tabsel\" href=\"inh/" <<
title <<
"_Inh.png\" onclick=\"javascript:return SetImg('Charts','inh/" <<
title <<
"_Inh.png');\">Inheritance</a>" << std::endl
449 <<
"<a id=\"img" <<
title <<
"_InhMem\" class=\"tab\" href=\"inhmem/" <<
title <<
"_InhMem.png\" onclick=\"javascript:return SetImg('Charts','inhmem/" <<
title <<
"_InhMem.png');\">Inherited Members</a>" << std::endl
450 <<
"<a id=\"img" <<
title <<
"_Incl\" class=\"tab\" href=\"incl/" <<
title <<
"_Incl.png\" onclick=\"javascript:return SetImg('Charts','incl/" <<
title <<
"_Incl.png');\">Includes</a>" << std::endl
451 <<
"<a id=\"img" <<
title <<
"_Lib\" class=\"tab\" href=\"lib/" <<
title <<
"_Lib.png\" onclick=\"javascript:return SetImg('Charts','lib/" <<
title <<
"_Lib.png');\">Libraries</a><br/>" << std::endl
452 <<
"</div><div class=\"classcharts\"><div class=\"classchartswidth\"></div>" << std::endl
453 <<
"<img id=\"Charts\" alt=\"Class Charts\" class=\"classcharts\" usemap=\"#Map" <<
title <<
"_Inh\" src=\"inh/" <<
title <<
"_Inh.png\"/></div>" << std::endl;
472 out <<
"<!--INHERITANCE TREE-->" << std::endl;
475 out <<
"<table><tr><td width=\"10%\"></td><td width=\"70%\">"
476 <<
"<a href=\"ClassHierarchy.html\">Inheritance Chart</a>:</td></tr>";
477 out <<
"<tr class=\"inhtree\"><td width=\"10%\"></td><td width=\"70%\">";
479 out <<
"<table class=\"inhtree\"><tr><td>" << std::endl;
480 out <<
"<table width=\"100%\" border=\"0\" ";
481 out <<
"cellpadding =\"0\" cellspacing=\"2\"><tr>" << std::endl;
483 out <<
"<table><tr>";
494 UInt_t bgcolor=255-depth*8;
496 while ((inheritFrom = (
TBaseClass *) nextBase())) {
499 out <<
"<td><table><tr>" << std::endl;
502 out <<
"</tr><tr>" << std::endl;
503 out <<
"<td bgcolor=\""
504 <<
Form(
"#%02x%02x%02x", bgcolor, bgcolor, bgcolor)
505 <<
"\" align=\"right\">" << std::endl;
512 << (
const char *) inheritFrom->
GetName()
514 out <<
"</td>"<< std::endl;
517 out <<
"</tr></table></td>" << std::endl;
518 out <<
"<td>←</td>";
522 out <<
"<td>" << std::endl;
526 const char *className = classPtr->
GetName();
534 out <<
"<center><tt><a name=\"" << anchor;
535 out <<
"\" href=\"" << htmlFile <<
"\">";
537 out <<
"</a></tt></center>" << std::endl;
544 out <<
"<center><big><b><tt><a name=\"" << anchor;
545 out <<
"\" href=\"" << htmlFile <<
"\">";
547 out <<
"</a></tt></b></big></center>" << std::endl;
552 out <<
"</td>" << std::endl;
562 out <<
"<td><table><tr>" << std::endl;
566 out <<
"</tr></table>";
568 out <<
"</td><td align=\"left\"> <a href=\"ClassHierarchy.html\">[more...]</a>";
569 out<<
"</td>" << std::endl;
574 out <<
"</tr></table>" << std::endl;
576 out <<
"</td></tr></table></td></tr></table>"<<std::endl;
621 std::ofstream outdot(filename);
622 outdot <<
"strict digraph G {" << std::endl
623 <<
"rankdir=RL;" << std::endl
624 <<
"ranksep=2;" << std::endl
625 <<
"nodesep=0;" << std::endl
626 <<
"size=\"8,10\";" << std::endl
627 <<
"ratio=auto;" << std::endl
628 <<
"margin=0;" << std::endl
629 <<
"node [shape=plaintext,fontsize=40,width=4,height=0.75];" << std::endl
632 std::stringstream ssDep;
633 std::list<TClass*> writeBasesFor;
638 outdot <<
"{" << std::endl;
639 while (!writeBasesFor.empty()) {
640 TClass* cl = writeBasesFor.front();
641 writeBasesFor.pop_front();
643 outdot <<
" \"" << cl->
GetName() <<
"\"";
646 outdot <<
" [URL=\"" << htmlFileName <<
"\"]";
647 outdot <<
";" << std::endl;
650 ssDep <<
" \"" << cl->
GetName() <<
"\" -> {";
654 ssDep <<
" \"" << base->
GetName() <<
"\";";
655 writeBasesFor.push_back(base->GetClassPointer());
657 ssDep <<
"}" << std::endl;
660 outdot <<
"}" << std::endl;
663 std::map<TClass*, Int_t> derivesFromMe;
664 std::map<TClass*, unsigned int> entriesPerDerived;
665 std::set<TClass*> wroteNode;
667 static const unsigned int maxClassesPerDerived = 20;
669 outdot <<
"{" << std::endl;
672 for (std::map<TClass*, Int_t>::iterator iDerived = derivesFromMe.begin();
673 iDerived != derivesFromMe.end(); ++iDerived) {
674 if (iDerived->second != level)
continue;
676 TIter iBaseOfDerived(iDerived->first->GetListOfBases());
679 TClass* writeAndMoreFor = 0;
680 while ((baseDerived = (
TBaseClass*) iBaseOfDerived())) {
681 TClass* clBaseDerived = baseDerived->GetClassPointer();
683 && wroteNode.find(clBaseDerived) != wroteNode.end()) {
684 unsigned int& count = entriesPerDerived[clBaseDerived];
685 if (count < maxClassesPerDerived) {
687 ssDep <<
"\"" << iDerived->first->GetName() <<
"\" -> \""
688 << clBaseDerived->
GetName() <<
"\";" << std::endl;
690 }
else if (count == maxClassesPerDerived) {
691 writeAndMoreFor = clBaseDerived;
692 ssDep <<
"\"...andmore" << clBaseDerived->
GetName() <<
"\"-> \""
693 << clBaseDerived->
GetName() <<
"\";" << std::endl;
700 wroteNode.insert(iDerived->first);
701 outdot <<
" \"" << iDerived->first->GetName() <<
"\"";
704 outdot <<
" [URL=\"" << htmlFileName <<
"\"]";
705 outdot <<
";" << std::endl;
706 }
else if (writeAndMoreFor) {
707 outdot <<
" \"...andmore" << writeAndMoreFor->
GetName()
708 <<
"\" [label=\"...and more\",fontname=\"Times-Italic\",fillcolor=lightgrey,style=filled];" << std::endl;
711 if (!levelExists)
break;
713 outdot <<
"}" << std::endl;
715 outdot << ssDep.str();
717 outdot <<
"}" << std::endl;
728 std::ofstream outdot(filename);
729 outdot <<
"strict digraph G {" << std::endl
730 <<
"ratio=auto;" << std::endl
731 <<
"rankdir=RL;" << std::endl
732 <<
"compound=true;" << std::endl
733 <<
"constraint=false;" << std::endl
734 <<
"ranksep=0.1;" << std::endl
735 <<
"nodesep=0;" << std::endl
736 <<
"margin=0;" << std::endl;
737 outdot <<
" node [style=filled,width=0.7,height=0.15,fixedsize=true,shape=plaintext,fontsize=10];" << std::endl;
739 std::stringstream ssDep;
740 const int numColumns = 3;
742 std::list<TClass*> writeBasesFor;
744 while (!writeBasesFor.empty()) {
745 TClass* cl = writeBasesFor.front();
746 writeBasesFor.pop_front();
750 outdot <<
"subgraph \"cluster" << cl->
GetName() <<
"\" {" << std::endl
751 <<
" color=lightgray;" << std::endl
752 <<
" label=\"" << cl->
GetName() <<
"\";" << std::endl;
754 outdot <<
" URL=\"" << htmlFileName <<
"\"" << std::endl;
763 std::map<std::string, TDataMember*> dmMap;
769 dmMap[dm->GetName()] = dm;
772 outdot <<
"subgraph \"clusterData0" << cl->
GetName() <<
"\" {" << std::endl
773 <<
" color=white;" << std::endl
774 <<
" label=\"\";" << std::endl
775 <<
" \"clusterNode0" << cl->
GetName() <<
"\" [height=0,width=0,style=invis];" << std::endl;
777 Int_t pos = dmMap.size();
779 Int_t newColumnEvery = (pos + numColumns - 1) / numColumns;
780 for (std::map<std::string, TDataMember*>::iterator iDM = dmMap.begin();
781 iDM != dmMap.end(); ++iDM, --pos) {
786 if (iDM == dmMap.begin())
787 prevColumnNode = nodeName;
789 outdot <<
"\"" << nodeName <<
"\" [label=\""
792 outdot <<
",color=\"#FFCCCC\"";
794 outdot <<
",color=\"#FFFF77\"";
796 outdot <<
",color=\"#CCFFCC\"";
797 outdot <<
"];" << std::endl;
798 if (pos % newColumnEvery == 1) {
800 outdot <<
"};" << std::endl
801 <<
"subgraph \"clusterData" << column << cl->
GetName() <<
"\" {" << std::endl
802 <<
" color=white;" << std::endl
803 <<
" label=\"\";" << std::endl
804 <<
" \"clusterNode" << column << cl->
GetName() <<
"\" [height=0,width=0,style=invis];" << std::endl;
805 }
else if (iDM != dmMap.begin() && pos % newColumnEvery == 0) {
806 ssDep <<
"\"" << prevColumnNode
807 <<
"\" -> \"" << nodeName <<
"\""<<
" [style=invis,weight=100];" << std::endl;
808 prevColumnNode = nodeName;
812 while (column < numColumns - 1) {
814 outdot <<
" \"clusterNode" << column << cl->
GetName() <<
"\" [height=0,width=0,style=invis];" << std::endl;
817 outdot <<
"};" << std::endl;
823 std::map<std::string, TMethod*> methMap;
828 while ((meth = (
TMethod*) iMeth()))
829 methMap[meth->GetName()] = meth;
832 outdot <<
"subgraph \"clusterFunc0" << cl->
GetName() <<
"\" {" << std::endl
833 <<
" color=white;" << std::endl
834 <<
" label=\"\";" << std::endl
835 <<
" \"clusterNode0" << cl->
GetName() <<
"\" [height=0,width=0,style=invis];" << std::endl;
838 Int_t pos = methMap.size();
840 Int_t newColumnEvery = (pos + numColumns - 1) / numColumns;
841 for (std::map<std::string, TMethod*>::iterator iMeth = methMap.begin();
842 iMeth != methMap.end(); ++iMeth, --pos) {
847 if (iMeth == methMap.begin())
848 prevColumnNodeFunc = nodeName;
850 outdot <<
"\"" << nodeName <<
"\" [label=\"" << meth->
GetName() <<
"\"";
853 outdot <<
",color=\"#777777\"";
855 outdot <<
",color=\"#FFCCCC\"";
857 outdot <<
",color=\"#FFFF77\"";
859 outdot <<
",color=\"#CCFFCC\"";
860 outdot <<
"];" << std::endl;
861 if (pos % newColumnEvery == 1) {
863 outdot <<
"};" << std::endl
864 <<
"subgraph \"clusterFunc" << column << cl->
GetName() <<
"\" {" << std::endl
865 <<
" color=white;" << std::endl
866 <<
" label=\"\";" << std::endl;
867 }
else if (iMeth != methMap.begin() && pos % newColumnEvery == 0) {
868 ssDep <<
"\"" << prevColumnNodeFunc
869 <<
"\" -> \"" << nodeName <<
"\""<<
" [style=invis,weight=100];" << std::endl;
870 prevColumnNodeFunc = nodeName;
873 outdot <<
"};" << std::endl;
876 outdot <<
"}" << std::endl;
878 for (
Int_t pos = 0; pos < numColumns - 1; ++pos)
879 ssDep <<
"\"clusterNode" << pos << cl->
GetName() <<
"\" -> \"clusterNode" << pos + 1 << cl->
GetName() <<
"\" [style=invis];" << std::endl;
885 ssDep <<
" \"clusterNode" << numColumns - 1 << cl->
GetName() <<
"\" -> "
886 <<
" \"clusterNode0" << base->GetName() <<
"\" [ltail=\"cluster" << cl->
GetName()
887 <<
"\",lhead=\"cluster" << base->GetName() <<
"\"";
889 ssDep <<
",weight=0";
890 ssDep <<
"];" << std::endl;
891 writeBasesFor.push_back(base->GetClassPointer());
896 outdot << ssDep.str();
898 outdot <<
"}" << std::endl;
912 std::map<std::string, std::string> filesToParse;
913 std::list<std::string> listFilesToParse;
920 filesToParse[declFileName.
Data()] = real.
Data();
921 listFilesToParse.push_back(declFileName.
Data());
935 std::ofstream outdot(filename);
936 outdot <<
"strict digraph G {" << std::endl
937 <<
"ratio=compress;" << std::endl
938 <<
"rankdir=TB;" << std::endl
939 <<
"concentrate=true;" << std::endl
940 <<
"ranksep=0;" << std::endl
941 <<
"nodesep=0;" << std::endl
942 <<
"size=\"8,10\";" << std::endl
943 <<
"node [fontsize=20,shape=plaintext];" << std::endl;
945 for (std::list<std::string>::iterator iFile = listFilesToParse.begin();
946 iFile != listFilesToParse.end(); ++iFile) {
947 std::ifstream in(filesToParse[*iFile].c_str());
949 while (in && !in.eof()) {
950 std::getline(in, line);
952 while (line[pos] ==
' ' || line[pos] ==
'\t') ++pos;
953 if (line[pos] !=
'#')
continue;
955 while (line[pos] ==
' ' || line[pos] ==
'\t') ++pos;
956 if (line.compare(pos, 8,
"include ") != 0)
continue;
958 while (line[pos] ==
' ' || line[pos] ==
'\t') ++pos;
959 if (line[pos] !=
'"' && line[pos] !=
'<')
961 char delim = line[pos];
962 if (delim ==
'<') delim =
'>';
966 pos = line.find(delim);
967 if (pos == std::string::npos)
continue;
969 if (filesToParse.find(line) == filesToParse.end()) {
973 listFilesToParse.push_back(line);
974 filesToParse[
line] = sysfilename;
975 if (*iFile == implFileName.
Data() || *iFile == declFileName.
Data())
976 outdot <<
"\"" << *iFile <<
"\" [style=filled,fillcolor=lightgray];" << std::endl;
978 outdot <<
"\"" << *iFile <<
"\" -> \"" << line <<
"\";" << std::endl;
982 outdot <<
"}" << std::endl;
994 std::ofstream outdot(filename);
995 outdot <<
"strict digraph G {" << std::endl
996 <<
"ratio=auto;" << std::endl
997 <<
"rankdir=RL;" << std::endl
998 <<
"compound=true;" << std::endl
999 <<
"constraint=false;" << std::endl
1000 <<
"ranksep=0.7;" << std::endl
1001 <<
"nodesep=0.3;" << std::endl
1002 <<
"size=\"8,8\";" << std::endl
1003 <<
"ratio=compress;" << std::endl;
1006 outdot <<
"\"All Libraries\" [URL=\"LibraryDependencies.html\",shape=box,rank=max,fillcolor=lightgray,style=filled];" << std::endl;
1008 if (libs.Length()) {
1018 if (posExt !=
kNPOS)
1022 outdot <<
"\"All Libraries\" -> \"" << firstLib <<
"\" [style=invis];" << std::endl;
1023 outdot <<
"\"" << firstLib <<
"\" -> {" << std::endl;
1025 if (firstLib !=
"libCore")
1027 if (firstLib !=
"libCint")
1030 for (
Ssiz_t pos = 0; pos < libs.Length(); ++pos)
1031 if (libs[pos] !=
' ')
1032 thisLib += libs[pos];
1033 else if (thisLib.
Length()) {
1035 if (posExt !=
kNPOS)
1037 outdot <<
" \"" << thisLib <<
"\";";
1043 if (posExt !=
kNPOS)
1045 outdot <<
" \"" << thisLib <<
"\";";
1048 outdot <<
"}" << std::endl;
1050 outdot <<
"\"No rlibmap information available.\"" << std::endl;
1052 outdot <<
"}" << std::endl;
1066 if (!bases || bases->
IsEmpty())
1069 out <<
"<hr />" << std::endl;
1071 out <<
"<table><tr><td><ul><li><tt>";
1074 << docFileName <<
"\">";
1082 out <<
"</tt></li></ul></td>";
1086 out <<
"</tr></table>" << std::endl;
1098 const char*
title =
"ClassHierarchy";
1103 std::ofstream dotout(filename +
".dot");
1105 if (!dotout.good()) {
1106 Error(
"CreateHierarchy",
"Can't open file '%s.dot' !",
1111 dotout <<
"digraph G {" << std::endl
1112 <<
"ratio=auto;" << std::endl
1113 <<
"rankdir=RL;" << std::endl;
1124 Warning(
"THtml::CreateHierarchy",
"skipping class %s\n", cdi->
GetName());
1130 if (bases && !bases->
IsEmpty()) {
1131 dotout <<
"\"" << cdi->
GetName() <<
"\" -> { ";
1136 if (base != bases->
First())
1138 dotout <<
"\"" << base->
GetName() <<
"\"";
1140 dotout <<
"};" << std::endl;
1143 dotout <<
"\"" << cdi->
GetName() <<
"\";" << std::endl;
1150 std::ofstream
out(filename +
".html");
1152 Error(
"CreateHierarchy",
"Can't open file '%s.html' !",
1160 out <<
"<h1>Class Hierarchy</h1>" << std::endl;
1166 out <<
"<img usemap=\"#Map" << title <<
"\" src=\"" << title <<
".png\"/>" << std::endl;
1192 dynamic_cast<std::ofstream&
>(
out).
open(sourceHtmlFileName);
1194 Warning(
"LocateMethodsInSource",
"Can't open beautified source file '%s' for writing!",
1195 sourceHtmlFileName.
Data());
1196 sourceHtmlFileName.
Remove(0);
1202 title +=
" - source file";
1204 out <<
"<div id=\"codeAndLineNumbers\"><pre class=\"listing\">" << std::endl;
1215 out <<
"<td></td>" << std::endl;
1226 if (!classPtr)
continue;
1230 if (!bases)
continue;
1233 if (!inheritFrom)
continue;
1236 out <<
"<td>←</td><td><table><tr>" << std::endl;
1238 out <<
"</tr><tr>"<<std::endl;
1241 UInt_t bgcolor=255-depth*8;
1242 out <<
"<td bgcolor=\""
1243 <<
Form(
"#%02x%02x%02x", bgcolor, bgcolor, bgcolor)
1245 out <<
"<table><tr><td>" << std::endl;
1248 if (htmlFile.Length()) {
1249 out <<
"<center><tt><a name=\"" << cdi->
GetName() <<
"\" href=\""
1250 << htmlFile <<
"\">";
1252 out <<
"</a></tt></center>";
1271 out <<
"</td>" << std::endl;
1273 out <<
"</tr></table></td>" << std::endl;
1277 out <<
"</tr></table></td>" << std::endl;
1279 out <<
"<td></td>" << std::endl;
1304 if (!htmlFile.
Length()) {
1306 what +=
" (source not found)";
1322 Error(
"MakeTree",
"Cannot create a TCanvas!");
1344 out <<
"<div class=\"dropshadow\"><div class=\"withshadow\">";
1347 out <<
"<h1><a name=\"" << anchor;
1348 out <<
":description\"></a>";
1351 out <<
"namespace ";
1362 while ((inheritFrom = (
TBaseClass *) nextBase())) {
1372 out <<
"protected ";
1384 out <<
"<a href=\"" << htmlFile <<
"\">";
1390 out <<
"</h1>" << std::endl;
1392 out <<
"<div class=\"classdescr\">" << std::endl;
1394 if (description.
Length())
1395 out <<
"<pre>" << description <<
"</pre>";
1399 out <<
"<h4>This class is also known as (typedefs to this class)</h4>";
1401 bool firsttd =
true;
1406 else firsttd =
false;
1411 out <<
"</div>" << std::endl
1412 <<
"</div></div>" << std::endl;
1418 out <<
"<h2><a id=\"" << anchor
1419 <<
":Class_Charts\"></a>Class Charts</h2>" << std::endl;
1425 out <<
"<h2>Function documentation</h2>" << std::endl;
1434 classFile <<
"<a name=\"TopOfPage\"></a>" << std::endl;
1442 sTitle.Prepend(
"namespace ");
1444 sTitle.Prepend(
"class ");
1451 char* libDup=
StrDup(lib);
1452 char* libDupSpace=strchr(libDup,
' ');
1453 if (libDupSpace) *libDupSpace=0;
1454 char* libDupEnd=libDup+strlen(libDup);
1455 while (libDupEnd!=libDup)
1456 if (*(--libDupEnd)==
'.') {
1463 classFile <<
"<script type=\"text/javascript\">WriteFollowPageBox('"
1464 << sTitle <<
"','" << sLib <<
"','" << sInclude <<
"');</script>" << std::endl;
1471 classFile <<
"<div class=\"descrhead\"><div class=\"descrheadcontent\">" << std::endl
1472 <<
"<span class=\"descrtitle\">Source:</span>" << std::endl;
1482 if (headerFileName.
Length())
1483 classFile <<
"<a class=\"descrheadentry\" href=\"src/" << classFileName
1484 <<
".h.html\">header file</a>" << std::endl;
1486 classFile <<
"<a class=\"descrheadentry\"> </a>" << std::endl;
1488 if (sourceFileName.
Length())
1489 classFile <<
"<a class=\"descrheadentry\" href=\"src/" << classFileName
1490 <<
".cxx.html\">source file</a>" << std::endl;
1492 classFile <<
"<a class=\"descrheadentry\"> </a>" << std::endl;
1496 classFile <<
"<a class=\"descrheadentry\" href=\"" << classFileName <<
"_Tree.pdf\"";
1497 classFile <<
">inheritance tree (.pdf)</a> ";
1502 if (viewCVSLink.
Length()) {
1503 if (headerFileName.
Length()) {
1505 TString sHeader(headerFileName);
1506 if (
GetHtml()->GetProductName() && !strcmp(
GetHtml()->GetProductName(),
"ROOT")) {
1508 if (posInclude !=
kNPOS) {
1510 sHeader.
Remove(0, posInclude + 8);
1513 posInclude = sHeader.
Index(
"/inc/");
1514 if (posInclude !=
kNPOS) {
1516 sHeader += sInclude;
1519 if (sourceFileName && strstr(sourceFileName,
"src")) {
1527 if (posEndLib !=
kNPOS)
1528 src.Remove(posEndLib, src.Length());
1529 if (src.BeginsWith(
"lib"))
1531 posEndLib = src.Index(
'.');
1532 if (posEndLib !=
kNPOS)
1533 src.Remove(posEndLib, src.Length());
1541 if (mustReplace) link.
ReplaceAll(
"%f", sHeader);
1542 else link += sHeader;
1543 classFile <<
"<a class=\"descrheadentry\" href=\"" << link <<
"\">viewVC header</a> ";
1545 classFile <<
"<a class=\"descrheadentry\"> </a> ";
1546 if (sourceFileName.
Length()) {
1548 if (mustReplace) link.
ReplaceAll(
"%f", sourceFileName);
1549 else link += sourceFileName;
1550 classFile <<
"<a class=\"descrheadentry\" href=\"" << link <<
"\">viewVC source</a> ";
1552 classFile <<
"<a class=\"descrheadentry\"> </a> ";
1561 else wikiLink += currClassNameMangled;
1562 classFile <<
"<a class=\"descrheadentry\" href=\"" << wikiLink <<
"\">wiki</a> ";
1565 classFile << std::endl <<
"</div></div>" << std::endl;
1567 classFile <<
"<div class=\"descrhead\"><div class=\"descrheadcontent\">" << std::endl
1568 <<
"<span class=\"descrtitle\">Sections:</span>" << std::endl
1569 <<
"<a class=\"descrheadentry\" href=\"#" << currClassNameMangled;
1571 classFile <<
":description\">namespace description</a> ";
1573 classFile <<
":description\">class description</a> ";
1574 classFile << std::endl
1575 <<
"<a class=\"descrheadentry\" href=\"#" << currClassNameMangled <<
":Function_Members\">function members</a>" << std::endl
1576 <<
"<a class=\"descrheadentry\" href=\"#" << currClassNameMangled <<
":Data_Members\">data members</a>" << std::endl
1577 <<
"<a class=\"descrheadentry\" href=\"#" << currClassNameMangled <<
":Class_Charts\">class charts</a>" << std::endl
1578 <<
"</div></div>" << std::endl
1579 <<
"</div>" << std::endl;
1599 out <<
"<div class=\"funcdoc\"><span class=\"funcname\">"
1600 << ret <<
" <a class=\"funcname\" name=\"";
1603 out << mangled <<
":";
1610 out << mangled <<
"\" href=\"src/" <<
filename;
1612 out <<
"#" << anchor;
1616 if (guessedMethod) {
1622 if (!first) out <<
", ";
1625 paramGuessed +=
" ";
1626 paramGuessed += arg->
GetName();
1628 paramGuessed +=
" = ";
1632 out << paramGuessed;
1641 out <<
"</span><br />" << std::endl;
1644 out <<
"<div class=\"funccomm\"><pre>" << comment <<
"</pre></div>" << std::endl;
1646 if (codeOneLiner.
Length()) {
1647 out << std::endl <<
"<div class=\"code\"><code class=\"inlinecode\">"
1648 << codeOneLiner <<
"</code></div>" << std::endl
1649 <<
"<div style=\"clear:both;\"></div>" << std::endl;
1652 out <<
"</div>" << std::endl;
A zero length substring is legal.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Int_t GetEntries() const
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
static Bool_t IsNamespace(const TClass *cl)
Check whether cl is a namespace.
TClassDocOutput(THtml &html, TClass *cl, TList *typedefs)
Create an object given the invoking THtml object, and the TClass object that we will generate output ...
Ssiz_t Last(char c) const
Find last occurrence of a character c.
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual void Close(Option_t *option="")=0
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual ~TClassDocOutput()
Destructor, deletes fParser.
Bool_t HaveDot()
Check whether dot is available in $PATH or in the directory set by SetDotPath()
R__EXTERN Int_t gErrorIgnoreLevel
void CreateClassHierarchy(std::ostream &out, const char *docFileName)
Create the hierarchical class list part for the current class's base classes.
All ROOT classes may have RTTI (run time type identification) support added.
TString & ReplaceAll(const TString &s1, const TString &s2)
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
virtual int MakeDirectory(const char *name)
Make a directory.
void ClassTree(TVirtualPad *canvas, Bool_t force=kFALSE)
It makes a graphical class tree.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
static const char * filename()
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
const char * GetSharedLibs()
Get the list of shared libraries containing the code for class cls.
const TPathDefinition & GetPathDefinition() const
Return the TModuleDefinition (or derived) object as set by SetModuleDefinition(); create and return a...
Bool_t CopyHtmlFile(const char *sourceName, const char *destName="")
Copy file to HTML directory.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Each ROOT method (see TMethod) has a linked list of its arguments.
TString & Prepend(const char *cs)
const char * ShortType(const char *name) const
Get short type name, i.e. with default templates removed.
const TList * GetMethods(EAccess access) const
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetOverloadIdx() const =0
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
const char * GetCounterFormat() const
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
void MakeTree(Bool_t force=kFALSE)
Create an output file with a graphical representation of the class inheritance.
virtual void SaveAs(const char *filename="", Option_t *option="") const =0
Save this object in the file specified by filename.
Bool_t CreateHierarchyDot()
Create a hierarchical class list The algorithm descends from the base classes and branches into all d...
const char * Data() const
ClassImp(RooList) TObjOptLink *RooList TObjLink * link
Find the link corresponding to the named object in this list.
virtual void GetModuleNameForClass(TString &module, TClass *cl) const
Return the module name for a given class.
TDictionary * GetClass() const
virtual Bool_t IsEmpty() const
virtual bool GetIncludeAs(TClass *cl, TString &out_include_as) const
Determine the path and filename used in an include statement for the header file of the given class...
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
std::vector< std::vector< double > > Data
const char * GetDefault() const
Get default value of method argument.
Bool_t CreateDotClassChartInh(const char *filename)
Build the class tree for one class in GraphViz/Dot format.
void WriteHtmlFooter(std::ostream &out, const char *dir, const char *lastUpdate, const char *author, const char *copyright, const char *footer)
Write HTML footer.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * GetCounter() const
void WriteLocation(std::ostream &out, TModuleDocInfo *module, const char *classname=0)
make a link to the description
TVirtualPad is an abstract base class for the Pad and Canvas classes.
const TList * GetListOfClasses() const
virtual void Parse(std::ostream &out)
Locate methods, starting in the source file, then inline, then immediately inside the class declarati...
const TList * GetEnums(EAccess access) const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();...
R__EXTERN TSystem * gSystem
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
TClass * GetClass() const
void GetDerivedClasses(TClass *cl, std::map< TClass *, Int_t > &derived) const
fill derived with all classes inheriting from cl and their inheritance distance to cl ...
Basic data type descriptor (datatype information is obtained from CINT).
virtual const char * ReplaceSpecialChars(char c)
Replace ampersand, less-than and greater-than character, writing to out.
This class defines an abstract interface that must be implemented by all classes that contain diction...
virtual void NameSpace2FileName(TString &name)
Replace "::" in name by "__" Replace "<", ">", " ", ",", "~", "=" in name by "_" Replace "A::X<A::Y>"...
void CreateSourceOutputStream(std::ostream &out, const char *extension, TString &filename)
Open a Class.cxx.html file, where Class is defined by classPtr, and .cxx.html by extension It's creat...
const TString & GetWikiURL() const
char * Form(const char *fmt,...)
void Draw(Option_t *option="")
Draw detailed class inheritance structure.
ClassImp(TClassDocOutput)
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
virtual TMethod * GetMethod() const =0
virtual bool GetFileNameFromInclude(const char *included, TString &out_fsname) const
Set out_fsname to the full pathname corresponding to a file included as "included".
TList * fCurrentClassesTypedefs
virtual void WriteSearch(std::ostream &out)
Write a search link or a search box, based on THtml::GetSearchStemURL() and THtml::GetSearchEngine()...
void DescendHierarchy(std::ostream &out, TClass *basePtr, Int_t maxLines=0, Int_t depth=1)
Descend hierarchy recursively loop over all classes and look for classes with base class basePtr...
Each class (see TClass) has a linked list of its base class(es).
void WriteHtmlHeader(std::ostream &out, const char *titleNoSpecial, const char *dir, TClass *cls, const char *header)
Write HTML header.
virtual Bool_t IsModified(TClass *classPtr, EFileType type)
Check if file is modified.
char * StrDup(const char *str)
Duplicate the string str.
void ClassHtmlTree(std::ostream &out, TClass *classPtr, ETraverse dir=kBoth, int depth=1)
This function builds the class tree for one class in HTML (inherited and succeeding classes...
const TList * GetDataMembers(EAccess access) const
TEllipse dict(9, 20, 3, 1.5)
TString & Remove(Ssiz_t pos)
virtual bool GetDeclFileName(TClass *cl, Bool_t filesys, TString &out_name) const
Return declaration file name; return the full path if filesys is true.
TClass * GetClass() const
void Class2Html(Bool_t force=kFALSE)
Create HTML files for a single class.
virtual Int_t GetSize() const
virtual TClass * GetClass(const char *name) const
*-*-*-*-*Return pointer to class with name*-*-*-*-*-*-*-*-*-*-*-*-* *-* =============================...
const TList * GetListOfModules() const
virtual void DecorateKeywords(std::ostream &out, const char *text)
Expand keywords in text, writing to out.
#define R__LOCKGUARD(mutex)
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
const char * GetSourceInfo(ESourceInfo type) const
virtual void ListDataMembers(std::ostream &classFile)
Write the list of data members and enums.
const TString & GetViewCVS() const
Int_t GetArrayDim() const
Return number of array dimensions.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
void WriteTopLinks(std::ostream &out, TModuleDocInfo *module, const char *classname=0, Bool_t withLocation=kTRUE)
Write the first part of the links shown ontop of each doc page; one has to be closed by caller so ad...
virtual void WriteClassDocHeader(std::ostream &classFile)
Write out the introduction of a class description (shortcuts and links)
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
Bool_t CreateDotClassChartInhMem(const char *filename)
Build the class tree of inherited members for one class in GraphViz/Dot format.
Bool_t RunDot(const char *filename, std::ostream *outMap=0, EGraphvizTool gvwhat=kDot)
Run filename".dot", creating filename".png", and - if outMap is !=0, filename".map", which gets then included literally into outMap.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Each ROOT class (see TClass) has a linked list of methods.
const char * GetHtmlFileName() const
const TString & GetOutputDir(Bool_t createDir=kTRUE) const
Return the output directory as set by SetOutputDir().
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
virtual void WriteMethod(std::ostream &out, TString &ret, TString &name, TString ¶ms, const char *file, TString &anchor, TString &comment, TString &codeOneLiner, TDocMethodWrapper *guessedMethod)
Write method name with return type ret and parameters param to out.
Bool_t ClassDotCharts(std::ostream &out)
This function builds the class charts for one class in GraphViz/Dot format, i.e.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
TMethod * GetMethodAny(const char *method)
Return pointer to method without looking at parameters.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void ListFunctions(std::ostream &classFile)
Write the list of functions.
virtual bool GetImplFileName(TClass *cl, Bool_t filesys, TString &out_name) const
Return implementation file name.
Bool_t CreateDotClassChartIncl(const char *filename)
Build the include dependency graph for one class in GraphViz/Dot format.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
virtual void WriteClassDescription(std::ostream &out, const TString &description)
Called by TDocParser::LocateMethods(), this hook writes out the class description found by TDocParser...
Bool_t CreateDotClassChartLib(const char *filename)
Build the library dependency graph for one class in GraphViz/Dot format.
Ssiz_t First(char c) const
Find first occurrence of a character c.
virtual void GetHtmlFileName(TClass *classPtr, TString &filename) const
Return real HTML filename.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.