This file demonstrates how THtml can document sources.
See the Users Guide chapter Automatic HTML Documentation, and THtml's class documentation.
To see this demo script in action start up ROOT and run
root [0] .x $(ROOTSYS)/tutorials/htmlex.C+
and check the output in ./htmldoc
.
and of course we can put HTML code into comments, too.
public:
THtmlDemo(): fHtml(0)
{
printf("This class is for demonstration purposes only!\n");
}
~THtmlDemo() { if (fHtml) delete fHtml; }
void DontDoMuch() {}
void Convert()
{
GetHtml()->SetSourceDir("$(ROOTSYS)/tutorials");
GetHtml()->Convert("htmlex.C", "Example of THtml", "./htmldoc/", "./");
}
void ReferenceDoc()
{
GetHtml()->SetSourceDir("$(ROOTSYS)/tutorials");
GetHtml()->SetOutputDir("./htmldoc");
GetHtml()->MakeIndex("THtmlDemo");
GetHtml()->MakeClass("THtmlDemo");
}
{
if (evenForROOT)
GetHtml()->SetSourceDir(".:$(ROOTSYS)");
else
GetHtml()->SetSourceDir(".");
GetHtml()->SetOutputDir("./htmldoc");
GetHtml()->MakeAll();
}
void RunAll() {
MakeDocForAllClasses();
ReferenceDoc();
Convert();
}
protected:
{
if (!fHtml) fHtml =
new THtml();
return fHtml;
}
private:
Int_t fVeryUselessMember;
};
void htmlex() {
THtmlDemo htmldemo;
htmldemo.RunAll();
}
#define ClassDef(name, id)
Mother of all ROOT objects.
- Author
- Axel Naumann
Definition in file htmlex.C.