47 bool operator<(
const QgsFeatureId &
id )
const {
return mId <
id.mId; }
48 bool operator>(
const QgsFeatureId &
id )
const {
return mId >
id.mId; }
49 operator QString()
const {
return QString::number( mId ); }
56 qint64 toLongLong()
const
69 return qHash(
id.mId );
72 #define FID_IS_NEW(fid) (fid).isNew()
73 #define FID_TO_NUMBER(fid) (fid).toLongLong()
74 #define FID_TO_STRING(fid) static_cast<QString>(fid)
75 #define STRING_TO_FID(str) QgsFeatureId(str)
81 #define FID_IS_NEW(fid) (fid<0)
82 #define FID_TO_NUMBER(fid) static_cast<qint64>(fid)
83 #define FID_TO_STRING(fid) QString::number( fid )
84 #define STRING_TO_FID(str) (str).toLongLong()
90 #define FID_IS_NEW(fid) (fid<0)
91 #define FID_TO_NUMBER(fid) static_cast<int>(fid)
92 #define FID_TO_STRING(fid) QString::number( fid )
93 #define STRING_TO_FID(str) (str).toLong()
157 bool setAttribute(
int field,
const QVariant& attr );
163 void initAttributes(
int fieldCount );
172 void deleteAttribute(
int field );
179 bool isValid()
const;
184 void setValid(
bool validity );
211 void setGeometryAndOwnership(
unsigned char * geom,
size_t length );
225 void setFields(
const QgsFields* fields,
bool initAttributes =
false );
243 bool setAttribute(
const QString& name, QVariant value );
255 bool deleteAttribute(
const QString& name );
268 QVariant attribute(
const QString& name )
const;
279 QVariant attribute(
int fieldIdx )
const;
286 int fieldNameIndex(
const QString& fieldName )
const;