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

BinaryOperator Class Reference

Binary operator. More...

#include <stree.h>

Inheritance diagram for BinaryOperator:

Ternary List Node

Public Member Functions

 BinaryOperator (string oname, Node *statement2, Node *statement3)
 Constructor.

 BinaryOperator (Node *ioperator, Node *statement2, Node *statement3)
virtual ostream & php (ostream &os) const
 Writes node to the stream as php.

virtual Nodecopy () const
 Copies the node.

virtual string evaluate (const NameSpace &nameSpace) const
 Computes the value of the expression (only basic atihmetic and string operations).


Detailed Description

Binary operator.

The name of the operator is given by oname.

Definition at line 654 of file stree.h.


Constructor & Destructor Documentation

BinaryOperator::BinaryOperator string  oname,
Node statement2,
Node statement3
 

Constructor.

Definition at line 645 of file stree.cpp.

References CBinaryOperator.

Referenced by copy().

BinaryOperator::BinaryOperator Node ioperator,
Node statement2,
Node statement3
 

Definition at line 647 of file stree.cpp.

References CBinaryOperator.


Member Function Documentation

Node * BinaryOperator::copy  )  const [virtual]
 

Copies the node.

Reimplemented from Ternary.

Definition at line 655 of file stree.cpp.

References BinaryOperator(), Ternary::getStatement1(), Ternary::getStatement2(), and Ternary::getStatement3().

string BinaryOperator::evaluate const NameSpace nameSpace  )  const [virtual]
 

Computes the value of the expression (only basic atihmetic and string operations).

Reimplemented from List.

Definition at line 659 of file stree.cpp.

References boolToString(), Node::evaluate(), Ternary::getStatement1(), Ternary::getStatement2(), Ternary::getStatement3(), intToString(), stringToBool(), and stringToInt().

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

Writes node to the stream as php.

Reimplemented from Ternary.

Definition at line 650 of file stree.cpp.

References Ternary::getStatement1(), Ternary::getStatement2(), and Ternary::getStatement3().


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