File indexing completed on 2025-01-18 10:11:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TDocOutput
0013 #define ROOT_TDocOutput
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TObject.h"
0025 #include "TDocParser.h"
0026
0027 class TClass;
0028 class TDataMember;
0029 class TDataType;
0030 class TGClient;
0031 class THtml;
0032 class TModuleDocInfo;
0033 class TString;
0034 class TSubString;
0035 class TVirtualPad;
0036
0037 class TDocOutput: public TObject {
0038 protected:
0039 enum EGraphvizTool {
0040 kDot,
0041 kNeato,
0042 kFdp,
0043 kCirco
0044 };
0045
0046 THtml* fHtml;
0047
0048 int CaseInsensitiveSort(const void *name1, const void *name2);
0049 void AddLink(TSubString& str, TString& link, const char* comment);
0050 void ProcessDocInDir(std::ostream& out, const char* indir, const char* outdir, const char* linkdir);
0051 Bool_t RunDot(const char* filename, std::ostream* outMap = 0, EGraphvizTool gvwhat = kDot);
0052 void WriteHtmlHeader(std::ostream& out, const char *titleNoSpecial,
0053 const char* dir , TClass *cls ,
0054 const char* header);
0055 void WriteHtmlFooter(std::ostream& out, const char *dir,
0056 const char *lastUpdate, const char *author,
0057 const char *copyright, const char* footer);
0058 virtual void WriteSearch(std::ostream& out);
0059 void WriteLocation(std::ostream& out, TModuleDocInfo* module, const char* classname = 0);
0060 void WriteModuleLinks(std::ostream& out);
0061 void WriteModuleLinks(std::ostream& out, TModuleDocInfo* super);
0062 void WriteTopLinks(std::ostream& out, TModuleDocInfo* module, const char* classname = 0, Bool_t withLocation = kTRUE);
0063
0064 public:
0065 enum EFileType { kSource, kInclude, kTree, kDoc };
0066
0067 TDocOutput(THtml& html);
0068 ~TDocOutput() override;
0069
0070 virtual void AdjustSourcePath(TString& line, const char* relpath = "../");
0071 void Convert(std::istream& in, const char* infilename,
0072 const char* outfilename, const char *title,
0073 const char *relpath = "../",
0074 Int_t includeOutput = 0,
0075 const char* context = "",
0076 TGClient* gclient = 0);
0077 Bool_t CopyHtmlFile(const char *sourceName, const char *destName="");
0078
0079 virtual void CreateClassIndex();
0080 virtual void CreateModuleIndex();
0081 virtual void CreateProductIndex();
0082 virtual void CreateTypeIndex();
0083 virtual void CreateClassTypeDefs();
0084 virtual void CreateHierarchy();
0085
0086 virtual void DecorateEntityBegin(TString& str, Ssiz_t& pos, TDocParser::EParseContext type);
0087 virtual void DecorateEntityEnd(TString& str, Ssiz_t& pos, TDocParser::EParseContext type);
0088 virtual void FixupAuthorSourceInfo(TString& authors);
0089 const char* GetExtension() const { return ".html"; }
0090 THtml* GetHtml() { return fHtml; }
0091 virtual Bool_t IsModified(TClass *classPtr, EFileType type);
0092 virtual void NameSpace2FileName(TString &name);
0093
0094 virtual void ReferenceEntity(TSubString& str, TClass* entity, const char* comment = 0);
0095 virtual void ReferenceEntity(TSubString& str, TDataMember* entity, const char* comment = 0);
0096 virtual void ReferenceEntity(TSubString& str, TDataType* entity, const char* comment = 0);
0097 virtual void ReferenceEntity(TSubString& str, TMethod* entity, const char* comment = 0);
0098 virtual Bool_t ReferenceIsRelative(const char* reference) const;
0099
0100 virtual const char* ReplaceSpecialChars(char c);
0101 void ReplaceSpecialChars(std::ostream &out, const char *string);
0102 void ReplaceSpecialChars(TString& text);
0103 void ReplaceSpecialChars(TString& text, Ssiz_t &pos);
0104
0105 virtual void WriteHtmlHeader(std::ostream &out, const char *title, const char* dir="", TClass *cls=0);
0106 virtual void WriteHtmlFooter(std::ostream &out, const char *dir="", const char *lastUpdate="",
0107 const char *author="", const char *copyright="");
0108 void WriteLineNumbers(std::ostream& out, Long_t nLines, const TString& infileBase) const;
0109
0110 ClassDefOverride(TDocOutput, 0);
0111 };
0112
0113 #endif