QAbstractFunctor Class
class Qt3DCore::QAbstractFunctorQAbstractFunctor는 모든 함수를 위한 추상 베이스 클래스입니다. 더 보기...
Header: | #include <QAbstractFunctor> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake: | QT += 3dcore |
상속됨: | Qt3DRender::QTextureGenerator 및 Qt3DRender::QTextureImageDataGenerator |
상태: | Deprecated |
공용 함수
virtual | ~QAbstractFunctor() |
const T * | functor_cast(const Qt3DCore::QAbstractFunctor *other) const |
virtual qintptr | id() const = 0 |
매크로
QT3D_FUNCTOR(Class) |
상세 설명
QAbstractFunctor는 Qt3DCore 모듈의 모든 펑터와 데이터 제너레이터의 베이스 클래스로 사용됩니다.
사용자가 새로운 함수 또는 제너레이터를 정의할 때 QAbstractFunctor::id() 메서드를 구현해야 하며, 이는 클래스 정의에서 QT3D_FUNCTOR
매크로를 사용하여 수행해야 합니다.
멤버 함수 문서
[virtual noexcept]
QAbstractFunctor::~QAbstractFunctor()
디스트럭터
template <typename T> const T *QAbstractFunctor::functor_cast(const Qt3DCore::QAbstractFunctor *other) const
이 메서드는 상대방이 T형(또는 서브클래스)인 경우 other 를 T형으로 캐스팅하고, 그렇지 않으면 0을 반환하는 데 사용됩니다. 이 메서드는 qobject_cast()와 유사하게 작동하지만 QAbstractFunctor 에서 파생된 함수를 제외하면 다릅니다.
경고: T가 QT3D_FUNCTOR 매크로로 선언되지 않은 경우 결과는 정의되지 않습니다.
[pure virtual]
qintptr QAbstractFunctor::id() const
함수의 ID에 대한 포인터를 반환합니다.
매크로 문서
QT3D_FUNCTOR(Class)
이 매크로는 QAbstractFunctor::functor_cast 에서 캐스팅 가능 여부를 판단하는 데 사용하는 Class 에 함수체 ID를 할당합니다.
© 2025 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.