FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
#include <cpptools/tree_bfs_explorer.h>
Public Member Functions | |
TreeBfsExplorer () | |
void | begin (NODE *node=nullptr) |
Prepares exploration to start from tree node . More... | |
void | goNext () |
Move exploration to the next tree node. More... | |
bool | atEnd () const |
Is exploration beyond the last tree node (ended) ? More... | |
NODE * | current () const |
Current explored tree node. More... | |
unsigned | depth () const |
Depth of the current tree node. More... | |
Generic class for the exploration of trees using BFS (breadth-first search) algorithm
TREE_MODEL type must be a model of TreeBfsConcept :
cpp::TreeBfsExplorer< NODE, TREE_MODEL >::TreeBfsExplorer | ( | ) |
bool cpp::TreeBfsExplorer< NODE, TREE_MODEL >::atEnd | ( | ) | const |
Is exploration beyond the last tree node (ended) ?
void cpp::TreeBfsExplorer< NODE, TREE_MODEL >::begin | ( | NODE * | node = nullptr | ) |
Prepares exploration to start from tree node
.
NODE * cpp::TreeBfsExplorer< NODE, TREE_MODEL >::current | ( | ) | const |
Current explored tree node.
unsigned cpp::TreeBfsExplorer< NODE, TREE_MODEL >::depth | ( | ) | const |
Depth of the current tree node.
void cpp::TreeBfsExplorer< NODE, TREE_MODEL >::goNext | ( | ) |
Move exploration to the next tree node.