ROOT logo
ROOT » HTML » THtml

class THtml: public TObject


The THtml class is designed to easily document classes, code, and code related text files (like change logs). It generates HTML pages conforming to the XHTML 1.0 transitional specifications; an example of these pages is ROOT's own reference guide. This page was verified to be valid XHTML 1.0 transitional, which proves that all pages generated by THtml can be valid, as long as the user provided XHTML (documentation, header, etc) is valid. You can check the current THtml by clicking this icon: Valid XHTML 1.0 Transitional

Overview:
  1. Usage
  2. Configuration
    1. Input files
    2. Output directory
    3. Linking other documentation
    4. Recognizing class documentation
    5. Author, copyright, etc.
    6. Header and footer
    7. Links to searches, home page, ViewVC
    8. HTML Charset
  3. Documentation syntax
    1. Class description
    2. Class index
    3. Method documentation
    4. Data member documentation
  4. Documentation directives
    1. BEGIN_HTML END_HTML: include 'raw' HTML
    2. BEGIN_MACRO END_MACRO: include a picture generated by a macro
    3. BEGIN_LATEX END_LATEX: include a latex picture
  5. Product and module index
  6. Auxiliary files: style sheet, JavaScript, help page
  7. Class Charts
  8. Configuration variables
  9. Behind the scenes

I. Usage

These are typical things people do with THtml:
    root[] THtml html;                // create a THtml object
    root[] html.MakeAll();             // generate documentation for all changed classes
or to run on just a few classes:
    root[] THtml html;                // create a THtml object
    root[] html.MakeIndex();           // create auxiliary files (style sheet etc) and indices
    root[] html.MakeClass("TMyClass"); // create documentation for TMyClass only
To "beautify" (i.e. create links to documentation for class names etc) some text file or macro, use:
    root[] html.Convert( "hsimple.C", "Histogram example" )

II. Configuration

Most configuration options can be set as a call to THtml, or as a TEnv variable, which you can set in your .rootrc.

II.1 Input files

In your .rootrc, define Root.Html.SourceDir to point to directories containing .cxx and .h files (see: TEnv) of the classes you want to document, or call THtml::SetInputDir()

Example:

  Root.Html.SourceDir:  .:src:include
  Root.Html.Root:       http://root.cern.ch/root/html

II.2 Output directory

The output directory can be specified using the Root.Html.OutputDir configuration variable (default value: "htmldoc"). If that directory doesn't exist THtml will create it.

Example:

  Root.Html.OutputDir:         htmldoc

II.3 Linking other documentation

When trying to document a class, THtml searches for a source file in the directories set via SetInputDir(). If it cannot find it, it assumes that this class must have been documented before. Based on the library this class is defined in, it checks the configuration variable Root.Html.LibName, and creates a link using its value. Alternatively, you can set these URLs via THtml::SetLibURL().

Example:
If a class MyClass is defined in class mylibs/libMyLib.so, and .rootrc contains

  Root.Html.MyLib: ../mylib/

THtml will create a link to "../mylib/MyClass.html".

The library name association can be set up using the rootmap facility. For the library in the example above, which contains a dictionary generated from the linkdef MyLinkdef.h, the command to generate the rootmap file is

  $ rlibmap -f -r rootmap -l mylib/libMyLib.so -d libCore.so -c MyLinkdef.h

Here, -r specifies that the entries for libMyLib should be updated, -l specifies the library we're dealing with, -d its dependencies, and -c its linkdef. The rootmap file must be within one of the LD_LIBRARY_PATH (or PATH for Windows) directories when ROOT is started, otherwise ROOT will not use it.

II.4 Recognizing class documentation

The class documentation has to appear in the header file containing the class, right in front of its declaration. It is introduced by a string defined by Root.Html.Description or SetClassDocTag(). See the section on documentation syntax for further details.

Example:

  Root.Html.Description:       //____________________

The class documentation will show which include statement is to be used and which library needs to be linked to access it. The include file name is determined via TClass::GetDeclFileName(); leading parts are removed if they match any of the ':' separated entries in THtml::GetIncludePath().

II.5 Author, copyright, etc.

