This file is indexed.

/usr/include/qgis/qgscachedfeatureiterator.h is in libqgis-dev 2.0.1-2build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/***************************************************************************
    qgscachedfeatureiterator.h
     --------------------------------------
    Date                 : 12.2.2013
    Copyright            : (C) 2013 Matthias Kuhn
    Email                : matthias dot kuhn at gmx dot ch
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef QGSCACHEDFEATUREITERATOR_H
#define QGSCACHEDFEATUREITERATOR_H

#include "qgsfeature.h"
#include "qgsfeatureiterator.h"

class QgsVectorLayerCache;

/**
 * @brief
 * Delivers features from the cache
 *
 */
class CORE_EXPORT QgsCachedFeatureIterator : public QgsAbstractFeatureIterator
{
  public:
    /**
     * @brief
     * This constructor creates a feature iterator, that delivers only cached information, based on the
     * @link QgsFeatureIds @endlink. No request is made to the backend.
     *
     * @param vlCache          The vector layer cache to use
     * @param featureRequest   The feature request to answer
     * @param featureIds       The feature ids to return
     */
    QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest, QgsFeatureIds featureIds );

    /**
     * @brief
     *
     * @param f
     * @return bool
     */
    virtual bool nextFeature( QgsFeature& f );

    /**
     * @brief
     *
     * @return bool
     */
    virtual bool rewind();

    /**
     * @brief
     *
     * @return bool
     */
    virtual bool close();

  private:
    QgsFeatureIds mFeatureIds;
    QgsVectorLayerCache* mVectorLayerCache;
    QgsFeatureIds::Iterator mFeatureIdIterator;
};

/**
 * @brief
 * Uses another iterator as backend and writes features to the cache
 *
 */
class CORE_EXPORT QgsCachedFeatureWriterIterator : public QgsAbstractFeatureIterator
{
  public:
    /**
     * @brief
     * This constructor creates a feature iterator, which queries the backend and caches retrieved features.
     *
     * @param vlCache          The vector layer cache to use
     * @param featureRequest   The feature request to answer
     */
    QgsCachedFeatureWriterIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest );

    /**
     * @brief
     *
     * @param f
     * @return bool
     */
    virtual bool nextFeature( QgsFeature& f );

    /**
     * @brief
     *
     * @return bool
     */
    virtual bool rewind();

    /**
     * @brief
     *
     * @return bool
     */
    virtual bool close();

  private:
    QgsFeatureIterator mFeatIt;
    QgsVectorLayerCache* mVectorLayerCache;
    QgsFeatureIds mFids;
};
#endif // QGSCACHEDFEATUREITERATOR_H