[mapguide-internals] ServerRenderingService API bloated

Steve Dang steve.dang at autodesk.com
Thu Mar 19 00:12:08 EDT 2009


It's because SWIG did not support default arguments at that time (a few years ago). It may do now.

Steve.

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of UV
Sent: Wednesday, March 18, 2009 9:39 PM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] ServerRenderingService API bloated

For clarification:
Is there a platform with a stupid compiler that does not understand C++ 
default arguments?

Or is there another particular reason why the ServerRenderingService 
does not use default arguments  but instead provides 3 method signatures?

Its such a hazzle to read through all this code to find out eventually 
that its simply default arguments which have not been implemented as 
such.....


    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    CREFSTRING format);

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    CREFSTRING format,
                                    bool bKeepSelection);

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    CREFSTRING format,
                                    bool bKeepSelection,
                                    bool bClip);

instead of

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    CREFSTRING format,
                                    bool bKeepSelection =true ,
                                    bool bClip=false);



and again here

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    MgCoordinate* center,
                                    double scale,
                                    INT32 width,
                                    INT32 height,
                                    MgColor* backgroundColor,
                                    CREFSTRING format);

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    MgCoordinate* center,
                                    double scale,
                                    INT32 width,
                                    INT32 height,
                                    MgColor* backgroundColor,
                                    CREFSTRING format,
                                    bool bKeepSelection);

    virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    MgCoordinate* center,
                                    double scale,
                                    INT32 width,
                                    INT32 height,
                                    MgColor* backgroundColor,
                                    CREFSTRING format,
                                    bool bKeepSelection,
                                    bool bClip);
instead of

virtual MgByteReader* RenderMap(MgMap* map,
                                    MgSelection* selection,
                                    MgCoordinate* center,
                                    double scale,
                                    INT32 width,
                                    INT32 height,
                                    MgColor* backgroundColor,
                                    CREFSTRING format,
                                    bool bKeepSelection = true,
                                    bool bClip= false);

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals


More information about the mapguide-internals mailing list