Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

Binary Class Reference

A node with two children. More...

#include <streenamedlist.h>

Inheritance diagram for Binary:

List Node ArrayOperator ArrayPair Case Const Declare Do MapOperator ObjectOperator PostUnaryOperator SmartyAssign Switch UnaryOperator While

Public Member Functions

 Binary (string name, Node *statement1, Node *statement2)
 Creates Binary with given name and children.

NodegetStatement1 ()
 Returns the first child of the node.

NodegetStatement2 ()
 Returns the second child of the node.

const NodegetStatement1 () const
 Returns the first child of the node.

const NodegetStatement2 () const
 Returns the second child of the node.

virtual ostream & php (ostream &os) const
 Writes node to the stream as php.

virtual Nodecopy () const
 Copies the node.


Detailed Description

A node with two children.

Definition at line 44 of file streenamedlist.h.


Constructor & Destructor Documentation

Binary::Binary string  name,
Node statement1,
Node statement2
 

Creates Binary with given name and children.

Definition at line 43 of file streenamedlist.cpp.

References List::push_back().

Referenced by copy().


Member Function Documentation

Node * Binary::copy  )  const [virtual]
 

Copies the node.

Reimplemented from List.

Reimplemented in While, Do, Switch, SmartyAssign, Declare, Const, Case, UnaryOperator, PostUnaryOperator, ArrayPair, ObjectOperator, ArrayOperator, and MapOperator.

Definition at line 64 of file streenamedlist.cpp.

References Binary(), List::getName(), getStatement1(), and getStatement2().

const Node * Binary::getStatement1  )  const
 

Returns the first child of the node.

Definition at line 56 of file streenamedlist.cpp.

Node * Binary::getStatement1  ) 
 

Returns the first child of the node.

Definition at line 48 of file streenamedlist.cpp.

Referenced by copy(), MapOperator::copy(), ArrayOperator::copy(), ObjectOperator::copy(), ArrayPair::copy(), PostUnaryOperator::copy(), UnaryOperator::copy(), Case::copy(), Const::copy(), Declare::copy(), SmartyAssign::copy(), Switch::copy(), Do::copy(), While::copy(), PostUnaryOperator::evaluate(), UnaryOperator::evaluate(), SmartyAssign::getVariable(), php(), MapOperator::php(), ArrayOperator::php(), ObjectOperator::php(), ArrayPair::php(), PostUnaryOperator::php(), UnaryOperator::php(), Case::php(), Const::php(), Declare::php(), Switch::php(), Do::php(), and While::php().

const Node * Binary::getStatement2  )  const
 

Returns the second child of the node.

Definition at line 57 of file streenamedlist.cpp.

Node * Binary::getStatement2  ) 
 

Returns the second child of the node.

Definition at line 52 of file streenamedlist.cpp.

Referenced by copy(), MapOperator::copy(), ArrayOperator::copy(), ObjectOperator::copy(), ArrayPair::copy(), PostUnaryOperator::copy(), UnaryOperator::copy(), Case::copy(), Const::copy(), Declare::copy(), SmartyAssign::copy(), Switch::copy(), Do::copy(), While::copy(), PostUnaryOperator::evaluate(), UnaryOperator::evaluate(), SmartyAssign::getAssignment(), php(), MapOperator::php(), ArrayOperator::php(), ObjectOperator::php(), ArrayPair::php(), PostUnaryOperator::php(), UnaryOperator::php(), Case::php(), Const::php(), Declare::php(), Switch::php(), Do::php(), and While::php().

ostream & Binary::php ostream &  os  )  const [virtual]
 

Writes node to the stream as php.

Reimplemented from List.

Reimplemented in While, Do, Switch, SmartyAssign, Declare, Const, Case, UnaryOperator, PostUnaryOperator, ArrayPair, ObjectOperator, ArrayOperator, and MapOperator.

Definition at line 59 of file streenamedlist.cpp.

References List::getName(), getStatement1(), and getStatement2().


The documentation for this class was generated from the following files:
Generated on Fri Nov 21 17:54:06 2003 for PHPX by doxygen 1.3.3