[fdo-users] FdoGeometryType: bug due to enum values

VJ jorg.verstraete at telin.ugent.be
Wed Apr 8 03:44:06 EDT 2009


Hello,

I noticed that the FdoGeometryType is an enum, where 
FdoPoint = 1 (00000001)
FdoLineString = 2 (00000010)
FdoPolygon = 3 (00000011)
...

Now, consider FdoGeometricPropertyDefinition::GetGeometryTypes(). The description says "Gets the FdoGeometricTypes that can be stored in this geometric property. The returned value may be any combination of the values from the FdoGeometricType enumeration combined via a bit-wise or operation."

If the allowed types are FdoPoint and FdoLineString, this yields a bitwise or of 00000011. This can be interpreted as an FdoPolygon.
To avoid this, the enum constants should be powers of 2...


Jörg


-- 
View this message in context: http://n2.nabble.com/FdoGeometryType%3A-bug-due-to-enum-values-tp2603686p2603686.html
Sent from the FDO Users mailing list archive at Nabble.com.



More information about the fdo-users mailing list