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
qgsfeaturestore.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfeaturestore.cpp
3
--------------------------------------
4
Date : February 2013
5
Copyright : (C) 2013 by Radim Blazek
6
Email :
[email protected]
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 "
qgsfeaturestore.h
"
17
18
QgsFeatureStore::QgsFeatureStore
( )
19
{
20
}
21
22
QgsFeatureStore::QgsFeatureStore
(
const
QgsFeatureStore
&rhs )
23
: mFields( rhs.mFields )
24
, mCrs( rhs.mCrs )
25
, mFeatures( rhs.mFeatures )
26
, mParams( rhs.mParams )
27
{
28
}
29
30
QgsFeatureStore::QgsFeatureStore
(
const
QgsFields
& fields,
const
QgsCoordinateReferenceSystem
& crs )
31
: mFields( fields )
32
, mCrs( crs )
33
{
34
}
35
36
QgsFeatureStore::~QgsFeatureStore
( )
37
{
38
}
39
40
void
QgsFeatureStore::setFields
(
const
QgsFields
& fields )
41
{
42
mFields
=
fields
;
43
foreach
(
QgsFeature
feature,
mFeatures
)
44
{
45
feature.
setFields
( &
mFields
);
46
}
47
}
48
49
void
QgsFeatureStore::addFeature
(
const
QgsFeature
& feature )
50
{
51
QgsFeature
f( feature );
52
f.
setFields
( &
mFields
);
53
mFeatures
.append( f );
54
}
Generated on Sun Feb 23 2014 14:27:19 for QGIS API Documentation by
1.8.1.2