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
Protected Member Functions | Static Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
Zbl::Zblcore Class Reference

The core Zuble QML Extension plugin class. More...

#include <Zblcore.h>

Inheritance diagram for Zbl::Zblcore:
Inheritance graph
[legend]
Collaboration diagram for Zbl::Zblcore:
Collaboration graph
[legend]

Protected Member Functions

void loadLogModules ()
 

Static Protected Attributes

static ZApplicationm_zApp = nullptr
 

Private Member Functions

virtual void initializeEngine (QQmlEngine *engine, const char *uri)
 This override of QQmlExtensionPlugin is currently unused and may be deprecated. More...
 
virtual void registerTypes (const char *uri)
 Override of QQmlExtensionPlugin is called by the QML engine to register the Zuble core plugin's QML types. More...
 
virtual bool mapResource (const char *uri, int versionMajor, int versionMinor, const char *fileName)
 Binds a resource uri to a resource file. See ZblCog for more information. More...
 
virtual bool registerResource (const char *uri, int versionMajor, int versionMinor)
 Registers a binary resource with QML. This makes a resource available to QML documents. More...
 
virtual bool mapConfigResources (const char *configFilePath)
 Read binary resource file information from the specified Zuble application configuration file (zblconfig.xml). More...
 
virtual bool mapPluginResources (const char *fileName, bool qmlRegister)
 Read binary resource file information from the specified Zuble sprocket plugin. More...
 
virtual bool mapConfigSettings (const char *fileName)
 Load QML settings bundles from the specified Zuble application configuration file (zblconfig.xml) More...
 

Static Private Member Functions

static ZApplicationzApplication ()
 Return a reference to the encapsulated singleton ZApplication object. More...
 
static bool isInitialized ()
 true if the ZApplication object has completed initialization, false otherwise More...
 

Additional Inherited Members

- Public Member Functions inherited from Zbl::ZResourceEdifyIF
virtual ~ZResourceEdifyIF ()
 

Detailed Description

The core Zuble QML Extension plugin class.

This singleton object is instanciated by the QML engine when the Zuble plugin is first loaded. It immediately constructs and initializes the ZblLogManager object, constructs the ZApplication singleton object, and constructs the ZblCog singleton object.

Zblcore implements the ZResourceEdifyIF interface to allow C++ programs to load resources critical to the execution of Zuble applications. This allows us to resolve binary resource interdependencies directly in C++ and avoid the loading semantics of the QML engine "import" mechanism which can sometimes result in chicken/egg resource loading problems when multiple resource files are interdependent. Execution order of the QML import statements is irrelevant if the resources being imported have already been loaded prior to the execution of the QML code that uses them.

Definition at line 78 of file Zblcore.h.

Member Function Documentation

◆ initializeEngine()

void Zbl::Zblcore::initializeEngine ( QQmlEngine *  engine,
const char *  uri 
)
privatevirtual

This override of QQmlExtensionPlugin is currently unused and may be deprecated.

Parameters
engine
uri

Definition at line 188 of file Zblcore.cpp.

◆ isInitialized()

bool Zbl::Zblcore::isInitialized ( )
staticprivate

true if the ZApplication object has completed initialization, false otherwise

Returns

Definition at line 140 of file Zblcore.cpp.

Referenced by Zbl::ZSettings::insertBundle().

◆ loadLogModules()

void Zbl::Zblcore::loadLogModules ( )
protected

Definition at line 268 of file Zblcore.cpp.

◆ mapConfigResources()

bool Zbl::Zblcore::mapConfigResources ( const char *  configFilePath)
privatevirtual

Read binary resource file information from the specified Zuble application configuration file (zblconfig.xml).

Parameters
configFilePath
Returns
See also
Zbl::ZblCog::mapConfigResources

Implements Zbl::ZResourceEdifyIF.

Definition at line 171 of file Zblcore.cpp.

◆ mapConfigSettings()

bool Zbl::Zblcore::mapConfigSettings ( const char *  fileName)
privatevirtual

Load QML settings bundles from the specified Zuble application configuration file (zblconfig.xml)

Parameters
fileName
Returns
See also
Zbl::ZSettings::mapConfigSettings

Implements Zbl::ZResourceEdifyIF.

Definition at line 251 of file Zblcore.cpp.

◆ mapPluginResources()

bool Zbl::Zblcore::mapPluginResources ( const char *  fileName,
bool  qmlRegister 
)
privatevirtual

Read binary resource file information from the specified Zuble sprocket plugin.

Parameters
fileNamePath to the plugin file
qmlRegistertrue to register the resources with QML immediately, false otherwise (caller must register resources later)
Returns
See also
Zbl::ZblCog::mapPluginResources

Implements Zbl::ZResourceEdifyIF.

Definition at line 181 of file Zblcore.cpp.

◆ mapResource()

bool Zbl::Zblcore::mapResource ( const char *  uri,
int  versionMajor,
int  versionMinor,
const char *  fileName 
)
privatevirtual

Binds a resource uri to a resource file. See ZblCog for more information.

Parameters
uri
versionMajor
versionMinor
fileName
Returns
See also
Zbl::ZblCog::mapResource

Implements Zbl::ZResourceEdifyIF.

Definition at line 157 of file Zblcore.cpp.

◆ registerResource()

bool Zbl::Zblcore::registerResource ( const char *  uri,
int  versionMajor,
int  versionMinor 
)
privatevirtual

Registers a binary resource with QML. This makes a resource available to QML documents.

Call mapConfigResources or mapPluginResources to bind a resource file name to the resource uri before calling this method.

Parameters
uri
versionMajor
versionMinor
Returns
See also
Zbl::ZblCog::registerResource

Implements Zbl::ZResourceEdifyIF.

Definition at line 145 of file Zblcore.cpp.

◆ registerTypes()

void Zbl::Zblcore::registerTypes ( const char *  uri)
privatevirtual

Override of QQmlExtensionPlugin is called by the QML engine to register the Zuble core plugin's QML types.

Parameters
uriThe uri of the plugin as specified in the import statment that loaded it.

Definition at line 195 of file Zblcore.cpp.

◆ zApplication()

ZApplication & Zbl::Zblcore::zApplication ( )
staticprivate

Return a reference to the encapsulated singleton ZApplication object.

Returns

Definition at line 258 of file Zblcore.cpp.

Member Data Documentation

◆ m_zApp

ZApplication * Zbl::Zblcore::m_zApp = nullptr
staticprotected

Definition at line 204 of file Zblcore.h.


The documentation for this class was generated from the following files: