I think having a private class with its own header and source file makes sense if you want a private API that is big and/or complex.
But for a lot of classes the vtkInternals
will only contains a few vtkNew
s or smart pointers, maybe some ints, floats and strings etc, it will be overkill imho.
Both have their use cases:
- Private API (XXXPrivate.h + XXXPrivate.cxx) for complex cases with a full private API
- Nested
vtkInternals
for storing some members or for simple PIMPLs