Skip to content

Privatize NewFilterParticleAdvection::DoExecute

Li-Ta Lo requested to merge ollielo/vtk-m:privatize_do_execute into master

The design of the NewFilter interface loosely follow the Non-Virtual Interface pattern

https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Non-Virtual_Interface

The DoExecute and DoExecutePartition are supposed to be overridden by subclasses and be private. The only occasion for them to be protected is when a subclass is further extended and the sub-subclasses needs to call the subclass' DoExecute, e.g. Contour and Slice.

In this particular case, making NewFilterParticleAdvection::DoExecute private also ensure that subclass' DoExecutePartition will not accidentally call NewFilterParticleAdvection::DoExecute without overriding it first, which will result in infinite recursion (since NewFilterParticleAdvection::DoExecute calls DoExecutePartition.

Merge request reports