ROOT  6.06/09
Reference Guide
TClassDocOutput.h
Go to the documentation of this file.
1 // @(#)root/html:$Id$
2 // Author: Axel Naumann 2007-01-09
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TClassDocOutput
13 #define ROOT_TClassDocOutput
14 
15 #ifndef ROOT_TDocOutput
16 #include "TDocOutput.h"
17 #endif
18 
19 class TDocParser;
20 class TDocMethodWrapper;
21 
22 class TClassDocOutput: public TDocOutput {
23 protected:
24  enum ETraverse {
25  kUp, kDown, kBoth // direction to traverse class tree in ClassHtmlTree()
26  };
27 
28  Int_t fHierarchyLines; // counter for no. lines in hierarchy
29  TClass* fCurrentClass; // class to generate output for
30  TList* fCurrentClassesTypedefs; // typedefs to the current class
31  TDocParser* fParser; // parser we use
32 
33  void ClassHtmlTree(std::ostream &out, TClass *classPtr, ETraverse dir=kBoth, int depth=1);
34  void ClassTree(TVirtualPad *canvas, Bool_t force=kFALSE);
35 
40 
42  void CreateSourceOutputStream(std::ostream& out, const char* extension, TString& filename);
43  void DescendHierarchy(std::ostream &out, TClass* basePtr, Int_t maxLines=0, Int_t depth=1);
44 
45  virtual void ListFunctions(std::ostream& classFile);
46  virtual void ListDataMembers(std::ostream& classFile);
47 
48  virtual void WriteClassDocHeader(std::ostream& classFile);
49  virtual void WriteMethod(std::ostream & out, TString& ret,
50  TString& name, TString& params,
51  const char* file, TString& anchor,
52  TString& comment, TString& codeOneLiner,
53  TDocMethodWrapper* guessedMethod);
54  virtual void WriteClassDescription(std::ostream& out, const TString& description);
55 
56 public:
57  TClassDocOutput(THtml& html, TClass* cl, TList* typedefs);
58  virtual ~TClassDocOutput();
59 
60  void Class2Html(Bool_t force=kFALSE);
61  Bool_t ClassDotCharts(std::ostream & out);
62  void CreateClassHierarchy(std::ostream& out, const char* docFileName);
63 
64  void MakeTree(Bool_t force = kFALSE);
65 
66  friend class TDocParser;
67 
68  ClassDef(TClassDocOutput, 0); // generates documentation web pages for a class
69 };
70 
71 #endif // ROOT_TClassDocOutput
TClassDocOutput(THtml &html, TClass *cl, TList *typedefs)
Create an object given the invoking THtml object, and the TClass object that we will generate output ...
virtual ~TClassDocOutput()
Destructor, deletes fParser.
void CreateClassHierarchy(std::ostream &out, const char *docFileName)
Create the hierarchical class list part for the current class's base classes.
static const std::string comment("comment")
TDocParser * fParser
void ClassTree(TVirtualPad *canvas, Bool_t force=kFALSE)
It makes a graphical class tree.
static const char * filename()
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
void MakeTree(Bool_t force=kFALSE)
Create an output file with a graphical representation of the class inheritance.
Bool_t CreateHierarchyDot()
Create a hierarchical class list The algorithm descends from the base classes and branches into all d...
Bool_t CreateDotClassChartInh(const char *filename)
Build the class tree for one class in GraphViz/Dot format.
ClassDef(TClassDocOutput, 0)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
char * out
Definition: TBase64.cxx:29
A doubly linked list.
Definition: TList.h:47
TClass * fCurrentClass
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...
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
TList * fCurrentClassesTypedefs
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...
const char * extension
Definition: civetweb.c:2467
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...
void Class2Html(Bool_t force=kFALSE)
Create HTML files for a single class.
virtual void ListDataMembers(std::ostream &classFile)
Write the list of data members and enums.
#define name(a, b)
Definition: linkTestLib0.cpp:5
virtual void WriteClassDocHeader(std::ostream &classFile)
Write out the introduction of a class description (shortcuts and links)
Bool_t CreateDotClassChartInhMem(const char *filename)
Build the class tree of inherited members for one class in GraphViz/Dot format.
virtual void WriteMethod(std::ostream &out, TString &ret, TString &name, TString &params, 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.
virtual void ListFunctions(std::ostream &classFile)
Write the list of functions.
Bool_t CreateDotClassChartIncl(const char *filename)
Build the include dependency graph for one class in GraphViz/Dot format.
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.
Definition: THtml.h:44