|
clang-tools 23.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< 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 100 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 JSON().
Referenced by generateDocumentation().
|
overridevirtual |
The main orchestrator for Mustache-based documentation.
Implements clang::doc::Generator.
Definition at line 68 of file Generators.cpp.
References clang::doc::createFileOpenError(), clang::doc::ClangDocContext::Diags, clang::doc::findGeneratorByName(), generateDocForJSON(), getInfoTypeStr(), getRelativePathToRoot(), and setupTemplateFiles().
| Expected< std::string > clang::doc::MustacheGenerator::getInfoTypeStr | ( | llvm::json::Object * | Info, |
| StringRef | Filename ) |
Definition at line 165 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 186 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().
|
pure virtual |
Initializes the template files from disk and calls setupTemplate to register partials.
Referenced by generateDocumentation().