MADARA  3.1.8
madara::expression::ExpressionTreeIteratorFactory Class Reference

Implementation of a factory pattern that dynamically allocates the appropriate ExpressionTreeIteratorImpl object. More...

Collaboration diagram for madara::expression::ExpressionTreeIteratorFactory:

Public Member Functions

 ExpressionTreeIteratorFactory (void)
 Constructor. More...
 
ExpressionTreeIteratorImplmake_tree_iterator (ExpressionTree &tree, const std::string &traversal_order, bool end_iter)
 Dynamically allocate a new ExpressionTreeIteratorImpl object based on the designated traversal_order and end_iter. More...
 

Private Types

typedef ::std::map< std::string, TRAVERSAL_PTMFTRAVERSAL_MAP
 
typedef ExpressionTreeIteratorImpl *(ExpressionTreeIteratorFactory::* TRAVERSAL_PTMF) (ExpressionTree &tree, bool end_iter)
 

Private Member Functions

ExpressionTreeIteratorImplmake_in_order_tree_iterator (ExpressionTree &tree, bool end_iter)
 Dynamically allocate a new ExpressionTreeLevelOrderIteratorImpl object based on the designated end_iter. More...
 
ExpressionTreeIteratorImplmake_level_order_tree_iterator (ExpressionTree &tree, bool end_iter)
 Dynamically allocate a new ExpressionTreeLevelOrderIteratorImpl object based on the designated end_iter. More...
 
ExpressionTreeIteratorImplmake_post_order_tree_iterator (ExpressionTree &tree, bool end_iter)
 Dynamically allocate a new ExpressionTreePostOrderIteratorImpl object based on the designated end_iter. More...
 
ExpressionTreeIteratorImplmake_pre_order_tree_iterator (ExpressionTree &tree, bool end_iter)
 Dynamically allocate a new ExpressionTreePreOrderIteratorImpl object based on the designated end_iter. More...
 

Private Attributes

TRAVERSAL_MAP traversal_map_
 

Detailed Description

Implementation of a factory pattern that dynamically allocates the appropriate ExpressionTreeIteratorImpl object.

This is a variant of the Abstract Factory pattern that has a set of related factory methods but which doesn't use inheritance.

See also
ExpressionTreeLevelOrderIteratorImpl, ExpressionTreeInOrderIteratorImpl, ExpressionTreePreOrderIteratorImpl, and ExpressionTreePostOrderIteratorImpl.

Definition at line 49 of file ExpressionTree.cpp.

Member Typedef Documentation

Definition at line 84 of file ExpressionTree.cpp.

typedef ExpressionTreeIteratorImpl*(ExpressionTreeIteratorFactory::* madara::expression::ExpressionTreeIteratorFactory::TRAVERSAL_PTMF) (ExpressionTree &tree, bool end_iter)
private

Definition at line 83 of file ExpressionTree.cpp.

Constructor & Destructor Documentation

madara::expression::ExpressionTreeIteratorFactory::ExpressionTreeIteratorFactory ( void  )

Constructor.

Definition at line 91 of file ExpressionTree.cpp.

Member Function Documentation

madara::expression::ExpressionTreeIteratorImpl * madara::expression::ExpressionTreeIteratorFactory::make_in_order_tree_iterator ( ExpressionTree tree,
bool  end_iter 
)
private

Dynamically allocate a new ExpressionTreeLevelOrderIteratorImpl object based on the designated end_iter.

Definition at line 111 of file ExpressionTree.cpp.

madara::expression::ExpressionTreeIteratorImpl * madara::expression::ExpressionTreeIteratorFactory::make_level_order_tree_iterator ( ExpressionTree tree,
bool  end_iter 
)
private

Dynamically allocate a new ExpressionTreeLevelOrderIteratorImpl object based on the designated end_iter.

Definition at line 104 of file ExpressionTree.cpp.

madara::expression::ExpressionTreeIteratorImpl * madara::expression::ExpressionTreeIteratorFactory::make_post_order_tree_iterator ( ExpressionTree tree,
bool  end_iter 
)
private

Dynamically allocate a new ExpressionTreePostOrderIteratorImpl object based on the designated end_iter.

Definition at line 125 of file ExpressionTree.cpp.

madara::expression::ExpressionTreeIteratorImpl * madara::expression::ExpressionTreeIteratorFactory::make_pre_order_tree_iterator ( ExpressionTree tree,
bool  end_iter 
)
private

Dynamically allocate a new ExpressionTreePreOrderIteratorImpl object based on the designated end_iter.

Definition at line 118 of file ExpressionTree.cpp.

madara::expression::ExpressionTreeIteratorImpl * madara::expression::ExpressionTreeIteratorFactory::make_tree_iterator ( ExpressionTree tree,
const std::string &  traversal_order,
bool  end_iter 
)

Dynamically allocate a new ExpressionTreeIteratorImpl object based on the designated traversal_order and end_iter.

Definition at line 132 of file ExpressionTree.cpp.

Member Data Documentation

TRAVERSAL_MAP madara::expression::ExpressionTreeIteratorFactory::traversal_map_
private

Definition at line 86 of file ExpressionTree.cpp.


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