1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
42 #ifndef QDECLARATIVEINSTRUCTION_P_H
43 #define QDECLARATIVEINSTRUCTION_P_H
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
56 #include <QtCore/qglobal.h>
60 class QDeclarativeCompiledData;
61 class Q_AUTOTEST_EXPORT QDeclarativeInstruction
68 // CreateObject - Create a new object instance and push it on the
70 // SetId - Set the id of the object on the top of the object stack
71 // SetDefault - Sets the instance on the top of the object stack to
72 // be the context's default object.
73 // StoreMetaObject - Assign the dynamic metaobject to object on the
76 CreateObject, /* create */
77 CreateSimpleObject, /* createSimple */
80 CreateComponent, /* createComponent */
81 StoreMetaObject, /* storeMeta */
84 // Precomputed single assignment
86 // StoreFloat - Store a float in a core property
87 // StoreDouble - Store a double in a core property
88 // StoreInteger - Store a int or uint in a core property
89 // StoreBool - Store a bool in a core property
90 // StoreString - Store a QString in a core property
91 // StoreByteArray - Store a QByteArray in a core property
92 // StoreUrl - Store a QUrl in a core property
93 // StoreColor - Store a QColor in a core property
94 // StoreDate - Store a QDate in a core property
95 // StoreTime - Store a QTime in a core property
96 // StoreDateTime - Store a QDateTime in a core property
97 // StoreVariant - Store a QVariant in a core property
98 // StoreObject - Pop the object on the top of the object stack and
99 // store it in a core property
100 StoreFloat, /* storeFloat */
101 StoreDouble, /* storeDouble */
102 StoreInteger, /* storeInteger */
103 StoreBool, /* storeBool */
104 StoreString, /* storeString */
105 StoreByteArray, /* storeByteArray */
106 StoreUrl, /* storeUrl */
107 StoreColor, /* storeColor */
108 StoreDate, /* storeDate */
109 StoreTime, /* storeTime */
110 StoreDateTime, /* storeDateTime */
111 StorePoint, /* storeRealPair */
112 StorePointF, /* storeRealPair */
113 StoreSize, /* storeRealPair */
114 StoreSizeF, /* storeRealPair */
115 StoreRect, /* storeRect */
116 StoreRectF, /* storeRect */
117 StoreVector3D, /* storeVector3D */
118 StoreVariant, /* storeString */
119 StoreVariantInteger, /* storeInteger */
120 StoreVariantDouble, /* storeDouble */
121 StoreVariantBool, /* storeBool */
122 StoreObject, /* storeObject */
123 StoreVariantObject, /* storeObject */
124 StoreInterface, /* storeObject */
126 StoreSignal, /* storeSignal */
127 StoreImportedScript, /* storeScript */
128 StoreScriptString, /* storeScriptString */
131 // Unresolved single assignment
133 AssignSignalObject, /* assignSignalObject */
134 AssignCustomType, /* assignCustomType */
136 StoreBinding, /* assignBinding */
137 StoreBindingOnAlias, /* assignBinding */
138 StoreCompiledBinding, /* assignBinding */
139 StoreValueSource, /* assignValueSource */
140 StoreValueInterceptor, /* assignValueInterceptor */
142 BeginObject, /* begin */
144 StoreObjectQList, /* NA */
145 AssignObjectList, /* NA */
147 FetchAttached, /* fetchAttached */
148 FetchQList, /* fetch */
149 FetchObject, /* fetch */
150 FetchValueType, /* fetchValue */
153 // Stack manipulation
155 // PopFetchedObject - Remove an object from the object stack
156 // PopQList - Remove a list from the list stack
159 PopValueType, /* fetchValue */
166 QDeclarativeInstruction()
172 struct InitInstruction {
174 int parserStatusSize;
178 struct CreateInstruction {
184 struct CreateSimpleInstruction {
185 void (*create)(void *);
190 struct StoreMetaInstruction {
195 struct SetIdInstruction {
199 struct AssignValueSourceInstruction {
204 struct AssignValueInterceptorInstruction {
209 struct AssignBindingInstruction {
210 unsigned int property;
215 struct FetchInstruction {
218 struct FetchValueInstruction {
221 quint32 bindingSkipList;
223 struct FetchQmlListInstruction {
227 struct BeginInstruction {
230 struct StoreFloatInstruction {
234 struct StoreDoubleInstruction {
238 struct StoreIntegerInstruction {
242 struct StoreBoolInstruction {
246 struct StoreStringInstruction {
250 struct StoreByteArrayInstruction {
254 struct StoreScriptStringInstruction {
259 struct StoreScriptInstruction {
262 struct StoreUrlInstruction {
266 struct StoreColorInstruction {
270 struct StoreDateInstruction {
274 struct StoreTimeInstruction {
278 struct StoreDateTimeInstruction {
282 struct StoreRealPairInstruction {
286 struct StoreRectInstruction {
290 struct StoreVector3DInstruction {
294 struct StoreObjectInstruction {
297 struct AssignCustomTypeInstruction {
301 struct StoreSignalInstruction {
307 struct AssignSignalObjectInstruction {
310 struct CreateComponentInstruction {
316 struct FetchAttachedInstruction {
319 struct DeferInstruction {
324 InitInstruction init;
325 CreateInstruction create;
326 CreateSimpleInstruction createSimple;
327 StoreMetaInstruction storeMeta;
328 SetIdInstruction setId;
329 AssignValueSourceInstruction assignValueSource;
330 AssignValueInterceptorInstruction assignValueInterceptor;
331 AssignBindingInstruction assignBinding;
332 FetchInstruction fetch;
333 FetchValueInstruction fetchValue;
334 FetchQmlListInstruction fetchQmlList;
335 BeginInstruction begin;
336 StoreFloatInstruction storeFloat;
337 StoreDoubleInstruction storeDouble;
338 StoreIntegerInstruction storeInteger;
339 StoreBoolInstruction storeBool;
340 StoreStringInstruction storeString;
341 StoreByteArrayInstruction storeByteArray;
342 StoreScriptStringInstruction storeScriptString;
343 StoreScriptInstruction storeScript;
344 StoreUrlInstruction storeUrl;
345 StoreColorInstruction storeColor;
346 StoreDateInstruction storeDate;
347 StoreTimeInstruction storeTime;
348 StoreDateTimeInstruction storeDateTime;
349 StoreRealPairInstruction storeRealPair;
350 StoreRectInstruction storeRect;
351 StoreVector3DInstruction storeVector3D;
352 StoreObjectInstruction storeObject;
353 AssignCustomTypeInstruction assignCustomType;
354 StoreSignalInstruction storeSignal;
355 AssignSignalObjectInstruction assignSignalObject;
356 CreateComponentInstruction createComponent;
357 FetchAttachedInstruction fetchAttached;
358 DeferInstruction defer;
361 void dump(QDeclarativeCompiledData *);
366 #endif // QDECLARATIVEINSTRUCTION_P_H