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()
156 bool setAttribute(
int field,
const QVariant& attr );
162 void initAttributes(
int fieldCount );
171 void deleteAttribute(
int field );
178 bool isValid()
const;
183 void setValid(
bool validity );
210 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 );
267 QVariant attribute(
const QString& name )
const;
277 QVariant attribute(
int fieldIdx )
const;
282 int fieldNameIndex(
const QString& fieldName )
const;