|
clang-tools 22.0.0git
|
#include <Generators.h>
Public Member Functions | |
| 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 | setupTemplateFiles (const ClangDocContext &CDCtx)=0 |
| Initializes the template files from disk and calls setupTemplate to register partials. | |
| 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 | createResources (ClangDocContext &CDCtx) |
| virtual llvm::Error | generateDocForInfo (Info *I, llvm::raw_ostream &OS, const ClangDocContext &CDCtx)=0 |
Additional Inherited Members | |
| Static Public Member Functions inherited from clang::doc::Generator | |
| static void | addInfoToIndex (Index &Idx, const doc::Info *Info) |
Definition at line 95 of file Generators.h.
|
virtualdefault |
|
pure virtual |
Populates templates with data from JSON and calls any specifics for the format.
For example, for HTML it will render the paths for CSS and JS.
References clang::doc::JSON().
Referenced by generateDocumentation().
|
overridevirtual |
The main orchestrator for Mustache-based documentation.
Implements clang::doc::Generator.
Reimplemented in clang::doc::MustacheHTMLGenerator.
Definition at line 68 of file Generators.cpp.
References clang::doc::createFileOpenError(), clang::doc::findGeneratorByName(), generateDocForJSON(), clang::doc::JSONGenerator::generateDocumentation(), getInfoTypeStr(), getRelativePathToRoot(), and setupTemplateFiles().
Referenced by clang::doc::MustacheHTMLGenerator::generateDocumentation().
| Expected< std::string > clang::doc::MustacheGenerator::getInfoTypeStr | ( | llvm::json::Object * | Info, |
| StringRef | Filename ) |
Definition at line 158 of file Generators.cpp.
Referenced by generateDocumentation().
| SmallString< 128 > clang::doc::MustacheGenerator::getRelativePathToRoot | ( | StringRef | PathToFile, |
| StringRef | DocsRootPath ) |
Used to find the relative path from the file to the format's docs root.
Mainly used for the HTML resource paths.
Definition at line 173 of file Generators.cpp.
References clang::doc::computeRelativePath().
Referenced by generateDocumentation().
| Error clang::doc::MustacheGenerator::setupTemplate | ( | std::unique_ptr< MustacheTemplateFile > & | Template, |
| StringRef | TemplatePath, | ||
| std::vector< std::pair< StringRef, StringRef > > | Partials ) |
Registers partials to templates.
Definition at line 55 of file Generators.cpp.
References clang::doc::MustacheTemplateFile::createMustacheFile().
Referenced by clang::doc::MustacheHTMLGenerator::setupTemplateFiles().
|
pure virtual |
Initializes the template files from disk and calls setupTemplate to register partials.
Implemented in clang::doc::MustacheHTMLGenerator.
Referenced by generateDocumentation().