#include <nodevisitor.h>
Inheritance diagram for DepthVisitor:
Public Types | |
typedef DepthVisitor< _TContent, _TIter > | _Self |
typedef NodeVisitor< typename _TIter::const_iterator, const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > > | _Base |
Public Methods | |
DepthVisitor () | |
virtual _Self * | construct () const |
virtual _Self * | clone () const |
virtual void | operator() (_TIter &iter) |
Start the measurement process. | |
virtual void | visitNormalNode (const NormalNode< _TContent > *node) |
Take a NormalNode and calculate depth. | |
virtual void | visitRootNode (const RootNode< _TContent > *node) |
Take a RootNode and calculate depth. | |
virtual int | getDepth () |
Protected Methods | |
DepthVisitor (const DepthVisitor &cv) | |
void | measure (const Node< _TContent > *node) |
Take a Node and calculate depth. | |
Protected Attributes | |
int | m_curDepth |
int | m_maxDepth |
const Node< _TContent > * | m_curParent |
bool | m_isLeave |
Definition at line 251 of file nodevisitor.h.
|
Reimplemented from NodeVisitor< _TIter::const_iterator, const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > >. Definition at line 259 of file nodevisitor.h. Referenced by DepthVisitor::DepthVisitor(). |
|
Reimplemented from NodeVisitor< _TIter::const_iterator, const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > >. Definition at line 256 of file nodevisitor.h. Referenced by DepthVisitor::clone(), and DepthVisitor::construct(). |
|
Definition at line 262 of file nodevisitor.h. References DepthVisitor::_Base, DepthVisitor::m_curDepth, DepthVisitor::m_curParent, DepthVisitor::m_isLeave, and DepthVisitor::m_maxDepth. |
|
Definition at line 276 of file nodevisitor.h. References DepthVisitor::_Base. |
|
Definition at line 267 of file nodevisitor.h. References DepthVisitor::_Self. |
|
Definition at line 266 of file nodevisitor.h. References DepthVisitor::_Self. |
|
Definition at line 273 of file nodevisitor.h. References DepthVisitor::m_maxDepth. Referenced by Node::getDepth(). |
|
Take a Node and calculate depth.
Definition at line 536 of file nodevisitor.h. References Node::getNumChildren(), Node::getParent(), DepthVisitor::m_curDepth, DepthVisitor::m_curParent, DepthVisitor::m_isLeave, and DepthVisitor::m_maxDepth. Referenced by DepthVisitor::visitNormalNode(), and DepthVisitor::visitRootNode(). |
|
Start the measurement process.
Definition at line 500 of file nodevisitor.h. References NodeVisitor< _TIter::const_iterator, const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > >::init(), NodeVisitor< _TIter::const_iterator, const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > >::iterate(), DepthVisitor::m_curDepth, DepthVisitor::m_curParent, DepthVisitor::m_isLeave, and DepthVisitor::m_maxDepth. |
|
Take a NormalNode and calculate depth.
Definition at line 516 of file nodevisitor.h. References DepthVisitor::measure(). |
|
Take a RootNode and calculate depth.
Definition at line 526 of file nodevisitor.h. References DepthVisitor::measure(). |
|
Definition at line 279 of file nodevisitor.h. Referenced by DepthVisitor::DepthVisitor(), DepthVisitor::measure(), and DepthVisitor::operator()(). |
|
Definition at line 281 of file nodevisitor.h. Referenced by DepthVisitor::DepthVisitor(), DepthVisitor::measure(), and DepthVisitor::operator()(). |
|
Definition at line 282 of file nodevisitor.h. Referenced by DepthVisitor::DepthVisitor(), DepthVisitor::measure(), and DepthVisitor::operator()(). |
|
Definition at line 280 of file nodevisitor.h. Referenced by DepthVisitor::DepthVisitor(), DepthVisitor::getDepth(), DepthVisitor::measure(), and DepthVisitor::operator()(). |