Class Class.

Inherits Garbage

The Class class models a C++ class and its documentation.

A Class has zero or one parent classes, any number of member functions and one documentation block.

The file has an origin file and line.

Class::Class( const String & s, File * sourceFile, uint sourceLine )

Constructs a Class object for the class named s, which is defined on sourceLine of sourceFile. Initially the class is considered to have no member functions, superclasses or subclasses.

static void Class::buildHierarchy()

Builds a hierarchy tree of documented classes, and emits errors if any the inheritance tree isn't fully documented.

This function must be called before Function::super() can be.

File * Class::file() const

Returns the file name where this class was seen. Should this be the .cpp containing the "\class", or the header file containing class definition? Not sure.

static Class * Class::find( const String & s )

Returns a pointer to the Class object whose name() is s, or a null pointer of there is no such object.

void Class::generateOutput()

Does everything necessary to generate output for this class and all of its member functions.

void Class::insert( Function * function )

Remembers function as a member function in this class, so its documentation can be included by generateOutput() and friends.

uint Class::line() const

Returns the line number where this class was first seen. Should this be the line of the "\class", or of the header file class definition? Not sure.

List<Function> * Class::members()

Returns a pointer to the list of all the member functions in this class. The Class remains owner of the list; the caller should not delete or modify the list in any way.

String Class::name() const

Returns the class name, as specified to the constructor.

static void Class::output()

This static function processes all classes and generates the appropriate output.

Class * Class::parent() const

Returns a pointer to the superclass of this class, or a null pointer if this class doesn't inherit anything.

void Class::setParent( const String & cn )

Notifies this Class that cn is its parent class. The initial value is an empty string, corresponding to a class that inherits nothing.

Note that udoc does not support multiple or non-public inheritance.

List<Class> * Class::subclasses() const

Returns a pointer to a list of all classes that directly inherit this class. The returned list must neither be deleted nor changed. If no classes inherit this one, subclasses() returns a null pointer.

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