tipc
A TIP to LLVM compiler
Public Member Functions | Public Attributes | List of all members
PreOrderIterator Class Reference

An iterator implementation for a depth-first, pre-order, transversal. More...

#include <PreOrderIterator.h>

Inheritance diagram for PreOrderIterator:
Inheritance graph
[legend]
Collaboration diagram for PreOrderIterator:
Collaboration graph
[legend]

Public Member Functions

 PreOrderIterator (SyntaxTree const &tree, bool end)
 
 ~PreOrderIterator () override
 
SyntaxTree operator* () override
 
void operator++ () override
 
SyntaxTreeoperator-> () override
 
bool operator== (const IteratorImpl &rhs) const override
 
bool operator!= (const IteratorImpl &rhs) const override
 
IteratorImplclone () override
 
- Public Member Functions inherited from IteratorImpl
 IteratorImpl (SyntaxTree const &tree)
 
virtual ~IteratorImpl ()
 
SyntaxTree const & get_tree () const
 

Public Attributes

std::stack< SyntaxTreestack
 

Additional Inherited Members

- Protected Attributes inherited from IteratorImpl
SyntaxTree const & tree
 

Detailed Description

An iterator implementation for a depth-first, pre-order, transversal.

Constructor & Destructor Documentation

◆ PreOrderIterator()

PreOrderIterator::PreOrderIterator ( SyntaxTree const &  tree,
bool  end 
)
explicit

◆ ~PreOrderIterator()

PreOrderIterator::~PreOrderIterator ( )
overridedefault

Member Function Documentation

◆ clone()

IteratorImpl * PreOrderIterator::clone ( )
overridevirtual

Implements IteratorImpl.

◆ operator!=()

bool PreOrderIterator::operator!= ( const IteratorImpl rhs) const
overridevirtual

Implements IteratorImpl.

◆ operator*()

SyntaxTree PreOrderIterator::operator* ( )
overridevirtual

Implements IteratorImpl.

◆ operator++()

void PreOrderIterator::operator++ ( )
overridevirtual

Implements IteratorImpl.

◆ operator->()

SyntaxTree * PreOrderIterator::operator-> ( )
overridevirtual

Implements IteratorImpl.

◆ operator==()

bool PreOrderIterator::operator== ( const IteratorImpl rhs) const
overridevirtual

Implements IteratorImpl.

Member Data Documentation

◆ stack

std::stack<SyntaxTree> PreOrderIterator::stack

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