doxygen
Public Member Functions | List of all members
HtmlCodeGenerator Class Reference
Inheritance diagram for HtmlCodeGenerator:
Inheritance graph
[legend]
Collaboration diagram for HtmlCodeGenerator:
Collaboration graph
[legend]

Public Member Functions

 HtmlCodeGenerator (TextStream &t, const QCString &relPath)
 
 HtmlCodeGenerator (TextStream &t)
 
int id () const
 Identifier for the output file.
 
void setId (int id)
 
void setRelativePath (const QCString &path)
 
void codify (const QCString &text)
 
void writeCodeLink (CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip)
 
void writeTooltip (const QCString &id, const DocLinkInfo &docInfo, const QCString &decl, const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
 
void writeLineNumber (const QCString &, const QCString &, const QCString &, int, bool)
 
void startCodeLine (bool)
 
void endCodeLine ()
 
void startFontClass (const QCString &s)
 
void endFontClass ()
 
void writeCodeAnchor (const QCString &anchor)
 
void setCurrentDoc (const Definition *, const QCString &, bool)
 
void addWord (const QCString &, bool)
 
void startCodeFragment (const QCString &style)
 
void endCodeFragment (const QCString &)
 
- Public Member Functions inherited from CodeOutputInterface
 CodeOutputInterface (const CodeOutputInterface &)=delete
 
CodeOutputInterfaceoperator= (const CodeOutputInterface &)=delete
 

Member Function Documentation

◆ codify()

void HtmlCodeGenerator::codify ( const QCString s)
virtual

Writes an code fragment to the output. This function should keep spaces visible, should break lines at a newline and should convert tabs to the right number of spaces.

Implements CodeOutputInterface.

◆ endCodeFragment()

void HtmlCodeGenerator::endCodeFragment ( const QCString style)
virtual

Ends a block of code

Implements CodeOutputInterface.

◆ endCodeLine()

void HtmlCodeGenerator::endCodeLine ( )
virtual

Ends a line of code started with startCodeLine()

Implements CodeOutputInterface.

◆ endFontClass()

void HtmlCodeGenerator::endFontClass ( )
virtual

Ends a block started with startFontClass()

Implements CodeOutputInterface.

◆ startCodeFragment()

void HtmlCodeGenerator::startCodeFragment ( const QCString style)
virtual

Starts a source code fragment. The fragment will be fed to the code parser (see code.h) for syntax highlighting and cross-referencing. The fragment ends by a call to endCodeFragment()

Parameters
styleThe kind of code fragment.

Implements CodeOutputInterface.

◆ startFontClass()

void HtmlCodeGenerator::startFontClass ( const QCString clsName)
virtual

Starts a block with a certain meaning. Used for syntax highlighting, which elements of the same type are rendered using the same 'font class'.

Parameters
clsNameThe category name.

Implements CodeOutputInterface.

◆ writeCodeAnchor()

void HtmlCodeGenerator::writeCodeAnchor ( const QCString name)
virtual

Write an anchor to a source listing.

Parameters
nameThe name of the anchor.

Implements CodeOutputInterface.

◆ writeCodeLink()

void HtmlCodeGenerator::writeCodeLink ( CodeSymbolType  type,
const QCString ref,
const QCString file,
const QCString anchor,
const QCString name,
const QCString tooltip 
)
virtual

Writes a link to an object in a code fragment.

Parameters
typeThe type of symbol, used for semantic syntax highlighting, may be Default is no info is available.
refIf this is non-zero, the object is to be found in an external documentation file.
fileThe file in which the object is located.
anchorThe anchor uniquely identifying the object within the file.
nameThe text to display as a placeholder for the link.
tooltipThe tooltip to display when the mouse is on the link.

Implements CodeOutputInterface.

◆ writeLineNumber()

void HtmlCodeGenerator::writeLineNumber ( const QCString ref,
const QCString file,
const QCString anchor,
int  lineNumber,
bool  writeLineAnchor 
)
virtual

Writes the line number of a source listing

Parameters
refExternal reference (when imported from a tag file)
fileThe file part of the URL pointing to the docs.
anchorThe anchor part of the URL pointing to the docs.
lineNumberThe line number to write
writeLineAnchorIndicates if an anchor for the line number needs to be written

Implements CodeOutputInterface.

◆ writeTooltip()

void HtmlCodeGenerator::writeTooltip ( const QCString id,
const DocLinkInfo docInfo,
const QCString decl,
const QCString desc,
const SourceLinkInfo defInfo,
const SourceLinkInfo declInfo 
)
virtual

Writes a tool tip definition

Parameters
idunique identifier for the tooltip
docInfoInfo about the symbol's documentation.
declfull declaration of the symbol (for functions)
descbrief description for the symbol
defInfoInfo about the symbol's definition in the source code
declInfoInfo about the symbol's declaration in the source code

Implements CodeOutputInterface.


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