[wx-dev] pImpl file layout

Stefan Csomor csomor at advancedconcepts.ch
Mon Jun 23 23:37:33 PDT 2008


Hi Vadim

On 23.06.08 20:48, "Vadim Zeitlin" <vadim at wxwidgets.org> wrote:

> On Mon, 23 Jun 2008 19:16:06 +0200 Stefan Csomor <csomor at advancedconcepts.ch>
> wrote:
> 
> SC> > SC> src/osx/window.cpp
> SC> > SC> src/osx/carbon/windowi.cpp
> SC> > SC> src/osx/cocoa/windowi.cpp
> SC> > 
> SC> >  This doesn't seem very intelligible to me... If we use a suffix, I'd
> use
> SC> > "impl" or "_impl" to make it clear what does it mean. Alternatively, we
> SC> > could use "window.cpp" for the implementation files and window_osx.cpp
> for
> SC> > the first one, which would be more clear too IMO, even if a bit
> redundant.
> SC> 
> SC> impl for me would be fine, the window_osx.cpp would be fine for me as
> well,
> 
>  BTW, I wonder if your changes are very Mac-specific or could be applied at
> wxWindowBase level too (maybe not now but later)?

they might be, if we'd go the pImpl route, for other ports as well, there
still are quite a few 'common peculiarities' to all mac ports, but of course
the can be bracketed out again.
 
>  I also forgot to ask if it's going to be possible (maybe not for
> window.cpp but for some other file and maybe not right now but in the
> future) to use both Carbon and Cocoa version of the file in the same
> application? If we want to allow this we would have no choice but to use

the cocoa files would always ending in .mm so hybrids would still be
possible with the window_osx.cpp, carbon/window.cpp, cocoa/window.mm
approach

> SC> don't you think that this might lead to confusion as in all other ports
> SC> window.cpp is the next level in the platform dir?
>  
>  Yes, this is true but OTOH no other platform directories have any
> subdirectories anyhow so in any case Mac uses a somewhat different file
> organization. So IMO this is not a big problem.
> 
>  Of course, there is also the possibility to just use window.cpp for all
> file names, the next bakefile release should support this. But it still
> risks confusing people, if not the compiler, so I don't like it very much.

me neither, also the xcode debugger gets into trouble, with these, and I
still rembmer the pain I had with CodeWarrior because of the same-name issue

Thanks,

Stefan





More information about the wx-dev mailing list