Logo ROOT  
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 #include "TDocOutput.h"
16 
17 class TDocParser;
18 class TDocMethodWrapper;
19 class TList;
20 
21 class TClassDocOutput: public TDocOutput {
22 protected:
23  enum ETraverse {
24  kUp, kDown, kBoth // direction to traverse class tree in ClassHtmlTree()
25  };
26 
27  Int_t fHierarchyLines; // counter for no. lines in hierarchy
28  TClass* fCurrentClass; // class to generate output for
29  TList* fCurrentClassesTypedefs; // typedefs to the current class
30  TDocParser* fParser; // parser we use
31 
32  void ClassHtmlTree(std::ostream &out, TClass *classPtr, ETraverse dir=kBoth, int depth=1);
33  void ClassTree(TVirtualPad *canvas, Bool_t force=kFALSE);
34 
35  Bool_t CreateDotClassChartIncl(const char* filename);
36  Bool_t CreateDotClassChartInh(const char* filename);
37  Bool_t CreateDotClassChartInhMem(const char* filename);
38  Bool_t CreateDotClassChartLib(const char* filename);
39 
41  void CreateSourceOutputStream(std::ostream& out, const char* extension, TString& filename);
42  void DescendHierarchy(std::ostream &out, TClass* basePtr, Int_t maxLines=0, Int_t depth=1);
43 
44  virtual void ListFunctions(std::ostream& classFile);
45  virtual void ListDataMembers(std::ostream& classFile);
46 
47  virtual void WriteClassDocHeader(std::ostream& classFile);
48  virtual void WriteMethod(std::ostream & out, TString& ret,
49  TString& name, TString& params,
50  const char* file, TString& anchor,
51  TString& comment, TString& codeOneLiner,
52  TDocMethodWrapper* guessedMethod);
53  virtual void WriteClassDescription(std::ostream& out, const TString& description);
54 
55 public:
56  TClassDocOutput(THtml& html, TClass* cl, TList* typedefs);
57  virtual ~TClassDocOutput();
58 
59  void Class2Html(Bool_t force=kFALSE);
60  Bool_t ClassDotCharts(std::ostream & out);
61  void CreateClassHierarchy(std::ostream& out, const char* docFileName);
62 
63  void MakeTree(Bool_t force = kFALSE);
64 
65  friend class TDocParser;
66 
67  ClassDef(TClassDocOutput, 0); // generates documentation web pages for a class
68 };
69 
70 #endif // ROOT_TClassDocOutput
TClassDocOutput::CreateDotClassChartIncl
Bool_t CreateDotClassChartIncl(const char *filename)
Build the include dependency graph for one class in GraphViz/Dot format.
Definition: TClassDocOutput.cxx:907
TClassDocOutput::kBoth
@ kBoth
Definition: TClassDocOutput.h:24
TClassDocOutput::ListDataMembers
virtual void ListDataMembers(std::ostream &classFile)
Write the list of data members and enums.
Definition: TClassDocOutput.cxx:245
TClassDocOutput::CreateDotClassChartInh
Bool_t CreateDotClassChartInh(const char *filename)
Build the class tree for one class in GraphViz/Dot format.
Definition: TClassDocOutput.cxx:617
TClassDocOutput::fCurrentClassesTypedefs
TList * fCurrentClassesTypedefs
Definition: TClassDocOutput.h:29
TClassDocOutput::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 ...
Definition: TClassDocOutput.cxx:51
TClassDocOutput::CreateDotClassChartInhMem
Bool_t CreateDotClassChartInhMem(const char *filename)
Build the class tree of inherited members for one class in GraphViz/Dot format.
Definition: TClassDocOutput.cxx:725
TClassDocOutput::fCurrentClass
TClass * fCurrentClass
Definition: TClassDocOutput.h:28
TClassDocOutput::MakeTree
void MakeTree(Bool_t force=kFALSE)
Create an output file with a graphical representation of the class inheritance.
Definition: TClassDocOutput.cxx:1286
TClassDocOutput::ListFunctions
virtual void ListFunctions(std::ostream &classFile)
Write the list of functions.
Definition: TClassDocOutput.cxx:120
TDocParser
Definition: TDocParser.h:44
TClassDocOutput::ClassTree
void ClassTree(TVirtualPad *canvas, Bool_t force=kFALSE)
It makes a graphical class tree.
Definition: TClassDocOutput.cxx:586
TClassDocOutput::WriteClassDocHeader
virtual void WriteClassDocHeader(std::ostream &classFile)
Write out the introduction of a class description (shortcuts and links)
Definition: TClassDocOutput.cxx:1430
TString
Basic string class.
Definition: TString.h:136
TClassDocOutput::ClassHtmlTree
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,...
Definition: TClassDocOutput.cxx:466
TClassDocOutput::~TClassDocOutput
virtual ~TClassDocOutput()
Destructor, deletes fParser.
Definition: TClassDocOutput.cxx:61
bool
TClassDocOutput::CreateClassHierarchy
void CreateClassHierarchy(std::ostream &out, const char *docFileName)
Create the hierarchical class list part for the current class's base classes.
Definition: TClassDocOutput.cxx:1060
TClassDocOutput::ClassDotCharts
Bool_t ClassDotCharts(std::ostream &out)
This function builds the class charts for one class in GraphViz/Dot format, i.e.
Definition: TClassDocOutput.cxx:393
TClassDocOutput::kUp
@ kUp
Definition: TClassDocOutput.h:24
THtml
Definition: THtml.h:40
TClassDocOutput::CreateSourceOutputStream
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...
Definition: TClassDocOutput.cxx:1174
TClassDocOutput::CreateDotClassChartLib
Bool_t CreateDotClassChartLib(const char *filename)
Build the library dependency graph for one class in GraphViz/Dot format.
Definition: TClassDocOutput.cxx:991
TClassDocOutput::DescendHierarchy
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.
Definition: TClassDocOutput.cxx:1209
TDocMethodWrapper
Definition: TDocParser.h:37
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TClassDocOutput::WriteMethod
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.
Definition: TClassDocOutput.cxx:1590
TDocOutput.h
TClassDocOutput::WriteClassDescription
virtual void WriteClassDescription(std::ostream &out, const TString &description)
Called by TDocParser::LocateMethods(), this hook writes out the class description found by TDocParser...
Definition: TClassDocOutput.cxx:1339
TClassDocOutput::kDown
@ kDown
Definition: TClassDocOutput.h:24
TClassDocOutput::fHierarchyLines
Int_t fHierarchyLines
Definition: TClassDocOutput.h:27
TDocOutput
Definition: TDocOutput.h:37
TClassDocOutput::ETraverse
ETraverse
Definition: TClassDocOutput.h:23
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
file
Definition: file.py:1
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TClassDocOutput
Definition: TClassDocOutput.h:21
TClassDocOutput::Class2Html
void Class2Html(Bool_t force=kFALSE)
Create HTML files for a single class.
Definition: TClassDocOutput.cxx:70
TClassDocOutput::CreateHierarchyDot
Bool_t CreateHierarchyDot()
Create a hierarchical class list The algorithm descends from the base classes and branches into all d...
Definition: TClassDocOutput.cxx:1094
name
char name[80]
Definition: TGX11.cxx:110
extension
const char * extension
Definition: civetweb.c:7793
TClassDocOutput::fParser
TDocParser * fParser
Definition: TClassDocOutput.h:30
ROOT::TMetaUtils::propNames::comment
static const std::string comment("comment")
TList
A doubly linked list.
Definition: TList.h:44
int