QNdefRecord Proxy Page

Macros

Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(className, typeNameFormat, type)
Q_DECLARE_NDEF_RECORD(className, typeNameFormat, type, initialPayload)

Macro Documentation

QNdefRecord::Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(className, typeNameFormat, type)

This macro declares a template specialization for the QNdefRecord::isRecordType() function.

This macro should be used in the header file directly after the definition of a specialized NDEF record class.

className is the name of the specialized class, typeNameFormat is the appropriate QNdefRecord::TypeNameFormat for the custom type and type is the type without the NID or NSS prefixes. That is example.com:f not urn:nfc:ext:example.com:f.

See the section on Creating specialized NDEF record classes for details.

See also Q_DECLARE_NDEF_RECORD().

QNdefRecord::Q_DECLARE_NDEF_RECORD(className, typeNameFormat, type, initialPayload)

This macro declares default and copy constructors for specialized NDEF record classes.

className is the name of the specialized class, typeNameFormat is the appropriate QNdefRecord::TypeNameFormat for the custom type and type is the type without the NID or NSS prefixes. That is example.com:f not urn:nfc:ext:example.com:f. initialPayload is the initial payload of an empty record, it must be a QByteArray or a type that can be implicitly converted into a QByteArray.

See the section on Creating specialized NDEF record classes for details.

See also Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD().