Hoa central
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Hoa\Tree\Visitor\Generic Class Reference
Inheritance diagram for Hoa\Tree\Visitor\Generic:

Public Member Functions

 __construct ($order=self::PRE_ORDER)
 
 getOrder ()
 

Public Attributes

const PRE_ORDER = 0
 
const IN_ORDER = 1
 
const POST_ORDER = 2
 

Protected Member Functions

 setOrder ($order)
 

Protected Attributes

 $_order = self::PRE_ORDER
 

Detailed Description

Class .

Abstract tree visitor.

Definition at line 47 of file Generic.php.

Constructor & Destructor Documentation

Hoa\Tree\Visitor\Generic::__construct (   $order = self::PRE_ORDER)

Build the visitor and set the traversal order.

Parameters
int$orderTraversal order (please, see the self::*_ORDER constants).
Returns
void

Definition at line 86 of file Generic.php.

87  {
88  $this->setOrder($order);
89 
90  return;
91  }

Here is the call graph for this function:

Member Function Documentation

Hoa\Tree\Visitor\Generic::getOrder ( )

Get the traversal order.

Returns
int

Definition at line 113 of file Generic.php.

114  {
115  return $this->_order;
116  }

Here is the caller graph for this function:

Hoa\Tree\Visitor\Generic::setOrder (   $order)
protected

Set the traversal order.

Parameters
int$orderTraversal order (please, see the self::*_ORDER constants).
Returns
int

Definition at line 100 of file Generic.php.

101  {
102  $old = $this->_order;
103  $this->_order = $order;
104 
105  return $old;
106  }

Here is the caller graph for this function:

Member Data Documentation

Hoa\Tree\Visitor\Generic::$_order = self::PRE_ORDER
protected

Definition at line 75 of file Generic.php.

const Hoa\Tree\Visitor\Generic::IN_ORDER = 1

In-order traversal.

int

Definition at line 61 of file Generic.php.

const Hoa\Tree\Visitor\Generic::POST_ORDER = 2

Post-order traversal.

int

Definition at line 68 of file Generic.php.

const Hoa\Tree\Visitor\Generic::PRE_ORDER = 0

Pre-order traversal.

int

Definition at line 54 of file Generic.php.


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