QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsfeature_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfeature_p.h
3  ---------------
4 Date : May-2015
5 Copyright : (C) 2015 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
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 #ifndef QGSFEATURE_PRIVATE_H
17 #define QGSFEATURE_PRIVATE_H
18 
20 
21 //
22 // W A R N I N G
23 // -------------
24 //
25 // This file is not part of the QGIS API. It exists purely as an
26 // implementation detail. This header file may change from version to
27 // version without notice, or even be removed.
28 //
29 
30 /***************************************************************************
31  * This class is considered CRITICAL and any change MUST be accompanied with
32  * full unit tests in testqgsfeature.cpp.
33  * See details in QEP #17
34  ****************************************************************************/
35 
36 #include "qgsfields.h"
37 
38 #include "qgsgeometry.h"
39 
40 class QgsFeaturePrivate : public QSharedData
41 {
42  public:
43 
44  explicit QgsFeaturePrivate( QgsFeatureId id )
45  : fid( id )
46  , valid( false )
47  {
48  }
49 
50  QgsFeaturePrivate( const QgsFeaturePrivate &other )
51  : QSharedData( other )
52  , fid( other.fid )
53  , attributes( other.attributes )
54  , geometry( other.geometry )
55  , valid( other.valid )
56  , fields( other.fields )
57  {
58  }
59 
60  ~QgsFeaturePrivate()
61  {
62  }
63 
65  QgsFeatureId fid;
66 
68  QgsAttributes attributes;
69 
71  QgsGeometry geometry;
72 
74  bool valid;
75 
77  QgsFields fields;
78 
79  private:
80  QgsFeaturePrivate &operator=( const QgsFeaturePrivate & ) = delete;
81 
82 };
83 
85 
86 #endif //QGSFEATURE_PRIVATE_H
qgsfields.h
QgsFields
Definition: qgsfields.h:44
qgsgeometry.h
QgsGeometry
Definition: qgsgeometry.h:122
QgsAttributes
Definition: qgsattributes.h:57
QgsFeatureId
qint64 QgsFeatureId
Definition: qgsfeatureid.h:25