Hi On Sat, Oct 27, 2012 at 9:45 PM, Martin Dobias <[email protected]> wrote: > On Sat, Oct 27, 2012 at 7:37 PM, Tim Sutton <[email protected]> wrote: >>>> >>>> while myProvider.nextFeature(myFeature): # or equivalent in new api >>>> myGeometry = myFeature.geometry() >>>> myFooValue = myFeature['foo'] >>>> .... do stuff ..... >>> >>> Good news, that's on the branch already ;-) >> >> Wohooo! Does that work for C++ api too? > > For now the support for attribute fetching by field name is like this: > value = feature.attribute("foo"); > But I guess there's no problem to implement operator[], too: > value = feature["foo"]; >
() is fine - I more meant does the concept work in C++. Great improvement! Regards Tim > Martin -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) ============================================== Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net ============================================== _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
