QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Classes | Macros | Typedefs | Functions
qgsfeature.h File Reference
#include <QMap>
#include <QString>
#include <QVariant>
#include <QList>
#include <QHash>
#include <QVector>
#include <QSet>
#include "qgsfield.h"
Include dependency graph for qgsfeature.h:

Go to the source code of this file.

Classes

class  QgsAttributes
 A vector of attributes. More...
 
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< int, QVariantQgsAttributeMap
 
typedef QMap< QgsFeatureId, QgsAttributeMapQgsChangedAttributesMap
 
typedef qint64 QgsFeatureId
 
typedef QSet< QgsFeatureIdQgsFeatureIds
 
typedef QList< QgsFeatureQgsFeatureList
 
typedef QMap< int, QStringQgsFieldNameMap
 
typedef QMap< QgsFeatureId, QgsGeometryQgsGeometryMap
 

Functions

CORE_EXPORT QDataStreamoperator<< (QDataStream &out, const QgsFeature &feature)
 Writes the feature to stream out. More...
 
CORE_EXPORT QDataStreamoperator>> (QDataStream &in, QgsFeature &feature)
 Reads a feature from stream in into feature. More...
 

Macro Definition Documentation

◆ FID_IS_NEW

#define FID_IS_NEW (   fid)    (fid<0)

Definition at line 87 of file qgsfeature.h.

◆ FID_TO_NUMBER

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

Definition at line 88 of file qgsfeature.h.

◆ FID_TO_STRING

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

Definition at line 89 of file qgsfeature.h.

◆ STRING_TO_FID

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

Definition at line 90 of file qgsfeature.h.

Typedef Documentation

◆ QgsAttributeMap

typedef QMap<int, QVariant> QgsAttributeMap

Definition at line 104 of file qgsfeature.h.

◆ QgsChangedAttributesMap

Definition at line 434 of file qgsfeature.h.

◆ QgsFeatureId

typedef qint64 QgsFeatureId

Definition at line 31 of file qgsfeature.h.

◆ QgsFeatureIds

Definition at line 439 of file qgsfeature.h.

◆ QgsFeatureList

Definition at line 444 of file qgsfeature.h.

◆ QgsFieldNameMap

typedef QMap<int, QString> QgsFieldNameMap

Definition at line 442 of file qgsfeature.h.

◆ QgsGeometryMap

Definition at line 437 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 297 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 314 of file qgsfeature.cpp.