Qt3DCore::QAbstractFunctor Class
class Qt3DCore::QAbstractFunctorQAbstractFunctor は、すべてのファンクターの抽象基底クラスです。詳細...
| ヘッダー: | #include <QAbstractFunctor> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| 継承元: | |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
パブリック関数
| QAbstractFunctor() | |
| 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 マクロを使用して行う必要があります。
メンバ関数のドキュメント
[constexpr noexcept default] QAbstractFunctor::QAbstractFunctor()
QAbstractFunctor のインスタンスをデフォルトコンストラクタで生成します。
[virtual noexcept] QAbstractFunctor::~QAbstractFunctor()
デストラクター
template <typename T> const T *QAbstractFunctor::functor_cast(const Qt3DCore::QAbstractFunctor *other) const
このメソッドは、ファンクタ `other ` を、T 型(またはそのサブクラス)である場合に型 T へキャストするために使用されます。そうでない場合は 0 を返します。このメソッドは、`qobject_cast()` と同様に動作しますが、`QAbstractFunctor` から派生したファンクタを対象とする点が異なります。
警告: T がQT3D_FUNCTOR マクロを使用して宣言されていない場合 、結果は未定義となります。
[pure virtual] qintptr QAbstractFunctor::id() const
ファンクタのIDへのポインタを返します。
マクロのドキュメント
QT3D_FUNCTOR(Class)
このマクロは、Class にファンクタidを割り当てます。これは、QAbstractFunctor::functor_cast が型変換が可能かどうかを判断するために使用されます。
© 2026 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.