Class DocBlock.

Inherits Garbage

The DocBlock class represents a single atom of documentation.

A documentation block is written as a C multi-line comment and documents a single class or a single function. DocBlock knows how to generate output for itself.

DocBlock::DocBlock( File * sourceFile, uint sourceLine, const String & text, Class * className )

Constructs a DocBlock from sourceFile, which starts at sourceLine, has source text and documents className.

DocBlock::DocBlock( File * sourceFile, uint sourceLine, const String & text, Function * function )

Constructs a DocBlock from sourceFile, which starts at sourceLine, has source text and documents function.

DocBlock::DocBlock( File * sourceFile, uint sourceLine, const String & text, Intro * intro )

Constructs a DocBlock from sourceFile, which starts at sourceLine, has source text and documents intro.

void DocBlock::checkEndState( uint l )

Verifies that all state is appropriate for ending a paragraph or documentation block, and emits appropriate errors if not. l must be the line number at which the paragraph/doc block ends.

void DocBlock::generate()

Parses the text() and calls the Output functions on to generate suitable output.

void DocBlock::generateClassPreamble()

Generates the routine text that introduces the documentation for each class, e.g. what the class inherits.

void DocBlock::generateFunctionPreamble()

Outputs boilerplante and genetated text to create a suitable headline and lead-in text for this DocBlock's function.

void DocBlock::generateIntroPreamble()

Generates routine text to introduce an introduction. Yay!

bool DocBlock::isClass() const

Returns true if this DocBlock documents a class, and false if not.

bool DocBlock::isEnum() const

Returns true if this DocBlock documents an enum type, and false if not. At the moment, enums aren't supported; that'll change.

void DocBlock::overload( uint l, uint n )

Handles the "\overload" directive. l is the line number where directive was seen and n is the word number (0 for the first word in a documentation block).

void DocBlock::plainWord( const String & w, uint l )

Adds the plain word or link w to the documentation, reporting an error from line l if the link is dangling.

void DocBlock::setState( State newState, const String & w, uint l )

Sets the DocBlock to state newState based on directive w, and gives an error from line l if the transition from the old state to the new is somehow wrong.

String DocBlock::text() const

Returns the source text of the documentation.

void DocBlock::whitespace( uint & i, uint & l )

Steps past whitespace, modifying the character index i and the line number l.

void DocBlock::word( uint & i, uint l, uint n )

Steps past and processes a word, which in this context is any nonwhitespace. i is the character index, which is moved, l is the line number, and n is the word number.

This web page based on source code belonging to Oryx Mail Systems GmbH. All rights reserved.