library: libHtml
#include "THtml.h"

THtml


class description - header file - source file
viewCVS header - viewCVS source

class THtml: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
THtml()
virtual~THtml()
voidTObject::AbstractMethod(const char* method) const
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 = "../")
virtual voidTObject::Copy(TObject& object) const
voidCreateJavascript()
voidCreateStyleSheet()
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
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 char*GetDeclFileName(TClass* cl) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
const char*GetImplFileName(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 char*GetOutputDir()
const char*GetSourceDir()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
const char*GetXwho() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
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() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidMakeAll(Bool_t force = kFALSE, const char* filter = "*")
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()
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)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDeclFileName(TClass* cl, const char* filename)
voidSetDotDir(const char* dir)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidSetEscape(char esc = \\)
voidSetImplFileName(TClass* cl, const char* filename)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOutputDir(const char* dir)
voidSetSourceDir(const char* dir)
voidSetSourcePrefix(const char* prefix)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetXwho(const char* xwho)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
virtual voidWriteHtmlFooter(ofstream& out, const char* dir = "", const char* lastUpdate = "", const char* author = "", const char* copyright = "")
virtual voidWriteHtmlHeader(ofstream& out, const char* title, const char* dir = "", TClass* cls = 0)
protected:
voidAddClassDataMembersRecursive(TBaseClass* bc, TList* datamembers)
voidAddClassMethodsRecursive(TBaseClass* bc, TList* methodNames)
voidAnchorFromLine(TString& anchor)
virtual voidBeautifyLine(ostream& srcOut, const char* relpath = "../")
voidClass2Html(Bool_t force = kFALSE)
voidClassDescription(ofstream& out)
Bool_tClassDotCharts(ofstream& out)
voidClassHtmlTree(ofstream& out, TClass* classPtr, THtml::ETraverse dir = kBoth, int depth = 1)
voidClassTree(TVirtualPad* canvas, TClass* classPtr, Bool_t force = kFALSE)
Bool_tCopyHtmlFile(const char* sourceName, const char* destName = "")
Bool_tCreateDotClassChartIncl(const char* filename)
Bool_tCreateDotClassChartInh(const char* filename)
Bool_tCreateDotClassChartInhMem(const char* filename)
Bool_tCreateDotClassChartLib(const char* filename)
voidCreateHierarchy()
Bool_tCreateHierarchyDot()
voidCreateIndex()
voidCreateIndexByTopic()
voidCreateListOfClasses(const char* filter)
voidCreateListOfTypes()
voidCreateSourceOutputStream(ofstream& out, const char* extension, TString& filename)
voidDescendHierarchy(ofstream& out, TClass* basePtr, Int_t maxLines = 0, Int_t depth = 1)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidExpandKeywords(TString& text)
voidExpandKeywords(ostream& out, const char* line)
voidExpandPpLine(ostream& out)
Bool_tExtractComments(const TString& lineExpandedStripped, Bool_t& foundClassDescription, const char* classDescrTag, TString& comment)
TClass*GetClass(const char* name)
const char*GetFileName(const char* filename)
voidGetHtmlFileName(TClass* classPtr, TString& filename)
virtual voidGetModuleName(TString& module, const char* filename) const
voidGetSourceFileName(TString& filename)
Bool_tHaveDot()
Bool_tIsModified(TClass* classPtr, const Int_t type)
static Bool_tIsName(UChar_t c)
static Bool_tIsWord(UChar_t c)
TMethod*LocateMethodInCurrentLine(Ssiz_t& posMethodName, TString& ret, TString& name, TString& params, ostream& srcOut, TString& anchor, ifstream& sourcefile, Bool_t allowPureVirtual)
voidLocateMethods(ofstream& out, const char* filename, Bool_t lookForSourceInfo = kTRUE, Bool_t useDocxxStyle = kFALSE, Bool_t lookForClassDescr = kTRUE, Bool_t allowPureVirtual = kFALSE, const char* methodPattern = "0", const char* sourceExt = "0")
voidLocateMethodsInHeaderClassDecl(ofstream& out)
voidLocateMethodsInHeaderInline(ofstream& out)
voidLocateMethodsInSource(ofstream& out)
voidMakeClass(void* cdi, Bool_t force = kFALSE)
voidTObject::MakeZombie()
voidNameSpace2FileName(TString& name)
voidReplaceSpecialChars(ostream& out, const char c)
voidReplaceSpecialChars(ostream& out, const char* string)
voidReplaceSpecialChars(TString& text, Ssiz_t& pos)
Bool_tRunDot(const char* filename, ostream* outMap = 0)
voidSortNames(const char** strings, Int_t num, Bool_t type = 0)
char*StrDup(const char* s1, Int_t n = 1)
static Bool_tStrip(TString& s)
virtual voidWriteMethod(ostream& out, TString& ret, TString& name, TString& params, const char* file, TString& anchor, TString& comment, TString& codeOneLiner)

