expression_logical_and_pretty Class Reference

#include <pretty.h>

Inheritance diagram for expression_logical_and_pretty:

expression_logical_and expression List of all members.

Public Member Functions

virtual ~expression_logical_and_pretty ()
 expression_logical_and_pretty (const expression::pointer &lhs, const expression::pointer &rhs, translator_pretty *cntxt)

Protected Member Functions

void pre_order_traversal (int pprec)
void infix_order_traversal (int pprec)
void post_order_traversal (int pprec)
expression::pointer optimize () const

Private Member Functions

 expression_logical_and_pretty ()
 expression_logical_and_pretty (const expression_logical_and_pretty &)
expression_logical_and_prettyoperator= (const expression_logical_and_pretty &)

Private Attributes

translator_prettypretty

Detailed Description

The expression_logical_and_pretty class is used to represent pretty printing a logical AND expression.

Definition at line 32 of file pretty.h.


Constructor & Destructor Documentation

virtual expression_logical_and_pretty::~expression_logical_and_pretty (  )  [virtual]

The destructor.

expression_logical_and_pretty::expression_logical_and_pretty ( const expression::pointer lhs,
const expression::pointer rhs,
translator_pretty cntxt 
)

The constructor.

expression_logical_and_pretty::expression_logical_and_pretty (  )  [private]

The default constructor. Do not use.

expression_logical_and_pretty::expression_logical_and_pretty ( const expression_logical_and_pretty  )  [private]

The copy constructor. Do not use.


Member Function Documentation

void expression_logical_and_pretty::pre_order_traversal ( int  pprec  )  [protected, virtual]

The pre_order_traversal method is used to perform actions required before the left hand expression is traversed.

Parameters:
pprec The parent expression's precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct.

Reimplemented from expression_logical_and.

void expression_logical_and_pretty::infix_order_traversal ( int  pprec  )  [protected, virtual]

The infix_order_traversal method is used to perform actions required after the left hand expression is traversed and before the right hand expression is traversed.

Parameters:
pprec The parent expression's precedence.

Reimplemented from expression_logical_and.

void expression_logical_and_pretty::post_order_traversal ( int  pprec  )  [protected, virtual]

The post_order_traversal method is used to perform actions required after the right hand expression is traversed.

Parameters:
pprec The parent expression's precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct.

Reimplemented from expression_logical_and.

expression::pointer expression_logical_and_pretty::optimize (  )  const [protected, virtual]

The optimize method may be used to evaluate constant expressions, or substitute more efficient expressions.

This is intended to be called by the translator:: expression_statement method, or similar, where the expression is in its final form, and will get no deeper. In other words, when all available information has been provided.

There is no default implementation, even though most optimize implementations return self(), because this gives the compiler no opportunity to remind the authors of new classes that they have forgotten something.

Returns:
If the expression tree is not constant, or it is already as reduced as it can get, it returns itself. Otherwise, it returns a new expression node.

Implements expression.

expression_logical_and_pretty& expression_logical_and_pretty::operator= ( const expression_logical_and_pretty  )  [private]

The assignment operator. Do not use.


Member Data Documentation

translator_pretty& expression_logical_and_pretty::pretty [private]

The pretty instance variable is used to remember where to send our beautiful source code.

Definition at line 65 of file pretty.h.


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 01:27:12 2007 for UCSDp-SystemCrossCompiler by  doxygen 1.5.1