LCOV - code coverage report
Current view: top level - core - qgsfeaturesink.cpp (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 0 16 0.0 %
Date: 2021-03-26 12:19:53 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :                          qgsfeaturesink.cpp
       3                 :            :                          ------------------
       4                 :            :     begin                : April 2017
       5                 :            :     copyright            : (C) 2017 by Nyall Dawson
       6                 :            :     email                : nyall dot dawson at gmail dot com
       7                 :            :  ***************************************************************************/
       8                 :            : 
       9                 :            : /***************************************************************************
      10                 :            :  *                                                                         *
      11                 :            :  *   This program is free software; you can redistribute it and/or modify  *
      12                 :            :  *   it under the terms of the GNU General Public License as published by  *
      13                 :            :  *   the Free Software Foundation; either version 2 of the License, or     *
      14                 :            :  *   (at your option) any later version.                                   *
      15                 :            :  *                                                                         *
      16                 :            :  ***************************************************************************/
      17                 :            : 
      18                 :            : #include "qgsfeaturestore.h"
      19                 :            : 
      20                 :          0 : bool QgsFeatureSink::addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags )
      21                 :            : {
      22                 :          0 :   QgsFeatureList features;
      23                 :          0 :   features << feature;
      24                 :          0 :   bool result = addFeatures( features, flags );
      25                 :            : 
      26                 :          0 :   if ( !( flags & FastInsert ) )
      27                 :            :   {
      28                 :            :     // need to update the passed feature reference to the updated copy from the features list
      29                 :          0 :     feature = features.at( 0 );
      30                 :          0 :   }
      31                 :          0 :   return result;
      32                 :          0 : }
      33                 :            : 
      34                 :          0 : bool QgsFeatureSink::addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags )
      35                 :            : {
      36                 :          0 :   QgsFeature f;
      37                 :          0 :   bool result = true;
      38                 :          0 :   while ( iterator.nextFeature( f ) )
      39                 :            :   {
      40                 :          0 :     result = result && addFeature( f, flags );
      41                 :            :   }
      42                 :          0 :   return result;
      43                 :          0 : }
      44                 :            : 

Generated by: LCOV version 1.14