Skip to content

Make virtual functions protected consistently

Jacques Xing requested to merge CFD-Xing/nektar:feature/protected-virtual into master

Issue/feature addressed

Derived classes are frequently accessed through a base class pointer in the code. The template pattern provides a public API through the base class and provides virtual functions which can be overloaded in derived classes to specialise functionality. These virtual functions should not be publicly accessible themselves, but may need to be used explicitly by further derived classes in order to extend functionality and minimise code duplication. As such they should be made protected, rather than public or private.

Tests

Suggested reviewers

@ccantwel

Notes

Please add any other information that could be useful for reviewers.

Checklist

  • [ ] Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • [ ] Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Chris Cantwell

Merge request reports