clang-tools 22.0.0git
clang::doc::HTMLGenerator Class Reference
Inheritance diagram for clang::doc::HTMLGenerator:
[legend]

Public Member Functions

Error createResources (ClangDocContext &CDCtx) override
Error generateDocForInfo (Info *I, raw_ostream &OS, const ClangDocContext &CDCtx) override
Error setupTemplateFiles (const ClangDocContext &CDCtx) override
 Initializes the template files from disk and calls setupTemplate to register partials.
Error generateDocForJSON (json::Value &JSON, raw_fd_ostream &OS, const ClangDocContext &CDCtx, StringRef ObjTypeStr, StringRef RelativeRootPath) override
Error setupTemplateResources (const ClangDocContext &CDCtx, json::Value &V, SmallString< 128 > RelativeRootPath)
llvm::Error generateDocumentation (StringRef RootDir, llvm::StringMap< std::unique_ptr< doc::Info > > Infos, const ClangDocContext &CDCtx, std::string DirName) override
Public Member Functions inherited from clang::doc::MustacheGenerator
Expected< std::string > getInfoTypeStr (llvm::json::Object *Info, StringRef Filename)
SmallString< 128 > getRelativePathToRoot (StringRef PathToFile, StringRef DocsRootPath)
 Used to find the relative path from the file to the format's docs root.
virtual ~MustacheGenerator ()=default
virtual llvm::Error generateDocForJSON (llvm::json::Value &JSON, llvm::raw_fd_ostream &OS, const ClangDocContext &CDCtx, StringRef ObjectTypeStr, StringRef RelativeRootPath)=0
 Populates templates with data from JSON and calls any specifics for the format.
llvm::Error setupTemplate (std::unique_ptr< MustacheTemplateFile > &Template, StringRef TemplatePath, std::vector< std::pair< StringRef, StringRef > > Partials)
 Registers partials to templates.
llvm::Error generateDocumentation (StringRef RootDir, llvm::StringMap< std::unique_ptr< doc::Info > > Infos, const clang::doc::ClangDocContext &CDCtx, std::string DirName) override
 The main orchestrator for Mustache-based documentation.
Public Member Functions inherited from clang::doc::Generator
virtual ~Generator ()=default
virtual llvm::Error generateDocForInfo (Info *I, llvm::raw_ostream &OS, const ClangDocContext &CDCtx)=0

Static Public Attributes

static const char * Format = "html"

Additional Inherited Members

Static Public Member Functions inherited from clang::doc::Generator
static void addInfoToIndex (Index &Idx, const doc::Info *Info)

Detailed Description

Definition at line 34 of file HTMLGenerator.cpp.

Member Function Documentation

◆ createResources()

Error clang::doc::HTMLGenerator::createResources ( ClangDocContext & CDCtx)
overridevirtual

◆ generateDocForInfo()

Error clang::doc::HTMLGenerator::generateDocForInfo ( Info * I,
raw_ostream & OS,
const ClangDocContext & CDCtx )
override

◆ generateDocForJSON()

Error clang::doc::HTMLGenerator::generateDocForJSON ( json::Value & JSON,
raw_fd_ostream & OS,
const ClangDocContext & CDCtx,
StringRef ObjTypeStr,
StringRef RelativeRootPath )
override

◆ generateDocumentation()

Error clang::doc::HTMLGenerator::generateDocumentation ( StringRef RootDir,
llvm::StringMap< std::unique_ptr< doc::Info > > Infos,
const ClangDocContext & CDCtx,
std::string DirName )
overridevirtual

◆ setupTemplateFiles()

Error clang::doc::HTMLGenerator::setupTemplateFiles ( const ClangDocContext & CDCtx)
overridevirtual

Initializes the template files from disk and calls setupTemplate to register partials.

Implements clang::doc::MustacheGenerator.

Definition at line 52 of file HTMLGenerator.cpp.

References clang::doc::IndexTemplate, clang::doc::ClangDocContext::MustacheTemplates, clang::doc::NamespaceTemplate, clang::doc::RecordTemplate, and clang::doc::MustacheGenerator::setupTemplate().

◆ setupTemplateResources()

Error clang::doc::HTMLGenerator::setupTemplateResources ( const ClangDocContext & CDCtx,
json::Value & V,
SmallString< 128 > RelativeRootPath )

Member Data Documentation

◆ Format

const char * clang::doc::HTMLGenerator::Format = "html"
static

Definition at line 36 of file HTMLGenerator.cpp.

Referenced by clang::doc::HTML().


The documentation for this class was generated from the following file: