Skip to content
Permalink
Browse files

Move QgsFeatureId to own header

  • Loading branch information
m-kuhn committed Sep 3, 2018
1 parent a6e0e39 commit 74fb0fabc64fe2f225c7aaa70739a7a368d6d739
@@ -14,8 +14,6 @@





class QgsFeature
{
%Docstring
@@ -527,9 +525,6 @@ typedef QMap<qint64, QMap<int, QVariant> > QgsChangedAttributesMap;

typedef QMap<qint64, QgsGeometry> QgsGeometryMap;


typedef QSet<qint64> QgsFeatureIds;

typedef QList<QgsFeature> QgsFeatureList;


@@ -0,0 +1,21 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeatureid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





typedef QSet<qint64> QgsFeatureIds;

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsfeatureid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -44,6 +44,7 @@
%Include auto_generated/qgsexpressioncontextscopegenerator.sip
%Include auto_generated/qgsexpressionfieldbuffer.sip
%Include auto_generated/qgsfeaturefilterprovider.sip
%Include auto_generated/qgsfeatureid.sip
%Include auto_generated/qgsfeatureiterator.sip
%Include auto_generated/qgsfeaturerequest.sip
%Include auto_generated/qgsfeaturesink.sip
@@ -851,6 +851,7 @@ SET(QGIS_CORE_HDRS
qgsexpressioncontextscopegenerator.h
qgsexpressionfieldbuffer.h
qgsfeaturefilterprovider.h
qgsfeatureid.h
qgsfeatureiterator.h
qgsfeaturerequest.h
qgsfeaturesink.h
@@ -29,6 +29,7 @@ email : sherman at mrcc.com

#include "qgsattributes.h"
#include "qgsfields.h"
#include "qgsfeatureid.h"

class QgsFeature;
class QgsFeaturePrivate;
@@ -43,15 +44,6 @@ class QgsRectangle;
* See details in QEP #17
****************************************************************************/

// feature id class (currently 64 bit)

// 64 bit feature ids
typedef qint64 QgsFeatureId SIP_SKIP;
#define FID_IS_NEW(fid) (fid<0)
#define FID_TO_NUMBER(fid) static_cast<qint64>(fid)
#define FID_TO_STRING(fid) QString::number( fid )
#define STRING_TO_FID(str) (str).toLongLong()


/**
* \ingroup core
@@ -540,13 +532,6 @@ typedef QMap<QgsFeatureId, QgsGeometry> QgsGeometryMap;
typedef QMap<qint64, QgsGeometry> QgsGeometryMap;
#endif


#ifndef SIP_RUN
typedef QSet<QgsFeatureId> QgsFeatureIds;
#else
typedef QSet<qint64> QgsFeatureIds;
#endif

typedef QList<QgsFeature> QgsFeatureList;

uint qHash( const QgsFeature &key, uint seed = 0 ) SIP_SKIP;
@@ -0,0 +1,36 @@
/***************************************************************************
qgsfeatureid.h
--------------------------------------
Date : 3.9.2018
Copyright : (C) 2018 by Matthias Kuhn
email : matthias@opengis.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 QGSFEATUREID_H
#define QGSFEATUREID_H

#include <QSet>

// feature id (currently 64 bit)

// 64 bit feature ids
typedef qint64 QgsFeatureId SIP_SKIP;
#define FID_IS_NEW(fid) (fid<0)
#define FID_TO_NUMBER(fid) static_cast<qint64>(fid)
#define FID_TO_STRING(fid) QString::number( fid )
#define STRING_TO_FID(str) (str).toLongLong()

#ifndef SIP_RUN
typedef QSet<QgsFeatureId> QgsFeatureIds;
#else
typedef QSet<qint64> QgsFeatureIds;
#endif

#endif

0 comments on commit 74fb0fa

Please sign in to comment.
You can’t perform that action at this time.