Class ManPage.

Inherits Garbage

The ManPage class provides documentation output to a UNIX man page.

It implements the same functions as Output, but they're not static, and is called when Output's static functions are called.

ManPage::ManPage( const char * dir )

Constructs an empty man page generator which will write man pages in the dir directory.

void ManPage::addArgument( const String & text )

As Output::addArgument(). text is used italicized.

void ManPage::addAuthor()

Add boilerplate describing the author. Will need configurability.

void ManPage::addClass( const String & text, Class * c )

As Output::addClass(). text is output as-is, and the name of c is remembered for later mention in the See Also section.

void ManPage::addFunction( const String & text, Function * f )

As Output::addFunction(). At present this outputs text in the regular font, maybe it should use a different font?

The class to which f belongs is mentioned in the "see also" section.

void ManPage::addReferences()

Adds a See Also section mentioning everything we've mentioned (using addClass()).

void ManPage::addText( const String & text )

As Output::addText(). text is escaped (how?).

static ManPage * ManPage::current()

Returns a pointer to the most recently constructed ManPage object, or a null pointer if none has been constructed yet.

void ManPage::endPage()

Emits the routing verbiage at the end of a manpage.

void ManPage::endParagraph()

As Output::endParagraph().

void ManPage::output( const String & s )

Write s to the output file.

void ManPage::startHeadline( Class * c )

As Output::startHeadline(). c is used only to generate a suitable man page named.

void ManPage::startHeadline( Function * )

As Output::startHeadline().

void ManPage::startHeadline( Intro * )

For the moment, we do not generate introductory manual pages. Perhaps it would be possible. This function makes ManPage discard output until startHeadline() is called for a Class.


Destroys the man page object, flushing and closing the generated file.

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