TOP --> CcDoc
This class manages the package tree and generates the nifty drawing of the package tree.
Nodes with the name "[NULL]" will be ignored which means that you can use the pkg name "[NULL]" for a file that defines packages.
This class is used as follows:
// Generate a tree that looks like this: // [ROOT] +--> A1 +--> A1B1 // | // +--> A2 +--> A2B1 // | // +--> A2B2 CCcDocPhase3PkgTree* root = new CCcDocPhase3PkgTree("[ROOT]",0); CCcDocPhase3PkgTree* A1 = new CCcDocPhase3PkgTree("A1",root); CCcDocPhase3PkgTree* A2 = new CCcDocPhase3PkgTree("A2",root); CCcDocPhase3PkgTree* A1B1 = new CCcDocPhase3PkgTree("A1B1",A1); CCcDocPhase3PkgTree* A2B1 = new CCcDocPhase3PkgTree("A2B1",A2); CCcDocPhase3PkgTree* A2B2 = new CCcDocPhase3PkgTree("A2B2",A2); root->Compile(); root->Write(stdout,false); // don't print anchors
public CCcDocPhase3PkgTree ( const char * name , CCcDocPhase3PkgTree * parent ) ;
Constructor.
name | The node name. |
parent | The parent node. |
public ~ CCcDocPhase3PkgTree ( ) ;
Destructor.
public void Compile ( ulong level = 0 , ulong phase = 0 ) ;
Compile the tree.
Compilation must be completed prior to any write operations.
There are three compilation phases:
level | The current level. |
phase | The current compilation phase. |
public void Write ( FILE * fp = stderr , bool anchorFlag = true , const char * prefix = 0 ) ;
Write the tree out to a file.
fp | The file pointer. |
anchorFlag | If true, generate the HTML anchor statements for each pkg. If false, print it out as plaintext for debugging. Setting the environment variable CCDOC_PHASE3_TREE_ANCHORS_OFF set this flag to false. |
prefix | An optional prefix. |
public void WritePath ( FILE * fp = stderr , bool anchorFlag = true , bool anchorLastFlag = true , const char * prefix = 0 ) ;
Write out the path of the current node. This is a simple, straightline representation of the hierarchy associated with the node.
fp | The file pointer. |
anchorFlag | If true, generate the HTML anchor statements for each pkg. If false, print it out as plaintext for debugging. Setting the environment variable CCDOC_PHASE3_TREE_ANCHORS_OFF set this flag to false. |
anchorLastFlag | If true, generate the HTML anchor statement for the last entry. For the pkg index lists we want this to be false. |
prefix | An optional prefix. |
public CCcDocPhase3PkgTree * Find ( const char * name ) const ;
Find a child node with the specified name.
name | The name of the child. |
public CCcDocPhase3PkgTree * GetParent ( ) const ;
Get the parent node.
public const char * GetName ( ) const ;
Get the name of this node.
public void GetPath ( CJdlString & path ) const ;
Get the hierachical name of this node. Each level hierarchy is separated by a ".".
public bool IsNull ( ) const ;
Is this a NULL package? A NULL package is one whose name is "[NULL]". They exist to allow documentation developers to create package documentation in a separate "documentation only" file. The contents of these files are used but the files are not associated with any package in the system.
public void Dump ( FILE * fp = stderr , const char * prefix = 0 , ulong level = 0 ) ;
Dump the contents of the tree for debugging.
fp | The output file pointer. |
prefix | An optional prefix. |
level | The current level. This should not be set by the programmer. |
public void SetRef ( const char * ref ) ;
Set the external reference. If this is not set, the reference is generated automatically from the tree path.
ref | The name of the reference. |
public void WriteAnchor ( FILE * fp , bool indexFlag = true ) ;
Write out the HTML anchor statement. Use the external reference if it was set.
fp | The output file. |
indexFlag | If true, reference the [ROOT] node as ccdoc.index.html otherwise reference it as ccdoc.xref.html. |
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.