QAbstractFunctor Classclass Qt3DRender::QAbstractFunctor
QAbstractFunctor is an abstract base class for all functors. More...
|qmake:||QT += 3drender|
This class was introduced in Qt 5.7.
|const T *||functor_cast(const Qt3DRender::QAbstractFunctor *other) const|
|virtual qintptr||id() const = 0|
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
template <typename T> 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.
Warning: If T was not declared with QT3D_FUNCTOR macro, then the results are undefined.
[pure virtual] qintptr QAbstractFunctor::id() const
Returns a pointer to the id of the functor.
This macro assigns functor id to the Class, which is used by QAbstractFunctor::functor_cast to determine if the cast can be done.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.