The Cog is an internal singleton object (ZblCog) that provides binary resource management and sprocket object factory services to Zuble applications. Sprockets are QML extension plugins that extend Zuble's core capabilities or add custom C++ code to Zuble QML applications.
This allows Zuble applications to switch binary resources containing images and QML code by simply editing the resource bundle mapping in the zblconfig.xml file. This feature is intended to ease implementation of application localization but could serve other purposes as well.
Additionally QML extension plugins such as sprockets can specify a resource bundle within the plugin's metadata for use by the plugin. The plugin resource bundle can then be loaded automatically by the resource manager either before or after the plugin is loaded. This allows Zuble's QML types, images and other binary data to easily be packaged and deployed with Zuble sprocket plugins in a standardized format.
The ZblCog object manages Zuble sprockets by creating object factories for Zuble background script threads so scripts can create Zuble objects using the Zbl API. Sprockets use the ZblCog::registerSprocket() and ZblCog::registerSprocketObject() methods to register sprocket objects to be included in object factories created by ZblCog.
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.