Pimpl idiom, multiple Inheritance and facet pattern
summary
C++11 library uses a shared_ptr pimpl with get_ptr downcast to make public objects immutable and shareable across containers, and it supports multiple inheritance with factory build functions returning private shared_ptr. Measured overhead is explicit: about 2x slower for direct access and 3x slower when downcasting to subclasses, which is acceptable because objects are constructed once. A facet pattern restricts which methods are visible per analysis view (by patient or by location) and the system works in production for clinical-data analysis.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:02The solution
- 1:31Pimpl
- 2:08Present class relationships
- 3:09Simple Inheritance
- 5:18facet pattern
related talks
01h 05mExpressing Implementation Sameness and Similarity - Polymorphism in Modern C++
05mLightning Talk: Is Polymorphism in C++ Really That Bad?
08mPolymorphic Task
11mAnatomy of a Smart Pointer
01h 01mC++ Mixins
50mBack to Basics: Smart Pointers and RAII
45mBetter C++14 reflections
01h 04mAbstraction Patterns for Cross Platform Development Using C++
