On 11.12.2014 13:49, Bjoern Michaelsen wrote: > Pimpl > > (HXX): > > class AnotherThing; > class RealThing; > > struct Thing { > Thing(AnotherThing* pAnother); > void DoSomething() > { m_pImpl->DoSomething() } > void DoSomethingElse() > { m_pImpl->DoSomethingElse() } > ... > std::unique_ptr<RealThing> m_pImpl; > } > > (CXX): > > struct RealThing SAL_FINAL { > RealThing(AnotherThing* pAnother) > : m_pAnother(pAnother) {} > void DoSomething(); > void DoSomethingElse(); > AnotherThing* m_pAnother; > } > > Thing::Thing(AnotherThing* pAnother) > : m_pImpl(new(RealThing(pAnother))) > {} > > RealThing::DoSomething() > { .... } > RealThing::DoSomethingElse() > { .... }
forward every single method to a method of the pimpl class? i've never seen anybody do that; usually the pimpl class only has public members and "private" methods (that shouldn't be mentioned in the header file anyway) which is a bit simpler than your straw-man. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice