Re: Platform code in XP code

From: J.M. Maurer <uwog_at_uwog.net>
Date: Fri Nov 02 2007 - 02:19:33 CET

On Thu, 2007-11-01 at 10:31 -0500, Ryan Pavlik wrote:
> This and the synchronizer.* in TCP backend are the only IFDEF's like
> this that could be re-done in a better way, I think. The ideal design
> solution for the TCP backend is to subclass the synchronizer on each
> platform, I think. Given that here we only have two calls being
> ifdef'ed (both in constructor-like situations), I am not sure what the
> best way to clean this up is. IIRC, this is a testing file only, correct?

This file is indeed for abicollab debugging purposes only, so it doesn't
matter too much.

Marc

>
> Hubert Figuiere wrote:
> > Hi,
> >
> > I have to seriously disagree with this way of doing the platform code.
> >
> > #ifdef is not the right way.
> >
> > Hub
> >
> >
> >> Fix AbiCollab build on Windows. That was easier than I expected!
> >>
> >> Modified: abiword-plugins/trunk/tools/abicollab/core/session/xp/AbiCollab_Command.cpp
> >> ===================================================================
> >> --- abiword-plugins/trunk/tools/abicollab/core/session/xp/AbiCollab_Command.cpp 2007-11-01 00:06:25 UTC (rev 22271)
> >> +++ abiword-plugins/trunk/tools/abicollab/core/session/xp/AbiCollab_Command.cpp 2007-11-01 03:42:08 UTC (rev 22272)
> >> @@ -29,9 +29,15 @@
> >> #include "xap_App.h"
> >> #include "xap_Frame.h"
> >>
> >> +#ifndef WIN32
> >> #include "ap_UnixApp.h"
> >> //#include "gr_UnixNullGraphics.h"
> >> #include "ap_UnixFrame.h"
> >> +
> >> +#else
> >> +// any windows stuff needed here?
> >> +
> >> +#endif
> >> #include "gr_DrawArgs.h"
> >>
> >> #ifdef ABICOLLAB_HANDLER_FAKE
> >> @@ -46,7 +52,12 @@
> >> : m_argv(argv)
> >> {
> >> XAP_App* pApp = XAP_App::getApp ();
> >> +
> >> + #ifndef WIN32
> >> pApp->getGraphicsFactory()->registerAsDefault(GRID_UNIX_NULL, true);
> >> + #else
> >> + pApp->getGraphicsFactory()->registerAsDefault(GRID_WIN32_UNISCRIBE, true);
> >> + #endif
> >> }
> >>
> >>
> >>
> >> -----------------------------------------------
> >> To unsubscribe from this list, send a message to
> >> abisource-cvs-commit-request@abisource.com with the word
> >> unsubscribe in the message body.
> >>
> >
> >
> >
>
>
Received on Fri Nov 2 02:21:52 2007

This archive was generated by hypermail 2.1.8 : Fri Nov 02 2007 - 02:21:52 CET