QGIS API Documentation  3.6.0-Noosa (5873452)
qgsfeatureid.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfeatureid.h
3  --------------------------------------
4 Date : 3.9.2018
5 Copyright : (C) 2018 by Matthias Kuhn
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 #ifndef QGSFEATUREID_H
17 #define QGSFEATUREID_H
18 
19 #include <QSet>
20 #include "qgis_sip.h"
21 
22 // feature id (currently 64 bit)
23 
24 // 64 bit feature ids
25 typedef qint64 QgsFeatureId SIP_SKIP;
26 #define FID_NULL std::numeric_limits<QgsFeatureId>::min()
27 #define FID_IS_NULL(fid) ( fid == std::numeric_limits<QgsFeatureId>::min() )
28 #define FID_IS_NEW(fid) ( fid < 0 && fid != std::numeric_limits<QgsFeatureId>::min() )
29 #define FID_TO_NUMBER(fid) static_cast<qint64>( fid )
30 #define FID_TO_STRING(fid) ( fid != std::numeric_limits<QgsFeatureId>::min() ? QString::number( fid ) : QStringLiteral( "NULL" ) )
31 #define STRING_TO_FID(str) ( (str).toLongLong() )
32 
33 #ifndef SIP_RUN
34 typedef QSet<QgsFeatureId> QgsFeatureIds;
35 #else
36 typedef QSet<qint64> QgsFeatureIds;
37 #endif
38 
39 #endif
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:34
qint64 QgsFeatureId
Definition: qgsfeatureid.h:25
#define SIP_SKIP
Definition: qgis_sip.h:119