source: trunk/MagicSoft/Mars/mbase/MHtml.h@ 1176

Last change on this file since 1176 was 1018, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.6 KB
Line 
1// @(#)root/html:$Name: not supported by cvs2svn $:$Id: MHtml.h,v 1.3 2001-10-31 13:46:12 tbretz Exp $
2// Author: Nenad Buncic 18/10/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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 MARS_MHtml
13#define MARS_MHtml
14
15
16////////////////////////////////////////////////////////////////////////////
17// //
18// THtml //
19// //
20// Html makes a documentation for all ROOT classes //
21// using Hypertext Markup Language 2.0 //
22// //
23////////////////////////////////////////////////////////////////////////////
24
25
26class TClass;
27class TVirtualPad;
28
29
30class MHtml : public TObject {
31
32private:
33 TString fXwho; // by default http://xwho.cern.ch/WHO/people?
34 const char *fSourcePrefix; // prefix to relative source path
35 const char *fSourceDir; // source path
36 const char *fOutputDir; // output directory
37 char *fLine; // current line
38 Int_t fLen; // maximum line length
39 char *fCounter; // counter string
40 Bool_t fEscFlag; // Flag to mark the symbol must be written "as is"
41 char fEsc; // The special symbol ("backslash" by default) to mark "the next symbol should not be converted
42
43 void Class2Html(TClass *classPtr, Bool_t force=kFALSE);
44 void ClassDescription(ofstream &out, TClass *classPtr, Bool_t &flag);
45 void ClassTree(TVirtualPad *canvas, TClass *classPtr, Bool_t force=kFALSE);
46 Bool_t CopyHtmlFile(const char *sourceName, const char *destName="");
47 void CreateIndex(const char **classNames, Int_t numberOfClasses);
48 void CreateIndexByTopic(char **filenames, Int_t numberOfNames, Int_t maxLen);
49 void CreateListOfTypes();
50 void DerivedClasses(ofstream &out, TClass *classPtr);
51 void ExpandKeywords(ofstream &out, char *text, TClass *ptr2class, Bool_t &flag, const char *dir="");
52 void ExpandPpLine(ofstream &out, char *line);
53 TClass *GetClass(const char *name, Bool_t load=kTRUE);
54 const char *GetFileName(const char *filename);
55 char *GetSourceFileName(const char *filename);
56 char *GetHtmlFileName(TClass *classPtr);
57 Bool_t IsModified(TClass *classPtr, const Int_t type);
58 Bool_t IsName(Int_t c);
59 Bool_t IsWord(Int_t c);
60 void ReplaceSpecialChars(ofstream &out, const char c);
61 void ReplaceSpecialChars(ofstream &out, const char *string);
62 void SortNames(const char **strings, Int_t num, Bool_t type=0);
63 char *StrDup(const char *s1, Int_t n = 1);
64
65 friend Int_t CaseSensitiveSort(const void *name1, const void *name2);
66 friend Int_t CaseInsensitiveSort(const void *name1, const void *name2);
67
68public:
69 MHtml();
70 virtual ~MHtml();
71 void Convert(const char *filename, const char *title, const char *dirname = "");
72 const char *GetSourceDir() { return fSourceDir; }
73 const char *GetOutputDir() { return fOutputDir; }
74 const char *GetXwho() const { return fXwho.Data(); }
75 void MakeAll(Bool_t force=kFALSE);
76 void MakeClass(const char *className, Bool_t force=kFALSE);
77 void MakeIndex();
78 void MakeTree(const char *className, Bool_t force=kFALSE);
79 void SetEscape(char esc='\\') { fEsc = esc; }
80 void SetSourcePrefix(const char *prefix) { fSourcePrefix = prefix; }
81 void SetSourceDir(const char *dir) { fSourceDir = dir; }
82 void SetOutputDir(const char *dir) { fOutputDir = dir; }
83 void SetXwho(const char *xwho) { fXwho = xwho; }
84 virtual void WriteHtmlHeader(ofstream &out, const char *title);
85 virtual void WriteHtmlFooter(ofstream &out, const char *dir="", const char *lastUpdate="",
86 const char *author="", const char *copyright="");
87
88 ClassDef(MHtml,0) //Convert class(es) into HTML file(s)
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.