1// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qabstractfunctor.h"
5
6QT_BEGIN_NAMESPACE
7
8namespace Qt3DCore {
9
10/*!
11 \class Qt3DCore::QAbstractFunctor
12 \inmodule Qt3DCore
13 \since 5.7
14 \brief QAbstractFunctor is an abstract base class for all functors.
15
16 The QAbstractFunctor is used as a base class for all functors and data
17 generators in Qt3DCore module.
18
19 When user defines a new functor or generator, they need to implement the
20 \l QAbstractFunctor::id() method, which should be done using the \c {QT3D_FUNCTOR}
21 macro in the class definition.
22 */
23/*!
24 \fn qintptr Qt3DCore::QAbstractFunctor::id() const
25
26 Returns a pointer to the id of the functor.
27 */
28/*!
29 \fn qintptr Qt3DCore::functorTypeId()
30
31 Returns a pointer to the type id of the functor.
32*/
33/*!
34 \macro QT3D_FUNCTOR(Class)
35 \relates Qt3DCore::QAbstractFunctor
36
37 This macro assigns functor id to the \a Class, which is used by QAbstractFunctor::functor_cast
38 to determine if the cast can be done.
39 */
40
41/*!
42 \fn template<class T> const T * Qt3DCore::QAbstractFunctor::functor_cast(const QAbstractFunctor *other) const
43
44 This method is used to cast functor \a other to type T if the other is of
45 type T (or of subclass); otherwise returns 0. This method works similarly
46 to \l [QtCore] {qobject_cast(const QObject *object)}{qobject_cast()},
47 except with functors derived from QAbstractFunctor.
48
49 \warning If T was not declared with \l QT3D_FUNCTOR macro, then the results are undefined.
50 */
51
52/*! Desctructor */
53QAbstractFunctor::~QAbstractFunctor()
54{
55
56}
57
58} // Qt3D
59
60QT_END_NAMESPACE
61
62

source code of qt3d/src/core/geometry/qabstractfunctor.cpp