Data Members

public:
enum ETraverse { kUp
kDown
kBoth
};
enum EParseContext { kCode
kCComment
kBeginEndHtml
kBeginEndHtmlInCComment
kString
kNumParseContexts
};
enum EDocContext { kIgnore
kDocFunc
kDocClass
kNumDocContexts
};
enum ESourceInfo { kInfoLastUpdate
kInfoAuthor
kInfoCopyright
kNumSourceInfos
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringfXwhoURL for name lookup
TStringfSourcePrefixprefix to relative source path
TStringfSourceDirsource path
TStringfOutputDiroutput directory
TStringfDotDirdirectory of GraphViz's dot binary
Int_tfFoundDotwhether dot is accessible (-1 dunno, 1 yes, 0 no)
TStringfLinecurrent line
UInt_tfLineNocurrent line number
TStringfLineExpandedcurrent line with links
TStringfLineStrippedcurrent line without surrounding spaces
TClass*fCurrentClasscurrent class context of sources being parsed
TStringfCurrentFilecurrent source / header file name
map<std::string,Int_t>fMethodNamescurrent class's method names
THtml::EDocContextfDocContextcurrent context of parsed sources for documenting
list<EParseContext>fParseContextcurrent context of parsed sources
set<UInt_t>fExtraLinesWithAnchorlines that need an additional anchor
TStringfSourceInfo[3]author, last changed, ...
TStringfCountercounter string
Bool_tfEscFlagstate flag to mark the next character must be written "as is"
charfEscchar to mark the next character must be written "as is"
Int_tfHierarchyLinescounter for no. lines in hierarchy
TStringfClassFilterfilter used for buidling known classes
THashListfClassesknown classes
THashListfModulesknown modules
map<TClass*,std::string>fGuessedDeclFileNamesnames of additional decl file names
map<TClass*,std::string>fGuessedImplFileNamesnames of additional impl file names
static set<std::string>fgKeywordsC++ keywords

Class Description

 

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. 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, ViewCVS
    8. HTML Charset
  2. Documentation syntax
    1. Class description
    2. Class index
    3. Method documentation
    4. Data member documentation
    5. BEGIN_HTML END_HTML: include 'raw' HTML
  3. Style sheet, JavaScript
  4. Class Charts
  5. Usage
  6. Configuration variables

I. Configuration

I.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.

Example:

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

I.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

I.3 Linking other documentation

When trying to document a class, THtml searches for a source file in the directories set via SetSourceDir(). 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.

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.

I.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. See the section on documentation syntax for further details.

Example:

  Root.Html.Description:       //____________________

I.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.

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

Example (with defaults given):

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

I.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. 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.

I.7 Links to searches, home page, ViewCVS

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), and a ViewCVS base URL Root.Html.ViewCVS. All 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%3Aroot.cern.ch%2Froot%2Fhtml

I.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

II. Documentation syntax

II.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.

II.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).

II.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.

II.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

II.5 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. Examples of pure html code are given e.g. in TDataMember and TMinuit. The following trick can be used to hide the surrounding /* */ from the documentation:

   // start doc
   // BEGIN_HTML <!--
   /* -->
   We can now write HTML code, like <a href="something">something</a>
   <!-- */
   // --> END_HTML
   // end doc

III. Style sheet, JavaScript

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 CreateJavascript() and CreateStyleSheet(), respectively.

IV. 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().

V. 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
    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" )

VI. 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

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 AddClassMethodsRecursive(TBaseClass* bc, TList methodNames[3])
 Add accessible (i.e. non-private) methods of base class bc 
 and its base classes' methods to methodNames.
 If bc==0, we add fCurrentClass's methods (and also private functions).
void AddClassDataMembersRecursive(TBaseClass* bc, TList datamembers[6])
 Add data members of fCurrentClass and of bc to datamembers, recursively.
 Real data members are in idx 0..2 (public, protected, private access),
 enum constants in idx 3..5.
void Class2Html(Bool_t force)
 Create HTML files for a single class.

void CreateSourceOutputStream(std::ofstream& out, const char* extension, TString& sourceHtmlFileName)
 Open a Class.cxx.html file, where Class is defined by classPtr, and .cxx.html by extension
 It's created in fOutputDir/src. If successful, the HTML header is written to out.
