Changes between Version 4 and Version 5 of rfc29_desired_fields
- Timestamp:
- Aug 3, 2010, 8:05:35 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc29_desired_fields
v4 v5 41 41 support selection of fields. 42 42 43 The method will be implemented at the level of OGRLayer class: it will resolve indexes of the fields and set the following new member variables which indicate what should be ignored: 44 {{{m_pabIgnoredFields}}}, {{{m_bIgnoreGeometry}}}, {{{m_bIgnoreStyle}}}. 43 The method will be implemented at the level of OGRLayer class: it will resolve indexes of the fields and set the following new member variables which indicate what should be ignored. The flags will be stored within OGRFeatureDefn and OGRFieldDefn classes and available with these getter functions: 45 44 46 Optionally the method can be overridden in driver implementation if the driver has some special needs. 45 {{{ 46 bool OGRFieldDefn::IsIgnored(); 47 bool OGRFeatureDefn::IsGeometryIgnored(); 48 bool OGRFeatureDefn::IsStyleIgnored(); 49 }}} 50 51 The getter member functions will be complemented by setter functions for use by OGRLayer. Setting the "ignored" flags directly by clients will be forbidden. 52 53 Optionally the method {{{SetIgnoredFields()}}} can be overridden in driver implementation if the driver has some special needs. 47 54 48 55 == Implementation in drivers == … … 53 60 54 61 {{{ 55 if (! m_bIgnoreGeometry)62 if (!poDefn->IsGeometryIgnored()) 56 63 { 57 64 // fetch geometry 58 65 } 59 if (! m_bIgnoreStyle)66 if (!poDefn->IsStyleIgnored()) 60 67 { 61 68 // fetch style … … 64 71 for( int iField = 0; iField < poDefn->GetFieldCount(); iField++ ) 65 72 { 66 if ( m_pabIgnoredFields && iField < m_nIgnoredFieldCount && m_pabIgnoredFields[iField])73 if (poDefn->GetFieldDefn(iField)->IsIgnored()) 67 74 continue; 68 75