WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. | Zuble QML Types | Zuble C++ Classes | Zuble Overview |
Zuble
0.1
Zuble Framework C++/QML extension API
|
This class holds the state for managing a Zuble sprocket. More...
#include <ZblSprocket.h>
Public Member Functions | |
ZblSprocket (QString uri, int versionMajor, int versionMinor) | |
Object constructor. More... | |
const QString & | uri () const |
returns the Sprocket plugin's uri More... | |
int | versionMajor () const |
returns the Sprocket plugin's major version number More... | |
int | versionMinor () const |
returns the Sprocket plugin's minor version number More... | |
const QString | sprocketTag () const |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>" More... | |
bool | registerSprocketObject (const char *uri, int versionMajor, int versionMinor, const char *qmlName, sprocketObjectConstructor createFunc) |
Creates a new ZblSprockOb Sprocket object constructor and adds it to the Sprocket's object foundary. More... | |
Static Public Member Functions | |
static const QString | sprocketTag (const char *uri, int versionMajor, int versionMinor) |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>" More... | |
static const QString | sprocketTag (const ZblSprocket *sprocket) |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>" More... | |
Protected Member Functions | |
int | versionKey (int versionMajor, int versionMinor) |
Computes a version key for the specified version number. More... | |
ZblSprockOb * | findSprock (int versionMajor, int versionMinor, const char *qmlName) |
Locates a version-specific Sprocket object constructor in the Sprocket's object foundry based on the QML type name version semantics. More... | |
bool | insertSprock (ZblSprockOb *sprock) |
Adds a Sprocket constructor object to the Sprocket's object foundry. More... | |
Protected Attributes | |
QString | m_uri |
Sprocket plugin uri. More... | |
int | m_versionMajor |
Sprocket plugin major version number. More... | |
int | m_versionMinor |
Sprocket plugin minor version number. More... | |
sprocketFoundryMap | m_objects |
Maps object QML names to maps of sprocket object foundaries. Each foundary contains a separate object construction wrapper for each version of the named object. More... | |
Private Member Functions | |
ZblSprocket () | |
Friends | |
class | ZblCog |
This class holds the state for managing a Zuble sprocket.
Definition at line 38 of file ZblSprocket.h.
|
inlineexplicitprivate |
Definition at line 43 of file ZblSprocket.h.
|
inline |
Object constructor.
uri | Sprocket plugin's uri |
versionMajor | Sprocket library major version number |
versionMinor | Sprocket library minor version number |
Definition at line 52 of file ZblSprocket.h.
|
protected |
Locates a version-specific Sprocket object constructor in the Sprocket's object foundry based on the QML type name version semantics.
versionMajor | QML import major version |
versionMinor | QML import minor version |
qmlName | QML object type name |
Definition at line 80 of file ZblSprocket.cpp.
Referenced by Zbl::ZblCog::createFactory(), registerSprocketObject(), and versionKey().
|
protected |
Adds a Sprocket constructor object to the Sprocket's object foundry.
sprock | Sprocket constructor object |
Definition at line 134 of file ZblSprocket.cpp.
Referenced by registerSprocketObject(), and versionKey().
bool Zbl::ZblSprocket::registerSprocketObject | ( | const char * | uri, |
int | versionMajor, | ||
int | versionMinor, | ||
const char * | qmlName, | ||
sprocketObjectConstructor | createFunc | ||
) |
Creates a new ZblSprockOb Sprocket object constructor and adds it to the Sprocket's object foundary.
Note that versionMajor and versionMinor should be the same as those passed in the object's qmlRegisterType() function call to ensure the same object is created in both foreground (objects created by QML) and background (objects created by Zuble) threads.
uri | Sprocket plugin's uri |
versionMajor | object's QML type major version number |
versionMinor | object's QML type minor version number |
qmlName | object's QML type name |
createFunc | object's constructor function |
Definition at line 45 of file ZblSprocket.cpp.
Referenced by Zbl::ZblCog::registerSprocketObject(), and sprocketTag().
|
inline |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>"
Definition at line 90 of file ZblSprocket.h.
Referenced by insertSprock(), Zbl::ZblCog::isMappedResource(), Zbl::ZblCog::mapResource(), Zbl::ZblCog::registerResource(), Zbl::ZblCog::registerSprocket(), and sprocketTag().
|
static |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>"
Definition at line 166 of file ZblSprocket.cpp.
|
static |
returns a string in the form of "<uri>:<majorVersion>:<minorVersion>"
Definition at line 178 of file ZblSprocket.cpp.
|
inline |
returns the Sprocket plugin's uri
Definition at line 72 of file ZblSprocket.h.
Referenced by sprocketTag(), and ZblSprocket().
|
inlineprotected |
Computes a version key for the specified version number.
Keys are computed as [(majorVersion * 10) + minorVersion]
versionMajor | major version number |
versionMinor | minor version number |
Definition at line 146 of file ZblSprocket.h.
Referenced by findSprock(), and insertSprock().
|
inline |
returns the Sprocket plugin's major version number
Definition at line 78 of file ZblSprocket.h.
Referenced by sprocketTag(), and ZblSprocket().
|
inline |
returns the Sprocket plugin's minor version number
Definition at line 84 of file ZblSprocket.h.
Referenced by sprocketTag(), versionKey(), and ZblSprocket().
|
friend |
Definition at line 40 of file ZblSprocket.h.
|
protected |
Maps object QML names to maps of sprocket object foundaries. Each foundary contains a separate object construction wrapper for each version of the named object.
Definition at line 197 of file ZblSprocket.h.
Referenced by Zbl::ZblCog::createFactory(), findSprock(), and insertSprock().
|
protected |
Sprocket plugin uri.
Definition at line 179 of file ZblSprocket.h.
Referenced by uri(), and ZblSprocket().
|
protected |
Sprocket plugin major version number.
Definition at line 184 of file ZblSprocket.h.
Referenced by versionMajor(), and ZblSprocket().
|
protected |
Sprocket plugin minor version number.
Definition at line 189 of file ZblSprocket.h.
Referenced by versionMinor(), and ZblSprocket().
Zuble documentation copyright © 2019 Bob Dinitto. 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. Zuble is a derivative work of Qt version 5. 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.