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
ZblFactory.h
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2014 Bob Dinitto
4  *
5  * Filename: ZblFactory.h
6  * Created on: 12/7/2014
7  * Author: Bob Dinitto
8  *
9  * Zuble is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 #ifndef ZBLFACTORY_H
26 #define ZBLFACTORY_H
27 
28 #include <QObject>
29 #include "ZblPlugin.h"
30 
31 namespace Zbl
32 {
33 
54 class ZblFactory : public QObject
55 {
56  friend class ZblCog;
57 
58  Q_OBJECT
59 
60 public:
61 
69  explicit ZblFactory(
72  QObject *parent = 0);
73 
80  QObject* createObject(const char * qmlName);
81 
87 
92 
93 signals:
94 
95 public slots:
96 
97 
98 protected:
99 
105 
111 
118 
119 };
120 
121 } // Zbl
122 
123 #endif // ZBLFACTORY_H
int m_importVersionMinor
minor version number of the import
Definition: ZblFactory.h:110
sprocketObjectMap m_objectFunctions
Maps QML type names to appropriate version-specific Sprocket object constructors. ...
Definition: ZblFactory.h:117
int importVersionMajor()
returns the major import version number
Definition: ZblFactory.h:86
QObject * createObject(const char *qmlName)
Locates the Sprocket object&#39;s constructor for the specified QML type and calls it, returning the resulting object.
Definition: ZblFactory.cpp:45
Definition: ZAndGate.cpp:6
QMap< QString, ZblSprockOb * > sprocketObjectMap
Maps Sprocket QML type names to object construction wrappers.
Definition: ZblPlugin.h:78
ZblFactory(int importVersionMajor, int importVersionMinor, QObject *parent=0)
Object constructor.
Definition: ZblFactory.cpp:34
Maintains a map of Zuble Sprockets and creates Sprocket object factories for javascript background th...
Definition: ZblCog.h:110
An object factory that creates new instances of objects defined by a Zuble sprocket. Used primarily to construct sprocket objects in Zuble background threads.
Definition: ZblFactory.h:54
int importVersionMinor()
returns the minor import version number
Definition: ZblFactory.h:91
int m_importVersionMajor
major version number of the import
Definition: ZblFactory.h:104