oopapidocs  2.0
DocbookWalker Class Reference

A class designed for traversing and transforming Docbook Documents. More...

#include <docbookwalker.h>

Collaboration diagram for DocbookWalker:

List of all members.

Public Member Functions

virtual QDomDocument transform ()
 Traverses whole tree.
virtual int visited () const

Protected Member Functions

virtual bool visit (int depth, Element e)
 Visits the current Element.
QString currentHeading () const
QString heading (Element sect) const

Detailed Description

A class designed for traversing and transforming Docbook Documents.

Keeps track of section::s and chapter::s.

Author:
Alan Ezust

Definition at line 12 of file docbookwalker.h.


Member Function Documentation

QString DocbookWalker::currentHeading ( ) const [protected]
Returns:
For the current chapter/section/appendix, returns the element name followed by its number, and its title, as a QString.

Definition at line 43 of file docbookwalker.cpp.

References heading().

Here is the call graph for this function:

QString DocbookWalker::heading ( Element  sect) const [protected]
Parameters:
secta chapter, section or appendix
Returns:
the heading string of sect.

Definition at line 18 of file docbookwalker.cpp.

References DocbookDoc::getTitle().

Referenced by currentHeading().

Here is the call graph for this function:

QDomDocument DocbookWalker::transform ( ) [virtual]

Traverses whole tree.

Definition at line 101 of file docbookwalker.cpp.

bool DocbookWalker::visit ( int  depth,
Element  e 
) [protected, virtual]

Visits the current Element.

Handles elements like <chapter> <section> nd <appendix> for numbering purposes.

Called from walkTree from transform. Not to be called pubclicly.

You can override this, handle specific elements, and call the base class version for elements you do not handle.

Parameters:
ethe Element to visit
depththe current depth of the tree
Returns:
false if we should not check the children after handling this object.

Definition at line 63 of file docbookwalker.cpp.

virtual int DocbookWalker::visited ( ) const [inline, virtual]
Returns:
number of nodes visited

Definition at line 21 of file docbookwalker.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Enumerations