Changes between Version 4 and Version 5 of rfc29_desired_fields


Ignore:
Timestamp:
Aug 3, 2010, 8:05:35 AM (14 years ago)
Author:
wonder
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rfc29_desired_fields

    v4 v5  
    4141support selection of fields.
    4242
    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}}}.
     43The 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:
    4544
    46 Optionally the method can be overridden in driver implementation if the driver has some special needs.
     45{{{
     46bool OGRFieldDefn::IsIgnored();
     47bool OGRFeatureDefn::IsGeometryIgnored();
     48bool OGRFeatureDefn::IsStyleIgnored();
     49}}}
     50
     51The getter member functions will be complemented by setter functions for use by OGRLayer. Setting the "ignored" flags directly by clients will be forbidden.
     52
     53Optionally the method {{{SetIgnoredFields()}}} can be overridden in driver implementation if the driver has some special needs.
    4754
    4855== Implementation in drivers ==
     
    5360
    5461{{{
    55 if (!m_bIgnoreGeometry)
     62if (!poDefn->IsGeometryIgnored())
    5663{
    5764  // fetch geometry
    5865}
    59 if (!m_bIgnoreStyle)
     66if (!poDefn->IsStyleIgnored())
    6067{
    6168  // fetch style
     
    6471for( int iField = 0; iField < poDefn->GetFieldCount(); iField++ )
    6572{
    66   if (m_pabIgnoredFields && iField < m_nIgnoredFieldCount && m_pabIgnoredFields[iField])
     73  if (poDefn->GetFieldDefn(iField)->IsIgnored())
    6774    continue;
    6875