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

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