During the conversion, THtml will look for some strings ("tags") in the source file, which have to appear right in front of e.g. the author's name, copyright notice, etc. These tags can be defined with the following environment variables: Root.Html.Author, Root.Html.LastUpdate and Root.Html.Copyright, or with SetAuthorTag(), SetLastUpdateTag(), SetCopyrightTag().

If the LastUpdate tag is not found, the current date and time are used. This is useful when using THtml::MakeAll()'s default option force=kFALSE, in which case THtml generates documentation only for changed classes.

Authors can be a comma separated list of author entries. Each entry has one of the following two formats
  • Name (non-alpha).

    THtml will generate an HTML link for Name, taking the Root.Html.XWho configuration variable (defaults to "http://consult.cern.ch/xwho/people?") and adding all parts of the name with spaces replaces by '+'. Non-alphanumerical characters are printed out behind Name.

    Example:

    // Author: Enrico Fermi appears in the source file. THtml will generate the link http://consult.cern.ch/xwho/people?Enrico+Fermi. This works well for people at CERN.
  • Name <link> Info.

    THtml will generate an HTML link for Name as specified by link and print Info behind Name.

    Example:

    // Author: Enrico Fermi <http://www.enricos-home.it> or
    // Author: Enrico Fermi <mailto:enrico@fnal.gov> in the source file. That's world compatible.

Example (with defaults given):

      Root.Html.Author:     // Author:
      Root.Html.LastUpdate: // @(#)
      Root.Html.Copyright:  * Copyright
      Root.Html.XWho:       http://consult.cern.ch/xwho/people?

II.6 Header and footer

THtml generates a default header and footer for all pages. You can specify your own versions with the configuration variables Root.Html.Header and Root.Html.Footer, or by calling SetHeader(), SetFooter(). Both variables default to "", using the standard Root versions. If it has a "+" appended, THtml will write both versions (user and root) to a file, for the header in the order 1st root, 2nd user, and for the footer 1st user, 2nd root (the root versions containing "<html>" and </html> tags, resp).

If you want to replace root's header you have to write a file containing all HTML elements necessary starting with the <doctype> tag and ending with (and including) the <body> tag. If you add your header it will be added directly after Root's <body> tag. Any occurrence of the string %TITLE% in the user's header file will be replaced by a sensible, automatically generated title. If the header is generated for a class, occurrences of %CLASS% will be replaced by the current class's name, %SRCFILE% and %INCFILE% by the name of the source and header file, resp. (as given by TClass::GetImplFileName(), TClass::GetDeclFileName()). If the header is not generated for a class, they will be replaced by "".

Root's footer starts with the tag <!--SIGNATURE-->. It includes the author(s), last update, copyright, the links to the Root home page, to the user home page, to the index file (ClassIndex.html), to the top of the page and this page is automatically generated infomation. It ends with the tags </body></html>. If you want to replace it, THtml will search for some tags in your footer: Occurrences of the strings %AUTHOR%, %UPDATE%, and %COPYRIGHT% are replaced by their corresponding values before writing the html file. The %AUTHOR% tag will be replaced by the exact string that follows Root.Html.Author, no link generation will occur.

II.7 Links to searches, home page, ViewVC

