[Qgis-developer] Better getNextFeature in vector providers

Mateusz Łoskot mateusz at loskot.net
Mon Mar 20 04:52:04 EST 2006


Martin Dobias wrote:
> On 3/18/06, Brendan Morley <morb at beagle.com.au> wrote:
> 
>> Finally Mateusz, QVariant can have user variants - therefore I'm 
>> not sure if the refactoring of getNextFeature is a good enough 
>> reason to drag in the "boost" dependency.
> 
> 
> I guess that Mateusz meant that only one header from boost would be 
> needed, not the whole library.

Yes, but I meant the only one is needed to be included - any.hpp.
But any.hpp includes 4-5 others from Boost.
So, there is a need to keep all Boost's header available, but no binary
lib has to be linked to use boost::any type.

> However after some thinking and looking in QVariant sources, I don't
> think that we really need something like boost::any and that QVariant
> will suffice - I didn't find any inefficiencies in the
> implementation. The second reason is that we should prefer Qt classes
> to make the code as consistent as possible.


OK, in this case it's more a matter of taste.
Simply, I'd choose Boost as I'm STL/C++ purist.

But I don't agree that Boost would make code inconsistent.
If you think so, why don't you replace all STL's containers
with QVector and QList?

STL is a part of C++ library, Boost is a kind of incubator for future
STL features. Boost is high quality professional library and I can't
understand why people are affraid of it so much.
Because of "dependency"?
IMHO There is no sense to abandon highly usable library because it could
introduce new dependency :-)

Just for sharing my opinion.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net




More information about the Qgis-developer mailing list