[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using the private implementation ("pimpl") patter
Re: [Discuss-gnuradio] Using the private implementation ("pimpl") pattern for GNU Radio API classes
Tue, 13 Mar 2012 08:12:18 -0700
On Tue, Mar 13, 2012 at 01:10, Martin Braun <address@hidden> wrote:
>> However, some implementation details (sorry) we think need to change.
>> Currently, the blocks following this pattern have a public header file
>> based on the block class name, like gr_foo_ff.h, which contains the
>> pure virtual class and nothing else. Secondly, there exists the
>> implemention class, gr_foo_ff.cc, which contains both the
>> gr_foo_ff_impl class declaration and gr_foo_ff_impl member
>> Having a class header file inside a .cc file, and then having the name
>> of the .cc file be different from the classes that are inside it,
>> makes it less readable. Tom and I are proposing, if we do go to a
>> project-wide pimpl pattern, to have:
> This might seem minor, but I like the first naming scheme you proposed
> much better than the second (gr_foo_ff_impl > gr_foo_impl_ff).
> I think of 'foo_ff' as the block name, which would be disrupted, and an
> intuitive glob for impl-header-files is (in my head) "*impl.h".
After typing and proofing that long email, it's funny that I could
leave in such a mistake.
It was intended that the filenames listed in the three lines be the
same as the class names two paragraphs above, that was the whole
point. So yes, exactly as you said.
Thanks for the feedback.