TOP --> CcDoc
This class handles the expression tree stuff for the pre-processor. for #if statements. It is pretty primitive.
A sample usage is shown below:
CCcDocPrepExpr* expr = CCcDocPrepExpr::Create(this,"#if defined(FOO) || defined(SPAM)"); if(expr) { bool eval = expr->Eval(true); // eval with debug turned on CCcDocPrepExpr::Destroy(expr); }
public void Dump ( const char * prefix = 0 , uint level = 0 ) const ;
Dump the contents of the internal expression tree.
fp | The output file. |
prefix | An optional prefix for each output line. |
level | The current nesting level. |
public long Eval ( CCcDocPrep * obj , ulong lineno , const char * src , const char * linebuf , bool debugFlag = false , uint level = 0 , bool reportUndefSymsFlag = true ) const ;
Evaluate an expression tree.
obj | The CCcDocPrep parent object. |
lineno | Source file line number. |
src | Source file name. |
linebuf | Line information. |
debugFlag | If true, turns on internal debugging messages. |
level | The current nesting level. |
reportUndefSymsFlag | Report undefined symbols. |
public static CCcDocPrepExpr * Create ( CCcDocPrep * obj , const char * line ) ;
Create an expression subtree and return a pointer to the root of the tree.
Parses lines of the form:
#if defined(SPAM) && ( defined(FOO) || defined(BAR) )
obj | The CCcDocPrep parent object. |
line | The line. |
public static void Destroy ( CCcDocPrepExpr * expr ) ;
Destroy the expression subtree.
expr | The root of the expression tree that is returned by Create. |
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.