MathParser\Interpreting\Visitors\Visitable Interface Reference

Visitable interface,. More...

Inheritance diagram for MathParser\Interpreting\Visitors\Visitable:
MathParser\Parsing\Nodes\Node MathParser\Parsing\Nodes\ConstantNode MathParser\Parsing\Nodes\ExpressionNode MathParser\Parsing\Nodes\FunctionNode MathParser\Parsing\Nodes\IntegerNode MathParser\Parsing\Nodes\NumberNode MathParser\Parsing\Nodes\PostfixOperatorNode MathParser\Parsing\Nodes\RationalNode MathParser\Parsing\Nodes\SubExpressionNode MathParser\Parsing\Nodes\VariableNode

Public Member Functions

 accept (Visitor $visitor)
 Single function in the Visitable interface. More...
 

Detailed Description

Visitable interface,.

Part of the visitor design pattern implementation. Every Node implements the Visitable interface, containing the single function accept()

Implemented by the (abstract) Node class.

Example

$node = new ExpressionNode(1, '+', 2);
$visitor = new TreePrinter(); // Or any other Visitor
$node->accept();

Member Function Documentation

MathParser\Interpreting\Visitors\Visitable::accept ( Visitor  $visitor)

The documentation for this interface was generated from the following file: