QAbstractFunctor Class▲
-
Header: QAbstractFunctor
-
Since: Qt 5.7
-
qmake: QT += 3drender
-
Inherited By: Qt3DRender::QBufferDataGenerator and Qt3DRender::QTextureImageDataGenerator
Detailed Description▲
The QAbstractFunctor is used as a base class for all functors and data generators in Qt3DRender module.
When user defines a new functor or generator, they need to implement the QAbstractFunctor::id() method, which should be done using the QT3D_FUNCTOR macro in the class definition.
Member Function Documentation▲
[virtual] QAbstractFunctor::~QAbstractFunctor()▲
Desctructor
const T *QAbstractFunctor::functor_cast(const Qt3DRender::QAbstractFunctor *other) const▲
This method is used to cast functor other to type T if the other is of type T (or of subclass); otherwise returns 0. This method works similarly to qobject_cast(), except with functors derived from QAbstractFunctor.
If T was not declared with QT3D_FUNCTOR macro, then the results are undefined.
[pure virtual] qintptr QAbstractFunctor::id() const▲
Macro Documentation▲
QT3D_FUNCTOR(Class)▲
This macro assigns functor id to the Class, which is used by QAbstractFunctor::functor_cast to determine if the cast can be done.