A simple functor to count the number of particles in a hierarchy.
This is a good example of a simple HierarchyVisitor.
Inheritance diagram for IMP::core::HierarchyCounter:Public Member Functions | |
| unsigned int | get_count () const |
| Return how many nodes have been visited. | |
| bool | operator() (Hierarchy) |
| Increment the counter. | |
| void | show (std::ostream &out=std::cout) const |
| unsigned int IMP::core::HierarchyCounter::get_count | ( | ) | const |
Return how many nodes have been visited.
|
virtual |
Increment the counter.
Implements IMP::core::HierarchyVisitor.