C++ plans? (Re: r23706 - gnucash/trunk/src/register/ledger-core - Bug 721791)

Derek Atkins warlord at MIT.EDU
Wed Jan 22 09:44:25 EST 2014


John Ralls <jralls at ceridwen.us> writes:

> One other thing: I’m inclined to write any class that contributes to
> the engine’s public API (which I intend should be much smaller than it
> is now) to use PImpl; the pointer class will be passed as a shared_ptr
> (i.e., reference counted like GObjects are supposed to be but mostly
> aren’t in GnuCash) holding a unique_ptr to the private implementation
> object. Do you have any thoughts about that?

I'm not 100% sure what "PImpl" is per-se..  But I'm fine with using
shared_ptr<> for all object-passing/storage.  I was imaginging that we
would use real C++ class inheritence for the core object classes
themselves.  For example I would have implemented a QofQueriable
interface (virtual abstract) class and had all objects inherit from
that.

> Regards,
> John Ralls

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list