The tree's node class. More...
#include <expression_tree.h>
Public Member Functions | |
node (node< T, CachingPolicy, ThreadingPolicy > *parent=0) | |
Default constructor. | |
node (const node< T, CachingPolicy, ThreadingPolicy > &other) | |
Copy constructor. | |
node< T, CachingPolicy, ThreadingPolicy > & | operator= (const node< T, CachingPolicy, ThreadingPolicy > &other) |
Assignment operator. | |
node< T, CachingPolicy, ThreadingPolicy > & | operator= (const T &t) |
Assign a value to this node. | |
node< T, CachingPolicy, ThreadingPolicy > & | operator= (const T *t) |
Assign a pointer to this node. | |
node< T, CachingPolicy, ThreadingPolicy > & | operator= (const typename detail::operation< T >::t &f) |
Assign an operation to this node. | |
node< T, CachingPolicy, ThreadingPolicy > & | left () |
This node's left child. | |
node< T, CachingPolicy, ThreadingPolicy > & | right () |
This node's right child. | |
bool | constant () const |
Constness of this node. | |
T | evaluate () const |
Evaluates the value of this node. | |
void | grow () |
Called when this node is assigned to. | |
The tree's node class.
This class stores a pointer to its implementation. The implementation node's type is derived at runtime when it is assigned to.
|
inline |
Default constructor.
parent | Pointer to this node's parent. |
|
inline |
Called when this node is assigned to.
Recursively notifies parent nodes of the growth that happened.
|
inline |
This node's left child.
Note that if this node is a leaf node, behavior is undefined.
|
inline |
Assign a value to this node.
The assignment of a T
designates this node as a leaf node. A leaf can still be changed to a branch by assigning an operation to it.
|
inline |
Assign a pointer to this node.
The assignment of a T*
designates this node as a leaf node. A leaf can still be changed to a branch by assigning an operation to it.
|
inline |
Assign an operation to this node.
The assignment of an operation designates this node as a branch. A branch can still be changed to a leaf by assigning data to it.
|
inline |
This node's right child.
Note that if this node is a leaf node, behavior is undefined.