void AnchorFromLine(TString& anchor)
 Create an anchor from the given line, by hashing it and
 convertig the hash into a custom base64 string.
void BeautifyLine(std::ostream &sOut, const char* relpath /*="../"*/)
 Put colors around tags, create links, escape characters.
 In short: make a nice HTML page out of C++ code, and put it into srcOut.
 Create an anchor at the beginning of the line, and put its name into
 anchor, if set.
TMethod* LocateMethodInCurrentLine(Ssiz_t &posMethodName, TString& ret, TString& name, TString& params, 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, and its arguments. If the end of arguments is not found in the 
 current line, get a new line from sourceFile, beautify it to srcOut, creating
 an anchor as necessary. When this function returns, posMethodName points to the
 end of the function declaration, i.e. right after the arguments' closing bracket.
 If posMethodName == kNPOS, we look for the first matching method in fMethodNames.
void WriteMethod(std::ostream & out, TString& ret, TString& name, TString& params, const char* filename, TString& anchor, TString& comment, TString& codeOneLiner)
 Write method name with return type ret and parameters param to out.
 Build a link using file and anchor. Cooment it with comment, and
 show the code codeOneLiner (set if the func consists of only one line
 of code, immediately surrounded by "{","}"). Also updates fMethodNames's
 count of method names.
Bool_t ExtractComments(const TString &lineExpandedStripped, Bool_t &foundClassDescription, const char* classDescrTag, TString& comment)
 Extracts comments from the current line into comment, 
 updating whether a class description was found (foundClassDescription).
 Returns kTRUE if comment found.
void LocateMethods(std::ofstream & out, const char* filename, Bool_t lookForSourceInfo /*= kTRUE*/, Bool_t useDocxxStyle /*= kFALSE*/, Bool_t lookForClassDescr /*= kTRUE*/, Bool_t allowPureVirtual /*= kFALSE*/, const char* methodPattern /*= 0*/, const char* sourceExt /*= 0 */)
 Collect methods from the source or header file called filename.
 It generates a beautified version of the source file on the fly;
 the output file is given by the fCurrentClass's name, and sourceExt.
 Documentation is extracted to out.
   lookForSourceInfo: if set, author, lastUpdate, and copyright are 
     extracted (i.e. the values contained in fSourceInfo)
   useDocxxStyle: if set, documentation can be in front of the method
     name, not only inside the method. Useful doc Doc++/Doxygen style,
     and inline methods.
   lookForClassDescr: if set, the first line matching the class description 
     rules is assumed to be the class description for fCurrentClass; the 
     description is written to out.
   methodPattern: if set, methods have to be prepended by this tag. Usually
     the class name + "::". In header files, looking for in-place function
     definitions, this should be 0. In that case, only functions in 
     fMethodNames are searched for.
void LocateMethodsInSource(ofstream & out)
 Given fCurrentClass, look for methods in its source file, 
 and extract documentation to out, while beautifying the source 
 file in parallel.
void LocateMethodsInHeaderInline(ofstream & out)
 Given fCurrentClass, look for methods in its header file, 
 and extract documentation to out.
void LocateMethodsInHeaderClassDecl(ofstream & out)
 Given fCurrentClass, look for methods in its header file's
 class declaration block, and extract documentation to out,
 while beautifying the header file in parallel.
void ClassDescription(ofstream & out)
 This function builds the description of the class


 Input: out      - output file stream

Bool_t HaveDot()
 Check whether dot is available in $PATH or in the directory set 
 by SetDotPath()
Bool_t RunDot(const char* filename, std::ostream* outMap /* =0 */)
 Run filename".dot", creating filename".gif", and - if outMap is !=0,
 filename".map", which gets then included literally into outMap.
Bool_t CreateDotClassChartInh(const char* filename)
 Build the class tree for one class in GraphViz/Dot format


 Input: filename - output dot file incl. path
Bool_t CreateDotClassChartInhMem(const char* filename)
 Build the class tree of inherited members for one class in GraphViz/Dot format

 Input: filename - output dot file incl. path
Bool_t CreateDotClassChartIncl(const char* filename)
 Build the include dependency graph for one class in 
 GraphViz/Dot format

 Input: filename - output dot file incl. path
Bool_t CreateDotClassChartLib(const char* filename)
 Build the library dependency graph for one class in 
 GraphViz/Dot format

 Input: filename - output dot file incl. path
Bool_t ClassDotCharts(ofstream & out)
 This function builds the class charts for one class in GraphViz/Dot format,
 i.e. the inheritance diagram, the include dependencies, and the library
 dependency.

 Input: out      - output file stream
void ClassHtmlTree(ofstream & out, TClass * classPtr, ETraverse dir, int depth)
 This function builds the class tree for one class in HTML
 (inherited and succeeding classes, called recursively)


 Input: out      - output file stream
        classPtr - pointer to the class
        dir      - direction to traverse tree: up, down or both

void ClassTree(TVirtualPad * psCanvas, TClass * classPtr, Bool_t force)
 It makes a graphical class tree


 Input: psCanvas - pointer to the current canvas
        classPtr - pointer to the class

void Convert(const char *filename, const char *title, const char *dirname /*= ""*/, const char *relpath /*= "../"*/)
 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.

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

Bool_t CopyHtmlFile(const char *sourceName, const char *destName)
 Copy file to HTML directory


  Input: sourceName - source file name
         destName   - optional destination name, if not
                      specified it would be the same
                      as the source file name

 Output: TRUE if file is successfully copied, or
         FALSE if it's not


   NOTE: The destination directory is always fOutputDir

void CreateIndex()
 Create an index


 Input: classNames      - pointer to an array of class names
        numberOfClasses - number of elements

void CreateIndexByTopic()
 It creates several index files


 Input: fileNames     - pointer to an array of file names
        numberOfNames - number of elements in the fileNames array
        maxLen        - maximum length of a single name

Bool_t CreateHierarchyDot()
 Create a hierarchical class list
 The algorithm descends from the base classes and branches into
 all derived classes. Mixing classes are displayed several times.


void CreateHierarchy()
 Create a hierarchical class list
 The algorithm descends from the base classes and branches into
 all derived classes. Mixing classes are displayed several times.


void DescendHierarchy(ofstream & out, TClass* basePtr, Int_t maxLines, Int_t depth)
 Descend hierarchy recursively
 loop over all classes and look for classes with base class basePtr
void GetModuleName(TString& modulename, const char* filename)
 Returns the module a class with filename belongs to.
 For ROOT, this is determined by MODULE/src/*.cxx or MODULE/inc/*.h. 
 Math/GenVector (MATHCORE) and Math/Matrix (SMATRIX) get special
 treatment.
 All classes not fitting into this layout are assigned to the
 module USER.
void CreateListOfClasses(const char* filter)
 Create the list of all known classes
void CreateListOfTypes()
 Create list of all data types
void CreateJavascript()
 Write the default ROOT style sheet.
void CreateStyleSheet()
 Write the default ROOT style sheet.
void ExpandKeywords(ostream & out, const char *text)
 Expand keywords in text, writing to out.
void ExpandKeywords(TString& keyword)
 Find keywords in keyword and create URLs around them. Escape characters with a 
 special meaning for HTML. Protect "Begin_Html"/"End_Html" pairs, and set the
 parsing context. Evaluate sequences like a::b->c.
void ExpandPpLine(ostream & out)
 Expand preprocessor statements


 Input: out  - output file stream

  NOTE: Looks for the #include statements and
        creates link to the corresponding file
        if such file exists

const char * GetFileName(const char *filename)
 It discards any directory information inside filename


  Input: filename - pointer to the file name

 Output: pointer to the string containing just a file name
         without any other directory information, i.e.
         '/usr/root/test.dat' will return 'test.dat'

void GetSourceFileName(TString& filename)
 Find the source file. If filename contains a path it will be used
 together with the possible source prefix. If not found we try
 old algorithm, by stripping off the path and trying to find it in the
 specified source search path.
void GetHtmlFileName(TClass * classPtr, TString& filename)
 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. 

TClass * GetClass(const char *name1)
*-*-*-*-*Return pointer to class with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      =================================
const char* GetDeclFileName(TClass * cl)
 Return declaration file name
const char* GetImplFileName(TClass * cl)
 Return implementation file name
Bool_t IsModified(TClass * classPtr, const Int_t type)
 Check if file is modified


  Input: classPtr - pointer to the class
         type     - file type to compare with
                    values: kSource, kInclude, kTree

 Output: TRUE     - if file is modified since last time
         FALSE    - if file is up to date

Bool_t IsName(UChar_t c)
 Check if c is a valid C++ name character


  Input: c - a single character

 Output: TRUE if c is a valid C++ name character
         and FALSE if it's not.

   NOTE: Valid name characters are [a..zA..Z0..9_~],

Bool_t IsWord(UChar_t c)
 Check if c is a valid first character for C++ name


  Input: c - a single character

 Output: TRUE if c is a valid first character for C++ name,
         and FALSE if it's not.

   NOTE: Valid first characters are [a..zA..Z_~]

void MakeAll(Bool_t force, const char *filter)
 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.

void MakeClass(const char *className, Bool_t force)
 Make HTML files for a single class


 Input: className - name of the class to process

void MakeClass(void *cdi_void, Bool_t force)
 Make HTML files for a single class


 Input: cdi - doc info for class to process

void MakeIndex(const char *filter)
 It makes an index files
 by default makes an index of all classes (if filter="*")
 To generate an index for all classes starting with "XX", do
    html.MakeIndex("XX*");
void MakeTree(const char *className, Bool_t force)
 Make an inheritance tree


 Input: className - name of the class to process

void ReplaceSpecialChars(ostream & out, const char c)
 Replace ampersand, less-than and greater-than character, writing to out.


 Input: out - output file stream
        c   - single character

void ReplaceSpecialChars(TString& text, Ssiz_t &pos)
 Replace ampersand, less-than and greater-than character


 Input: text - text where replacement will happen,
        pos  - index of char to be replaced; will point to next char to be 
               replaced when function returns

void ReplaceSpecialChars(ostream & out, const char *string)
 Replace ampersand, less-than and greater-than characters, writing to out


 Input: out    - output file stream
        string - pointer to an array of characters

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.
void SortNames(const char **strings, Int_t num, Bool_t type)
 Sort strings


 Input: strings - pointer to an array of strings
        type    - sort type
                  values : kCaseInsensitive, kCaseSensitive
                  default: kCaseInsensitive

char * StrDup(const char *s1, Int_t n)
 Returns a pointer to a new string which is a duplicate
 of the string to which 's1' points.  The space for the
 new string is obtained using the 'new' operator. The new
 string has the length of 'strlen(s1) + n'.
Bool_t Strip(TString& str)
 strips ' ' and tabs from both sides of str
void WriteHtmlHeader(ofstream & out, const char *title, const char* dir /*=""*/, TClass *cls/*=0*/)
 Write HTML header


 Input: out   - output file stream
        title - title for the HTML page
        cls   - current class
        dir   - relative directory to reach the top 
                ("" for html doc, "../" for src/*cxx.html etc)

 evaluates the Root.Html.Header setting:
 * if not set, the standard header is written. (ROOT)
 * if set, and ends with a "+", the standard header is written and this file 
   included afterwards. (ROOT, USER)
 * if set but doesn't end on "+" the file specified will be written instead 
   of the standard header (USER)

 Any occurrence of "%TITLE%" (without the quotation marks) in the user 
 provided header file will be replaced by the value of this method's
 parameter "title" before written to the output file. %CLASS% is replaced by
 the class name ("" if not a class), %INCFILE% by the header file name as
 given by TClass::GetDeclFileName() and %SRCFILE% by the source file name as
 given by TClass::GetImplFileName() (both "" if not a class).
void WriteHtmlFooter(ofstream & out, const char *dir, const char *lastUpdate, const char *author, const char *copyright)
 Write HTML footer


 Input: out        - output file stream
        dir        - usually equal to "" or "../", depends of
                     current file directory position, i.e. if
                     file is in the fOutputDir, then dir will be ""
        lastUpdate - last update string
        author     - author's name
        copyright  - copyright note

 Allows optional user provided footer to be written. Root.Html.Footer holds 
 the file name for this footer. For details see THtml::WriteHtmlHeader (here,
 the "+" means the user's footer is written in front of Root's!) Occurences 
 of %AUTHOR%, %UPDATE%, and %COPYRIGHT% in the user's file are replaced by 
 their corresponding values (author, lastUpdate, and copyright) before 
 written to out.
void NameSpace2FileName(TString& name)
 Replace "::" in name by "__"
 Replace "<", ">", " ", ",", "~", "=" in name by "_"
const char * GetSourceDir()
{ return fSourceDir; }
const char * GetOutputDir()
{ return fOutputDir; }
const char * GetXwho()
{ return fXwho.Data(); }
void SetEscape(char esc='\\')
{ fEsc = esc; }
void SetSourcePrefix(const char *prefix)
{ fSourcePrefix = prefix; }
void SetSourceDir(const char *dir)
{ fSourceDir = dir; }
void SetOutputDir(const char *dir)
{ fOutputDir = dir; }
void SetDotDir(const char* dir)
{ fDotDir = dir; fFoundDot = -1; }
void SetXwho(const char *xwho)
{ fXwho = xwho; }

Author: Nenad Buncic (18/10/95), Axel Naumann (09/28/01)
Last update: root/html:$Name: $:$Id: THtml.cxx,v 1.125 2006/12/05 17:17:37 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.