IMP logo
IMP Reference Guide  develop.e6c37e56ed,2022/01/25
The Integrative Modeling Platform
IMP::core::HierarchyCounter Struct Reference

A simple functor to count the number of particles in a hierarchy. More...

#include <IMP/core/Hierarchy.h>

+ Inheritance diagram for IMP::core::HierarchyCounter:

Detailed Description

A simple functor to count the number of particles in a hierarchy.

This is a good example of a simple HierarchyVisitor.

See Also
Hierarchy

Definition at line 421 of file core/Hierarchy.h.

Public Member Functions

unsigned int get_count () const
 Return how many nodes have been visited. More...
 
bool operator() (Hierarchy)
 Increment the counter. More...
 
void show (std::ostream &out=std::cout) const
 

Member Function Documentation

unsigned int IMP::core::HierarchyCounter::get_count ( ) const

Return how many nodes have been visited.

Definition at line 430 of file core/Hierarchy.h.

bool IMP::core::HierarchyCounter::operator() ( Hierarchy  )
virtual

Increment the counter.

Implements IMP::core::HierarchyVisitor.

Definition at line 425 of file core/Hierarchy.h.


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