Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK-m VTK-m
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 205
    • Issues 205
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTK-mVTK-m
  • Merge requests
  • !2831

Privatize NewFilterParticleAdvection::DoExecute

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Li-Ta Lo requested to merge ollielo/vtk-m:privatize_do_execute into master Aug 03, 2022
  • Overview 3
  • Commits 1
  • Pipelines 2
  • Changes 1

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: privatize_do_execute