Ticket #10996 (closed enhancement: fixed)
XRC reorganisation
| Reported by: | steve_lamerton | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9.5 |
| Component: | XRC | Version: | 2.9-svn |
| Keywords: | XRC dependencies | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: | 10384, 10384, 10889, 10889, 12058, 12058, 12058, 13520 |
Description
I have finally started work on the patch to reorganise XRC to reduce dependencies based off the discussion on ticket #10889 and on wx-dev. I haven't managed to do much work yet but I had a couple of questions and I figured it was easier to put the code up, makes it easier to see what I am talking about.
So the questions I have so far:
1. Does it really make sense to just rename the existing xmlres.[h/cpp] to xmlresimpl.[h/cpp] considering it is really only the handler that has changed? Or perhaps leave it like it was and xmlresourcehandler in a new file called xmlreshndl? This would mean that all of the includes for the handlers would need to change though, not that that is a big problem, and it would make this huge patch much smaller and more readable.
2. I am not sure that the naming makes any sense at the moment. There is an ABC called wxXmlResourceHandler that defines a bare minimum of functions whoch would need to be overridden to create an XRC handler, plus a new method called GetImplementation which passes a pointer to a wxXmlResourceHandlerImpl. As wxXmlResourceHandlerImpl is actually just a helper class (it is not derived from wxXmlResourceHandler) does it really make sense to call it an implementation? It is more of a helper class at the moment.
3. I am not sure that I am going about the GetImplementation bit correctly, it will require all of the the calls made by the handlers to change, for example from GetBitmap() to GetImplementation->GetBitmap(). Was this what people were thinking of on the wx-dev discussion?
Thanks in advance