Additional parameters can be set by Root.Html.Homepage (address of the user's home page), Root.Html.SearchEngine (search engine for the class documentation), Root.Html.Search (search URL, where %u is replaced by the referer and %s by the escaped search expression), and a ViewVC base URL Root.Html.ViewCVS. For the latter, the file name is appended or, if the URL contains %f, %f is replaced by the file name. All values default to "".

Examples:

      Root.Html.Homepage:     http://www.enricos-home.it
      Root.Html.SearchEngine: http://root.cern.ch/root/Search.phtml
      Root.Html.Search:       http://www.google.com/search?q=%s+site%3A%u

II.8 HTML Charset

XHTML 1.0 transitional recommends the specification of the charset in the content type meta tag, see e.g. http://www.w3.org/TR/2002/REC-xhtml1-20020801/ THtml generates it for the HTML output files. It defaults to ISO-8859-1, and can be changed using Root.Html.Charset.

Example:

      Root.Html.Charset:      EUC-JP

III. Documentation syntax

III.1 Class description

A class description block, which must be placed before the first member function, has a following form:

////////////////////////////////////////////////////////////////
//                                                            //
// TMyClass                                                   //
//                                                            //
// This is the description block.                             //
//                                                            //
////////////////////////////////////////////////////////////////

The environment variable Root.Html.Description (see: TEnv) contains the delimiter string (default value: //_________________). It means that you can also write your class description block like this:

   //_____________________________________________________________
   // A description of the class starts with the line above, and
   // will take place here !
   //

Note that everything until the first non-commented line is considered as a valid class description block.

III.2 Class index

All classes to be documented will have an entry in the ClassIndex.html, showing their name with a link to their documentation page and a miniature description. This discription for e.g. the class MyClass has to be given in MyClass's header as a comment right after ClassDef(MyClass, n).

III.3 Method documentation

A member function description block starts immediately after '{' and looks like this:

   void TWorld::HelloWorldFunc(string *text)
   {
      // This is an example of description for the
      // TWorld member function
      helloWorld.Print( text );
   }
Like in a class description block, everything until the first non-commented line is considered as a valid member function description block. If the rootrc variable Root.Html.DescriptionStyle is set to Doc++ THtml will also look for method documentation in front of the function implementation. This feature is not recommended; source code making use of this does not comply to the ROOT documentation standards, which means future versions of THtml might not support it anymore.

III.4 Data member documentation

Data members are documented by putting a C++ comment behind their declaration in the header file, e.g.

   int fIAmADataMember; // this is a data member

IV. Documentation directives

NOTE that THtml does not yet support nested directives (i.e. latex inside html etc)!

IV.1 BEGIN_HTML END_HTML: include 'raw' HTML

You can insert pure html code into your documentation comments. During the generation of the documentation, this code will be inserted as is into the html file.

Pure html code must be surrounded by the keywords BEGIN_HTML and END_HTML, where the case is ignored. An example of pure html code is this class description you are reading right now. THtml uses a TDocHtmlDirective object to process this directive.

IV.2 BEGIN_MACRO END_MACRO: include a picture generated by a macro

THtml can create images from scripts. You can either call an external script by surrounding it by "begin_macro"/"end_macro", or include an unnamed macro within these keywords. The macro should return a pointer to an object; this object will then be saved as a GIF file.

Objects deriving from TGObject (GUI elements) will need to run in graphics mode (non-batch). You must specify this as a parameter: "Begin_macro(GUI)...". To create a second tab that displays the source of the macro you can specify the argument "Begin_macro(source)...". Of course you can combine them, e.g. as "Begin_macro(source,gui)...". THtml uses a TDocMacroDirective object to process this directive.

This is an example:

output of MACRO_THtml_1_macro_example_canvas
{
  TCanvas* macro_example_canvas = new TCanvas("macro_example_canvas", "", 150, 150);
  macro_example_canvas->SetBorderSize(0);
  macro_example_canvas->SetFillStyle(1001);
  macro_example_canvas->SetFillColor(kWhite);
  macro_example_canvas->cd();
  TArc* macro_example_arc = new TArc(0.5,0.32,0.11,180,360);
  macro_example_arc->Draw();
  TEllipse* macro_example_ellipsis = new TEllipse(0.42,0.58,0.014,0.014,0,360,0);
  macro_example_ellipsis->SetFillStyle(0);
  macro_example_ellipsis->Draw();
  macro_example_ellipsis = new TEllipse(0.58,0.58,0.014,0.014,0,360,0);
  macro_example_ellipsis->SetFillStyle(0);
  macro_example_ellipsis->Draw();
  macro_example_ellipsis = new TEllipse(0.50,0.48,0.22,0.32,0,360,0);
  macro_example_ellipsis->SetFillStyle(0);
  macro_example_ellipsis->Draw();
  TLine* macro_example_line = new TLine(0.48,0.53,0.52,0.41);
  macro_example_line->Draw();
  return macro_example_canvas;
}

IV.3 BEGIN_LATEX END_LATEX: include a latex picture

You can specify TLatex style text and let THtml convert it into an image by surrounding it by "Begin_Latex", "End_Latex". You can have multiple lines, and e.g. align each line at the '=' sign by passing the argument separator='='. You can also specify how to align these parts; if you want the part left of the separator to be right aligned, and the right part to be left aligned, you could specify align='rl'. THtml uses a TDocLatexDirective object to process the directive. This is an example output with arguments separator='=', align='rl':

#kappa(x)^{2}=sin(x)^{x}

V. Product and module index

THtml::MakeIndex() will generate index files for classes and types, all modules, and the product which you can set by THtml::SetProductName(). THtml will make use of external documentation in the module and product index, either by linking it or by including it. The files for modules are searched based on the source file directory of the module's classes.

A filename starting with "index." will be included in the index page; all other files will be linked. Only files ending on .html or .txt will be taken into account; the text files will first be run through THtml::Convert(). You can see an example here; the part between "Index of HIST classes" and "Jump to" is created by parsing the module's doc directory.

VI. Auxiliary files: style sheet, JavaScript, help page

The documentation pages share a common set of javascript and CSS files. They are generated automatically when running MakeAll(); they can be generated on demand by calling CreateAuxiliaryFiles().

VII. Class Charts

THtml can generate a number of graphical representations for a class, which are displayed as a tabbed set of imaged ontop of the class description. It can show the inheritance, inherited and hidden members, directly and indirectly included files, and library dependencies. These graphs are generated using the Graphviz package. You can install it from http://www.graphviz.org. You can either put it into your $PATH, or tell THtml where to find it by calling SetDotDir().

VIII. Configuration variables

Here is a list of all configuration variables that are known to THtml. You can set them in your .rootrc file, see TEnv.

  Root.Html.OutputDir    (default: htmldoc)
  Root.Html.SourceDir    (default: .:src/:include/)
  Root.Html.Author       (default: // Author:) - start tag for authors
  Root.Html.LastUpdate   (default: // @(#)) - start tag for last update
  Root.Html.Copyright    (default:  * Copyright) - start tag for copyright notice
  Root.Html.Description  (default: //____________________ ) - start tag for class descr
  Root.Html.HomePage     (default: ) - URL to the user defined home page
  Root.Html.Header       (default: ) - location of user defined header
  Root.Html.Footer       (default: ) - location of user defined footer
  Root.Html.Root         (default: ) - URL of Root's class documentation
  Root.Html.SearchEngine (default: ) - link to the search engine
  Root.Html.Search       (defualt: ) - link to search by replacing "%s" with user input
  Root.Html.ViewCVS      (default: ) - URL of ViewCVS base
  Root.Html.XWho         (default: http://consult.cern.ch/xwho/people?) - URL of CERN's xWho
  Root.Html.Charset      (default: ISO-8859-1) - HTML character set

IX. Behind the scene

Internally, THtml is just an API class that sets up the list of known classes, and forwards API invocations to the "work horses". TDocOutput generates the output by letting a TDocParser object parse the sources, which in turn invokes objects deriving from TDocDirective to process directives.

 

Function Members (Methods)

public:
THtml()
virtual~THtml()
voidTObject::AbstractMethod(const char* method) const
voidAddMacroPath(const char* path)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
voidConvert(const char* filename, const char* title, const char* dirname = "", const char* relpath = "../", Int_t includeOutput = kNoOutput, const char* context = "")
virtual voidTObject::Copy(TObject& object) const
Bool_tCopyFileFromEtcDir(const char* filename) const
virtual voidCreateAuxiliaryFiles() const
voidCreateHierarchy()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const TString&GetAuthorTag() const
const TString&GetCharset() const
virtual TClass*GetClass(const char* name) const
const TString&GetClassDocTag() const
const TString&GetCopyrightTag() const
const char*GetCounter() const
const char*GetCounterFormat() const
virtual boolGetDeclFileName(TClass* cl, Bool_t filesys, TString& out_name) const
voidGetDerivedClasses(TClass* cl, map<TClass*,Int_t>& derived) const
static const char*GetDirDelimiter()
const TString&GetDocStyle() const
const TString&GetDotDir() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*GetEtcDir() const
const THtml::TFileDefinition&GetFileDefinition() const
const TString&GetFooter() const
const TString&GetHeader() const
const TString&GetHomepage() const
virtual const char*GetHtmlFileName(const char* classname) const
virtual voidGetHtmlFileName(TClass* classPtr, TString& filename) const
virtual const char*TObject::GetIconName() const
virtual boolGetImplFileName(TClass* cl, Bool_t filesys, TString& out_name) const
const TString&GetInputPath() const
const TString&GetLastUpdateTag() const
TList*GetLibraryDependencies()
const TList*GetListOfClasses() const
const TList*GetListOfModules() const
THtml::TFileSysDB*GetLocalFiles() const
const TString&GetMacroPath() const
TVirtualMutex*GetMakeClassMutex() const
const THtml::TModuleDefinition&GetModuleDefinition() const
const TString&GetModuleDocPath() const
voidGetModuleMacroPath(const TString& module, TString& out_path) const
virtual voidGetModuleNameForClass(TString& module, TClass* cl) const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const TString&GetOutputDir(Bool_t createDir = kTRUE) const
const THtml::TPathDefinition&GetPathDefinition() const
const THtml::PathInfo_t&GetPathInfo() const
const TString&GetProductName() const
const TString&GetSearchEngine() const
const TString&GetSearchStemURL() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
const char*GetURL(const char* lib = 0) const
const TString&GetViewCVS() const
const TString&GetWikiURL() const
const TString&GetXwho() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tHaveDot()
voidHelperDeleted(THtml::THelperBase* who)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsBatch() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tIsNamespace(const TClass* cl)
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
static voidLoadAllLibs()
virtual voidTObject::ls(Option_t* option = "") const
voidMakeAll(Bool_t force = kFALSE, const char* filter = "*", int numthreads = 1)
voidMakeClass(const char* className, Bool_t force = kFALSE)
voidMakeIndex(const char* filter = "*")
voidMakeTree(const char* className, Bool_t force = kFALSE)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidReplaceSpecialChars(ostream&, const char*)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidSetAuthorTag(const char* tag)
voidSetBatch(Bool_t batch = kTRUE)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCharset(const char* charset)
voidSetClassDocTag(const char* tag)
voidSetCopyrightTag(const char* tag)
voidSetCounterFormat(const char* format)
voidSetDeclFileName(TClass* cl, const char* filename)
voidSetDocPath(const char* path)
voidSetDocStyle(const char* style)
voidSetDotDir(const char* dir)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEscape(char = '\\')
voidSetEtcDir(const char* dir)
voidSetFileDefinition(const THtml::TFileDefinition& fd)
voidSetFooter(const char* file)
voidSetFoundDot(Bool_t found = kTRUE)
voidSetHeader(const char* file)
voidSetHomepage(const char* url)
voidSetImplFileName(TClass* cl, const char* filename)
voidSetIncludePath(const char* dir)
voidSetInputDir(const char* dir)
voidSetLastUpdateTag(const char* tag)
voidSetLibURL(const char* lib, const char* url)
voidSetMacroPath(const char* path)
voidSetModuleDefinition(const THtml::TModuleDefinition& md)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOutputDir(const char* dir)
voidSetPathDefinition(const THtml::TPathDefinition& pd)
voidSetProductName(const char* product)
voidSetRootURL(const char* url)
voidSetSearchEngine(const char* url)
voidSetSearchStemURL(const char* url)
voidSetSourceDir(const char* dir)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetViewCVS(const char* url)
voidSetWikiURL(const char* url)
voidSetXwho(const char* xwho)
const char*ShortType(const char* name) const
virtual voidShowMembers(TMemberInspector&)
voidSortListOfModules()
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidCreateJavascript() const
voidCreateListOfClasses(const char* filter)
voidCreateListOfTypes()
virtual voidCreateStyleSheet() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual boolGetDeclImplFileName(TClass* cl, bool filesys, bool decl, TString& out_name) const
TClassDocInfo*GetNextClass()
voidMakeClass(void* cdi, Bool_t force = kFALSE)
static void*MakeClassThreaded(void* info)
voidTObject::MakeZombie()
voidSetLocalFiles() const

Data Members

public:
enum EConvertOutput { kNoOutput
kInterpretedOutput
kCompiledOutput
kForceOutput
kSeparateProcessOutput
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Bool_tfBatchWhether to enable GUI output
TStringfCountercounter string
TStringfCounterFormatcounter printf-like format
THtml::DocEntityInfo_tfDocEntityInfodata for documented entities
THtml::DocSyntax_tfDocSyntaxdoc syntax configuration
THtml::TFileDefinition*fFileDefobject translating classes to file names
TGClient*fGClientgClient, cached and queried through CINT
THtml::LinkInfo_tfLinkInfolink (URL) configuration
THtml::TFileSysDB*fLocalFilesfiles found locally for a given source path
TVirtualMutex*fMakeClassMutexMutex for MakeClassThreaded
THtml::TModuleDefinition*fModuleDefobject translating classes to module names
THtml::OutputStyle_tfOutputStyleoutput style configuration
THtml::TPathDefinition*fPathDefobject translating classes to module names
THtml::PathInfo_tfPathInfopath configuration
TStringfProductNamename of the product to document
Int_tfThreadedClassCountcounter of processed classes for MakeClassThreaded
TIter*fThreadedClassIterfClasses iterator for MakeClassThreaded

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THtml()
 Create a THtml object.
 In case output directory does not exist an error
 will be printed and gHtml stays 0 also zombie bit will be set.
~THtml()
 Default destructor
void AddMacroPath(const char* path)
 Add path to the directories to be searched for macro files
 that are to be executed via the TDocMacroDirective
 ("Begin_Macro"/"End_Macro"); relative to the source file
 that the directive is run on.
void CreateAuxiliaryFiles() const
 copy CSS, javascript file, etc to the output dir
const char* GetEtcDir() const
 Get the directory containing THtml's auxiliary files ($ROOTSYS/etc/html)
TClassDocInfo * GetNextClass()
 Return the next class to be generated for MakeClassThreaded.
const char* GetURL(const char* lib = 0) const
 Get the documentation URL for library lib.
 If lib == 0 or no documentation URL has been set for lib, return the ROOT
 documentation URL. The return value is always != 0.
Bool_t HaveDot()
 Check whether dot is available in $PATH or in the directory set
 by SetDotPath()
void HelperDeleted(THtml::THelperBase* who)
 Inform the THtml object that one of its helper objects was deleted.
 Called by THtml::HelperBase::~HelperBase().
void Convert(const char* filename, const char* title, const char* dirname = "", const char* relpath = "../", Int_t includeOutput = kNoOutput, const char* context = "")
 It converts a single text file to HTML


 Input: filename - name of the file to convert
        title    - title which will be placed at the top of the HTML file
        dirname  - optional parameter, if it's not specified, output will
                   be placed in htmldoc/examples directory.
        relpath  - optional parameter pointing to the THtml generated doc
                   on the server, relative to the current page.
        includeOutput - if != kNoOutput, run the script passed as filename and
                   store all created canvases in PNG files that are
                   shown next to the converted source. Bitwise-ORing with
                   kForceOutput re-runs the script even if output PNGs exist
                   that are newer than the script. If kCompiledOutput is
                   passed, the script is run through ACLiC (.x filename+)
        context  - line shown verbatim at the top of the page; e.g. for links.
                   If context is non-empty it is expected to also print the
                   title.

  NOTE: Output file name is the same as filename, but with extension .html

void GetModuleNameForClass(TString& module, TClass* cl) const
 Return the module name for a given class.
 Use the cached information from fDocEntityInfo.fClasses.
void CreateListOfClasses(const char* filter)
 Create the list of all known classes
void CreateListOfTypes()
 Create index of all data types and a page for each typedef-to-class
Bool_t CopyFileFromEtcDir(const char* filename) const
 Copy a file from $ROOTSYS/etc/html into GetOutputDir()
void CreateHierarchy()
 Create the inheritance hierarchy diagram for all classes
void CreateJavascript() const
 Write the default ROOT style sheet.
void CreateStyleSheet() const
 Write the default ROOT style sheet.
void GetDerivedClasses(TClass* cl, map<TClass*,Int_t>& derived) const
 fill derived with all classes inheriting from cl and their inheritance
 distance to cl
void GetHtmlFileName(TClass* classPtr, TString& filename) const
 Return real HTML filename


  Input: classPtr - pointer to a class
         filename - string containing a full name
         of the corresponding HTML file after the function returns.

const char* GetHtmlFileName(const char* classname) const
 Get the html file name for a class named classname.
 Returns 0 if the class is not documented.
TClass * GetClass(const char* name) const
Return pointer to class with name*-*-*-*-*-*-*-*-
*-*      =================================
bool GetDeclFileName(TClass* cl, Bool_t filesys, TString& out_name) const
 Return declaration file name; return the full path if filesys is true.
bool GetImplFileName(TClass* cl, Bool_t filesys, TString& out_name) const
 Return implementation file name
bool GetDeclImplFileName(TClass* cl, bool filesys, bool decl, TString& out_name) const
 Combined implementation for GetDeclFileName(), GetImplFileName():
 Return declaration / implementation file name (depending on decl);
 return the full path if filesys is true.
const TString& GetOutputDir(Bool_t createDir = kTRUE) const
 Return the output directory as set by SetOutputDir().
 Create it if it doesn't exist and if createDir is kTRUE.
Bool_t IsNamespace(const TClass* cl)
 Check whether cl is a namespace
void LoadAllLibs()
 Load all libraries known to ROOT via the rootmap system.
void MakeAll(Bool_t force = kFALSE, const char* filter = "*", int numthreads = 1)
 Produce documentation for all the classes specified in the filter (by default "*")
 To process all classes having a name starting with XX, do:
        html.MakeAll(kFALSE,"XX*");
 If force=kFALSE (default), only the classes that have been modified since
 the previous call to this function will be generated.
 If force=kTRUE, all classes passing the filter will be processed.
 If numthreads is != -1, use numthreads threads, else decide automatically
 based on the number of CPUs.
void MakeClass(const char* className, Bool_t force = kFALSE)
 Make HTML files for a single class


 Input: className - name of the class to process

void MakeClass(void* cdi, Bool_t force = kFALSE)
 Make HTML files for a single class


 Input: cdi - doc info for class to process

void* MakeClassThreaded(void* info)
 Entry point of worker threads for multi-threaded MakeAll().
 info points to an (internal) THtmlThreadInfo object containing the current
 THtml object, and whether "force" was passed to MakeAll().
 The thread will poll GetNextClass() until no further class is available.
void MakeIndex(const char* filter = "*")
 Create the index files for the product, modules, all types, etc.
 By default all classes are indexed (if filter="*");
 to generate an index for all classes starting with "XX", do
    html.MakeIndex("XX*");
void MakeTree(const char* className, Bool_t force = kFALSE)
 Make an inheritance tree


 Input: className - name of the class to process

void SetFoundDot(Bool_t found = kTRUE)
 Set whether "dot" (a GraphViz utility) is available
void SetLocalFiles() const
 Fill the files available in the file system below fPathInfo.fInputPath
void SetModuleDefinition(const THtml::TModuleDefinition& md)
 Set the module defining object to be used; can also be a user derived
 object (a la traits).
void SetFileDefinition(const THtml::TFileDefinition& fd)
 Set the file defining object to be used; can also be a user derived
 object (a la traits).
void SetPathDefinition(const THtml::TPathDefinition& pd)
 Set the path defining object to be used; can also be a user derived
 object (a la traits).
void SetInputDir(const char* dir)
 Set the directory containing the source files.
 The source file for a class MyClass will be searched
 by prepending dir to the value of
 MyClass::Class()->GetImplFileName() - which can contain
 directory information!
 Also resets the class structure, in case new files can
 be found after this call.
void SetOutputDir(const char* dir)
 Set the directory where the HTML pages shuold be written to.
 If the directory does not exist it will be created when needed.
void SetDeclFileName(TClass* cl, const char* filename)
 Explicitly set a decl file name for TClass cl.
void SetImplFileName(TClass* cl, const char* filename)
 Explicitly set a impl file name for TClass cl.
const char* ShortType(const char* name) const
 Get short type name, i.e. with default templates removed.
bool GetMacroPath(const TString& module, TString& out_dir)
TString fInputPath; // directories to look for classes; prepended to Decl/ ImplFileName()
void SetProductName(const char* product)
{ fProductName = product; }
void SetSourceDir(const char* dir)
{ SetInputDir(dir); }
void SetIncludePath(const char* dir)
{ fPathInfo.fIncludePath = dir; }
void SetEtcDir(const char* dir)
{ fPathInfo.fEtcDir = dir; }
void SetDocPath(const char* path)
{ fPathInfo.fDocPath = path; }
void SetDotDir(const char* dir)
{ fPathInfo.fDotDir = dir; fPathInfo.fFoundDot = PathInfo_t::kDotUnknown; }
void SetRootURL(const char* url)
{ fLinkInfo.fROOTURL = url; }
void SetLibURL(const char* lib, const char* url)
{ fLinkInfo.fLibURLs[lib] = url; }
void SetXwho(const char* xwho)
{ fLinkInfo.fXwho = xwho; }
void SetMacroPath(const char* path)
{fPathInfo.fMacroPath = path;}
void SetCounterFormat(const char* format)
{ fCounterFormat = format; }
void SetClassDocTag(const char* tag)
{ fDocSyntax.fClassDocTag = tag; }
void SetAuthorTag(const char* tag)
{ fDocSyntax.fAuthorTag = tag; }
void SetLastUpdateTag(const char* tag)
{ fDocSyntax.fLastUpdateTag = tag; }
void SetCopyrightTag(const char* tag)
{ fDocSyntax.fCopyrightTag = tag; }
void SetHeader(const char* file)
{ fOutputStyle.fHeader = file; }
void SetFooter(const char* file)
{ fOutputStyle.fFooter = file; }
void SetHomepage(const char* url)
{ fLinkInfo.fHomepage = url; }
void SetSearchStemURL(const char* url)
{ fLinkInfo.fSearchStemURL = url; }
void SetSearchEngine(const char* url)
{ fLinkInfo.fSearchEngine = url; }
void SetViewCVS(const char* url)
{ fLinkInfo.fViewCVS = url; }
void SetWikiURL(const char* url)
{ fLinkInfo.fWikiURL = url; }
void SetCharset(const char* charset)
{ fOutputStyle.fCharset = charset; }
void SetDocStyle(const char* style)
{ fDocSyntax.fDocStyle = style; }
const TModuleDefinition& GetModuleDefinition() const
 Configuration getters
const TFileDefinition& GetFileDefinition() const
const TPathDefinition& GetPathDefinition() const
const TString& GetProductName() const
{ return fProductName; }
const TString& GetInputPath() const
{ return fPathInfo.fInputPath; }
const TString& GetModuleDocPath() const
{ return fPathInfo.fDocPath; }
const TString& GetDotDir() const
{ return fPathInfo.fDotDir; }
const TString& GetXwho() const
{ return fLinkInfo.fXwho; }
const char* GetCounterFormat() const
{ return fCounterFormat; }
const TString& GetClassDocTag() const
{ return fDocSyntax.fClassDocTag; }
const TString& GetAuthorTag() const
{ return fDocSyntax.fAuthorTag; }
const TString& GetLastUpdateTag() const
{ return fDocSyntax.fLastUpdateTag; }
const TString& GetCopyrightTag() const
{ return fDocSyntax.fCopyrightTag; }
const TString& GetHeader() const
{ return fOutputStyle.fHeader; }
const TString& GetFooter() const
{ return fOutputStyle.fFooter; }
const TString& GetHomepage() const
{ return fLinkInfo.fHomepage; }
const TString& GetSearchStemURL() const
{ return fLinkInfo.fSearchStemURL; }
const TString& GetSearchEngine() const
{ return fLinkInfo.fSearchEngine; }
const TString& GetViewCVS() const
{ return fLinkInfo.fViewCVS; }
const TString& GetWikiURL() const
{ return fLinkInfo.fWikiURL; }
const TString& GetCharset() const
{ return fOutputStyle.fCharset; }
const TString& GetDocStyle() const
{ return fDocSyntax.fDocStyle; }
const char* GetCounter() const
{ return fCounter; }
void GetModuleMacroPath(const TString& module, TString& out_path) const
{ GetPathDefinition().GetMacroPath(module, out_path); }
const char* GetDirDelimiter()
 ";" on windows, ":" everywhere else
TList* GetLibraryDependencies()
{ return &fDocEntityInfo.fLibDeps; }
void SortListOfModules()
{ fDocEntityInfo.fModules.Sort(); }
const TList* GetListOfModules() const
{ return &fDocEntityInfo.fModules; }
const TList* GetListOfClasses() const
{ return &fDocEntityInfo.fClasses; }
TFileSysDB* GetLocalFiles() const
TVirtualMutex* GetMakeClassMutex() const
{ return fMakeClassMutex; }
const PathInfo_t& GetPathInfo() const
{ return fPathInfo; }
void SetBatch(Bool_t batch = kTRUE)
{ fBatch = batch; }
Bool_t IsBatch() const
 unused
{ return fBatch; }
void ReplaceSpecialChars(ostream& , const char* )
void SetEscape(char = '\\')
{}