I've gone through the link that you sent me and I currently understand how this helps and works to some extent, but I am not too sure of how I should start with converting the current interface to PIMPL design. I'm not used to this design pattern so its taking some time to sink in :) Say I start with the Clusterer class, I create a ClustererImpl class which is the internal class that Clusterer points to. But since Clusterer is abstract, and KMeans inherits from Clusterer, how do I maintain the inheritance and do the same for KMeans? Thanks. Regards, Richhiey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160818/6119d957/attachment-0001.html>
> Say I start with the Clusterer class, I create a ClustererImpl class which > is the internal class that Clusterer points to. But since Clusterer is > abstract, and KMeans inherits from Clusterer, how do I maintain the > inheritance and do the same for KMeans?I think the following links could serve as a reference: https://github.com/xapian/xapian/blob/master/xapian-letor/include/xapian-letor/feature.h https://github.com/xapian/xapian/tree/master/xapian-letor/feature Here `Feature` is an abstract base class. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160817/cc0d5bf6/attachment.html>
On 17 Aug 2016, at 20:07, Ayush Tomar <ayushtomar at gmail.com> wrote:> > Say I start with the Clusterer class, I create a ClustererImpl class which > > is the internal class that Clusterer points to. But since Clusterer is > > abstract, and KMeans inherits from Clusterer, how do I maintain the > > inheritance and do the same for KMeans? > > I think the following links could serve as a reference: > https://github.com/xapian/xapian/blob/master/xapian-letor/include/xapian-letor/feature.h > https://github.com/xapian/xapian/tree/master/xapian-letor/featureRichhiey ? based on Olly's comments on IRC, I think you should focus on getting something merged before looking further at cleaning up the public API. For instance, your PR is failing travis at the moment, which you should be able to fix. J