<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qabstractfunctor.cpp --> <title>QAbstractFunctor Class | Qt 3D 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-cpp.html">C++ Classes</a></td><td >QAbstractFunctor</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#macros">Macros</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QAbstractFunctor Class</h1> <span class="small-subtitle">(<a href="qt3drender-qabstractfunctor.html">Qt3DRender::QAbstractFunctor</a>)<br/></span> <!-- $$$QAbstractFunctor-brief --> <p><a href="qt3drender-qabstractfunctor.html">QAbstractFunctor</a> is an abstract base class for all functors. <a href="#details">More...</a></p> <!-- @@@QAbstractFunctor --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QAbstractFunctor></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3drender</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.7</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qt3drender-qbufferdatagenerator.html">Qt3DRender::QBufferDataGenerator</a> and <a href="qt3drender-qtextureimagedatagenerator.html">Qt3DRender::QTextureImageDataGenerator</a></p> </td></tr></table></div><ul> <li><a href="qt3drender-qabstractfunctor-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qabstractfunctor.html#QAbstractFunctor">QAbstractFunctor</a></b>() = default</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qabstractfunctor.html#dtor.QAbstractFunctor">~QAbstractFunctor</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const T *</td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qabstractfunctor.html#functor_cast">functor_cast</a></b>(const QAbstractFunctor *<i>other</i>) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual qintptr </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qabstractfunctor.html#id">id</a></b>() const = 0</td></tr> </table></div> <a name="macros"></a> <h2 id="macros">Macros</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qabstractfunctor.html#QT3D_FUNCTOR">QT3D_FUNCTOR</a></b>(<i>Class</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QAbstractFunctor-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p><a href="qt3drender-qabstractfunctor.html">QAbstractFunctor</a> is an abstract base class for all functors.</p> <p>The <a href="qt3drender-qabstractfunctor.html">QAbstractFunctor</a> is used as a base class for all functors and data generators in <a href="qt3drender-module.html">Qt3DRender</a> module.</p> <p>When user defines a new functor or generator, they need to implement the <a href="qt3drender-qabstractfunctor.html#id">QAbstractFunctor::id</a>() method, which should be done using the <code>QT3D_FUNCTOR</code> macro in the class definition.</p> </div> <!-- @@@QAbstractFunctor --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QAbstractFunctor[overload1]$$$QAbstractFunctor --> <h3 class="fn" id="QAbstractFunctor"><a name="QAbstractFunctor"></a><code>[default] </code>QAbstractFunctor::<span class="name">QAbstractFunctor</span>()</h3> <p>Default constructs an instance of QAbstractFunctor.</p><!-- @@@QAbstractFunctor --> <!-- $$$~QAbstractFunctor[overload1]$$$~QAbstractFunctor --> <h3 class="fn" id="dtor.QAbstractFunctor"><a name="dtor.QAbstractFunctor"></a><code>[virtual] </code>QAbstractFunctor::<span class="name">~QAbstractFunctor</span>()</h3> <p>Desctructor</p> <!-- @@@~QAbstractFunctor --> <!-- $$$functor_cast[overload1]$$$functor_castconstQAbstractFunctor* --> <h3 class="fn" id="functor_cast"><a name="functor_cast"></a>const <span class="type">T</span> *QAbstractFunctor::<span class="name">functor_cast</span>(const <span class="type"><a href="qt3drender-qabstractfunctor.html#QAbstractFunctor">QAbstractFunctor</a></span> *<i>other</i>) const</h3> <p>This method is used to cast functor <i>other</i> to type T if the other is of type T (or of subclass); otherwise returns 0. This method works similarly to QObject::qobject_cast, except with functors derived from <a href="qt3drender-qabstractfunctor.html">QAbstractFunctor</a>.</p> <p><b>Warning:</b> If T was not declared with <a href="qt3drender-qabstractfunctor.html#QT3D_FUNCTOR">QT3D_FUNCTOR</a> macro, then the results are undefined.</p> <!-- @@@functor_cast --> <!-- $$$id[overload1]$$$id --> <h3 class="fn" id="id"><a name="id"></a><code>[pure virtual] </code><span class="type">qintptr</span> QAbstractFunctor::<span class="name">id</span>() const</h3> <!-- @@@id --> </div> <div class="macros"> <h2>Macro Documentation</h2> <!-- $$$QT3D_FUNCTOR[overload1]$$$QT3D_FUNCTOR --> <h3 class="fn" id="QT3D_FUNCTOR"><a name="QT3D_FUNCTOR"></a><span class="name">QT3D_FUNCTOR</span>(<i>Class</i>)</h3> <p>This macro assigns functor id to the <i>Class</i>, which is used by QAbstractFunctor::functor_cast to determine if the cast can be done.</p> <!-- @@@QT3D_FUNCTOR --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p> </div> </body> </html>