[fdo-trac] #244: FDOGeometricType not exposed in DotNET API

FDO trac_fdo at osgeo.org
Mon Jan 28 14:52:48 EST 2008


#244: FDOGeometricType not exposed in DotNET API
---------------------------+------------------------------------------------
 Reporter:  chrisErickson  |         Owner:  gregboone
     Type:  defect         |        Status:  new      
 Priority:  minor          |     Milestone:  3.3.0    
Component:  FDO API        |       Version:  3.2.0    
 Severity:  3              |    Resolution:           
 Keywords:                 |   External_id:           
---------------------------+------------------------------------------------
Comment (by chrisErickson):

 As an addition to this, when passing Enumerations that are bitwise in a
 DotNet API, you can still use the Enum name in the signature rather than
 casting it to an int.  This makes the API much more friendly, especially
 when there are similarly named enumerations.

 For instance:
 with a given enum of:

 public enum GeometricType
 {
     GeometricType_Point = 1,
     GeometricType_Curve = 2,
     GeometricType_Surface = 4,
     GeometricType_Solid = 8,
 }

 The signature for
 int GeometricPropertyDefinition::GeometryTypes
 could be:
 GeometryType GeometricPropertyDefinition::GeometryTypes

 and GeometryTypes can return GeometricType_Solid | GeometricType_Surface

 Similarly,
 void GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometryType[]
 types, int length)
 could be
 void GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometryType
 types)

 and the user could hand in
 GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometricType_Solid
 | GeometricType_Surface)

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/244#comment:1>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list