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 // StoreUrl - Store a QUrl in a core property
92 // StoreColor - Store a QColor in a core property
93 // StoreDate - Store a QDate in a core property
94 // StoreTime - Store a QTime in a core property
95 // StoreDateTime - Store a QDateTime in a core property
96 // StoreVariant - Store a QVariant in a core property
97 // StoreObject - Pop the object on the top of the object stack and
98 // store it in a core property
99 StoreFloat, /* storeFloat */
100 StoreDouble, /* storeDouble */
101 StoreInteger, /* storeInteger */
102 StoreBool, /* storeBool */
103 StoreString, /* storeString */
104 StoreUrl, /* storeUrl */
105 StoreColor, /* storeColor */
106 StoreDate, /* storeDate */
107 StoreTime, /* storeTime */
108 StoreDateTime, /* storeDateTime */
109 StorePoint, /* storeRealPair */
110 StorePointF, /* storeRealPair */
111 StoreSize, /* storeRealPair */
112 StoreSizeF, /* storeRealPair */
113 StoreRect, /* storeRect */
114 StoreRectF, /* storeRect */
115 StoreVector3D, /* storeVector3D */
116 StoreVariant, /* storeString */
117 StoreVariantInteger, /* storeInteger */
118 StoreVariantDouble, /* storeDouble */
119 StoreVariantBool, /* storeBool */
120 StoreObject, /* storeObject */
121 StoreVariantObject, /* storeObject */
122 StoreInterface, /* storeObject */
124 StoreSignal, /* storeSignal */
125 StoreImportedScript, /* storeScript */
126 StoreScriptString, /* storeScriptString */
129 // Unresolved single assignment
131 AssignSignalObject, /* assignSignalObject */
132 AssignCustomType, /* assignCustomType */
134 StoreBinding, /* assignBinding */
135 StoreBindingOnAlias, /* assignBinding */
136 StoreCompiledBinding, /* assignBinding */
137 StoreValueSource, /* assignValueSource */
138 StoreValueInterceptor, /* assignValueInterceptor */
140 BeginObject, /* begin */
142 StoreObjectQList, /* NA */
143 AssignObjectList, /* NA */
145 FetchAttached, /* fetchAttached */
146 FetchQList, /* fetch */
147 FetchObject, /* fetch */
148 FetchValueType, /* fetchValue */
151 // Stack manipulation
153 // PopFetchedObject - Remove an object from the object stack
154 // PopQList - Remove a list from the list stack
157 PopValueType, /* fetchValue */
164 QDeclarativeInstruction()
170 struct InitInstruction {
172 int parserStatusSize;
176 struct CreateInstruction {
182 struct CreateSimpleInstruction {
183 void (*create)(void *);
188 struct StoreMetaInstruction {
193 struct SetIdInstruction {
197 struct AssignValueSourceInstruction {
202 struct AssignValueInterceptorInstruction {
207 struct AssignBindingInstruction {
208 unsigned int property;
213 struct FetchInstruction {
216 struct FetchValueInstruction {
219 quint32 bindingSkipList;
221 struct FetchQmlListInstruction {
225 struct BeginInstruction {
228 struct StoreFloatInstruction {
232 struct StoreDoubleInstruction {
236 struct StoreIntegerInstruction {
240 struct StoreBoolInstruction {
244 struct StoreStringInstruction {
248 struct StoreScriptStringInstruction {
253 struct StoreScriptInstruction {
256 struct StoreUrlInstruction {
260 struct StoreColorInstruction {
264 struct StoreDateInstruction {
268 struct StoreTimeInstruction {
272 struct StoreDateTimeInstruction {
276 struct StoreRealPairInstruction {
280 struct StoreRectInstruction {
284 struct StoreVector3DInstruction {
288 struct StoreObjectInstruction {
291 struct AssignCustomTypeInstruction {
295 struct StoreSignalInstruction {
301 struct AssignSignalObjectInstruction {
304 struct CreateComponentInstruction {
310 struct FetchAttachedInstruction {
313 struct DeferInstruction {
318 InitInstruction init;
319 CreateInstruction create;
320 CreateSimpleInstruction createSimple;
321 StoreMetaInstruction storeMeta;
322 SetIdInstruction setId;
323 AssignValueSourceInstruction assignValueSource;
324 AssignValueInterceptorInstruction assignValueInterceptor;
325 AssignBindingInstruction assignBinding;
326 FetchInstruction fetch;
327 FetchValueInstruction fetchValue;
328 FetchQmlListInstruction fetchQmlList;
329 BeginInstruction begin;
330 StoreFloatInstruction storeFloat;
331 StoreDoubleInstruction storeDouble;
332 StoreIntegerInstruction storeInteger;
333 StoreBoolInstruction storeBool;
334 StoreStringInstruction storeString;
335 StoreScriptStringInstruction storeScriptString;
336 StoreScriptInstruction storeScript;
337 StoreUrlInstruction storeUrl;
338 StoreColorInstruction storeColor;
339 StoreDateInstruction storeDate;
340 StoreTimeInstruction storeTime;
341 StoreDateTimeInstruction storeDateTime;
342 StoreRealPairInstruction storeRealPair;
343 StoreRectInstruction storeRect;
344 StoreVector3DInstruction storeVector3D;
345 StoreObjectInstruction storeObject;
346 AssignCustomTypeInstruction assignCustomType;
347 StoreSignalInstruction storeSignal;
348 AssignSignalObjectInstruction assignSignalObject;
349 CreateComponentInstruction createComponent;
350 FetchAttachedInstruction fetchAttached;
351 DeferInstruction defer;
354 void dump(QDeclarativeCompiledData *);
359 #endif // QDECLARATIVEINSTRUCTION_P_H