QGIS API Documentation
2.2.0-Valmiera
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
core
qgscacheindexfeatureid.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgscacheindexfeatureid.cpp
3
--------------------------------------
4
Date : 13.2.2013
5
Copyright : (C) 2013 Matthias Kuhn
6
Email : matthias dot kuhn at gmx dot ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgscacheindexfeatureid.h
"
17
#include "
qgsfeaturerequest.h
"
18
#include "
qgscachedfeatureiterator.h
"
19
#include "
qgsvectorlayercache.h
"
20
21
QgsCacheIndexFeatureId::QgsCacheIndexFeatureId
(
QgsVectorLayerCache
* cachedVectorLayer )
22
:
QgsAbstractCacheIndex
()
23
, C( cachedVectorLayer )
24
{
25
26
}
27
28
void
QgsCacheIndexFeatureId::flushFeature
(
const
QgsFeatureId
fid )
29
{
30
Q_UNUSED( fid )
31
}
32
33
void
QgsCacheIndexFeatureId::flush
()
34
{
35
}
36
37
void
QgsCacheIndexFeatureId::requestCompleted
(
QgsFeatureRequest
featureRequest,
QgsFeatureIds
fids )
38
{
39
Q_UNUSED( featureRequest )
40
Q_UNUSED( fids )
41
}
42
43
bool
QgsCacheIndexFeatureId::getCacheIterator
(
QgsFeatureIterator
&featureIterator,
const
QgsFeatureRequest
&featureRequest )
44
{
45
if
( featureRequest.
filterType
() ==
QgsFeatureRequest::FilterFid
)
46
{
47
if
(
C
->
isFidCached
( featureRequest.
filterFid
() ) )
48
{
49
featureIterator =
QgsFeatureIterator
(
new
QgsCachedFeatureIterator
(
C
, featureRequest ) );
50
return
true
;
51
}
52
}
53
54
return
false
;
55
}
56
Generated on Sun Feb 23 2014 14:27:18 for QGIS API Documentation by
1.8.1.2