QGIS API Documentation  3.0.2-Girona (307d082)
Classes | Macros | Typedefs | Functions
qgsfeature.h File Reference
#include "qgis_core.h"
#include "qgis.h"
#include <QExplicitlySharedDataPointer>
#include <QList>
#include <QMap>
#include <QSet>
#include <QString>
#include <QVariant>
#include <QVector>
#include "qgsattributes.h"
#include "qgsfields.h"
#include "qgsgeometry.h"
Include dependency graph for qgsfeature.h:

Go to the source code of this file.

Classes

class  QgsFeature
 The feature class encapsulates a single feature including its id, geometry and a list of field/values attributes. More...
 

Macros

#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()
 

Typedefs

typedef QMap< QgsFeatureId, QgsAttributeMapQgsChangedAttributesMap
 
typedef qint64 QgsFeatureId
 
typedef QSet< QgsFeatureIdQgsFeatureIds
 
typedef QList< QgsFeatureQgsFeatureList
 
typedef QMap< QgsFeatureId, QgsGeometryQgsGeometryMap
 

Functions

CORE_EXPORT QDataStream & operator<< (QDataStream &out, const QgsFeature &feature)
 Writes the feature to stream out. QGIS version compatibility is not guaranteed. More...
 
CORE_EXPORT QDataStream & operator>> (QDataStream &in, QgsFeature &feature)
 Reads a feature from stream in into feature. QGIS version compatibility is not guaranteed. More...
 
uint qHash (const QgsFeature &key, uint seed=0)
 

Macro Definition Documentation

◆ FID_IS_NEW

#define FID_IS_NEW (   fid)    (fid<0)

Definition at line 50 of file qgsfeature.h.

◆ FID_TO_NUMBER

#define FID_TO_NUMBER (   fid)    static_cast<qint64>(fid)

Definition at line 51 of file qgsfeature.h.

◆ FID_TO_STRING

#define FID_TO_STRING (   fid)    QString::number( fid )

Definition at line 52 of file qgsfeature.h.

◆ STRING_TO_FID

#define STRING_TO_FID (   str)    (str).toLongLong()

Definition at line 53 of file qgsfeature.h.

Typedef Documentation

◆ QgsChangedAttributesMap

Definition at line 528 of file qgsfeature.h.

◆ QgsFeatureId

typedef qint64 QgsFeatureId

Definition at line 37 of file qgsfeature.h.

◆ QgsFeatureIds

typedef QSet<QgsFeatureId> QgsFeatureIds

Definition at line 544 of file qgsfeature.h.

◆ QgsFeatureList

typedef QList<QgsFeature> QgsFeatureList

Definition at line 549 of file qgsfeature.h.

◆ QgsGeometryMap

Definition at line 537 of file qgsfeature.h.

Function Documentation

◆ operator<<()

CORE_EXPORT QDataStream& operator<< ( QDataStream &  out,
const QgsFeature feature 
)

Writes the feature to stream out. QGIS version compatibility is not guaranteed.

Definition at line 281 of file qgsfeature.cpp.

◆ operator>>()

CORE_EXPORT QDataStream& operator>> ( QDataStream &  in,
QgsFeature feature 
)

Reads a feature from stream in into feature. QGIS version compatibility is not guaranteed.

Definition at line 298 of file qgsfeature.cpp.

◆ qHash()

uint qHash ( const QgsFeature key,
uint  seed = 0 
)

Definition at line 312 of file qgsfeature.cpp.