Use of static var in MapScript mapObj.nextLabel

Frank Warmerdam warmerdam at POBOX.COM
Sat Jun 30 11:10:57 EDT 2007


Tamas Szekeres wrote:
> Isn't that exposing labelCacheMemberObj *getLabel(int i) along with
> numlabels are enough to perform the iteration? Why do we have to allow
> redundant approaches for the same thing?
> 
> In any case if we would eventually keep nextLabel I would prefer
> passing back something to the client rather than maintaining the state
> inside mapObj.
> 
> I hope that at least one TODO will disappear in RFC-15 with this addition.

Tamas,

As the "Ghost of Backward Compatability" I'd rather not get rid of
getNextLabel() if it is in significant use without a very serious reason.
We might however make an effort to deprecate it in favor of getLabel(int i).

Daniel,

It seems to me that the right place for last_label_read would be
in labelCacheObj.  I think making this non-static is a valuable improvement.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list