Differential D24817 Diff 68400 src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp
Changeset View
Changeset View
Standalone View
Standalone View
src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp
- This file was added.
1 | #include <QtScript/QScriptEngine> | ||||
---|---|---|---|---|---|
2 | #include <QtScript/QScriptContext> | ||||
3 | #include <QtScript/QScriptValue> | ||||
4 | #include <QtCore/QStringList> | ||||
5 | #include <QtCore/QDebug> | ||||
6 | #include <qmetaobject.h> | ||||
7 | #include <__package_shared.h> | ||||
8 | | ||||
9 | #include <qxmlstream.h> | ||||
10 | #include <QVariant> | ||||
11 | #include <qxmlstream.h> | ||||
12 | | ||||
13 | static const char * const qtscript_QXmlStreamEntityDeclaration_function_names[] = { | ||||
14 | "QXmlStreamEntityDeclaration" | ||||
15 | // static | ||||
16 | // prototype | ||||
17 | , "name" | ||||
18 | , "notationName" | ||||
19 | , "equals" | ||||
20 | , "publicId" | ||||
21 | , "systemId" | ||||
22 | , "value" | ||||
23 | , "toString" | ||||
24 | }; | ||||
25 | | ||||
26 | static const char * const qtscript_QXmlStreamEntityDeclaration_function_signatures[] = { | ||||
27 | "\nQXmlStreamEntityDeclaration arg__1" | ||||
28 | // static | ||||
29 | // prototype | ||||
30 | , "" | ||||
31 | , "" | ||||
32 | , "QXmlStreamEntityDeclaration other" | ||||
33 | , "" | ||||
34 | , "" | ||||
35 | , "" | ||||
36 | "" | ||||
37 | }; | ||||
38 | | ||||
39 | static const int qtscript_QXmlStreamEntityDeclaration_function_lengths[] = { | ||||
40 | 1 | ||||
41 | // static | ||||
42 | // prototype | ||||
43 | , 0 | ||||
44 | , 0 | ||||
45 | , 1 | ||||
46 | , 0 | ||||
47 | , 0 | ||||
48 | , 0 | ||||
49 | , 0 | ||||
50 | }; | ||||
51 | | ||||
52 | static QScriptValue qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper( | ||||
53 | QScriptContext *context, const char *functionName, const char *signatures) | ||||
54 | { | ||||
55 | QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); | ||||
56 | QStringList fullSignatures; | ||||
57 | for (int i = 0; i < lines.size(); ++i) | ||||
58 | fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); | ||||
59 | return context->throwError(QString::fromLatin1("QXmlStreamEntityDeclaration::%0(): could not find a function match; candidates are:\n%1") | ||||
60 | .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); | ||||
61 | } | ||||
62 | | ||||
63 | Q_DECLARE_METATYPE(QXmlStreamEntityDeclaration) | ||||
64 | Q_DECLARE_METATYPE(QXmlStreamEntityDeclaration*) | ||||
65 | Q_DECLARE_METATYPE(QStringRef) | ||||
66 | | ||||
67 | // | ||||
68 | // QXmlStreamEntityDeclaration | ||||
69 | // | ||||
70 | | ||||
71 | static QScriptValue qtscript_QXmlStreamEntityDeclaration_prototype_call(QScriptContext *context, QScriptEngine *) | ||||
72 | { | ||||
73 | #if QT_VERSION > 0x040400 | ||||
74 | Q_ASSERT(context->callee().isFunction()); | ||||
75 | uint _id = context->callee().data().toUInt32(); | ||||
76 | #else | ||||
77 | uint _id; | ||||
78 | if (context->callee().isFunction()) | ||||
79 | _id = context->callee().data().toUInt32(); | ||||
80 | else | ||||
81 | _id = 0xBABE0000 + 6; | ||||
82 | #endif | ||||
83 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
84 | _id &= 0x0000FFFF; | ||||
85 | QXmlStreamEntityDeclaration* _q_self = qscriptvalue_cast<QXmlStreamEntityDeclaration*>(context->thisObject()); | ||||
86 | if (!_q_self) { | ||||
87 | return context->throwError(QScriptContext::TypeError, | ||||
88 | QString::fromLatin1("QXmlStreamEntityDeclaration.%0(): this object is not a QXmlStreamEntityDeclaration") | ||||
89 | .arg(qtscript_QXmlStreamEntityDeclaration_function_names[_id+1])); | ||||
90 | } | ||||
91 | | ||||
92 | switch (_id) { | ||||
93 | case 0: | ||||
94 | if (context->argumentCount() == 0) { | ||||
95 | QStringRef _q_result = _q_self->name(); | ||||
96 | | ||||
97 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
98 | QString _q_convertedResult = _q_result.toString(); | ||||
99 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
100 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
101 | } | ||||
102 | break; | ||||
103 | | ||||
104 | case 1: | ||||
105 | if (context->argumentCount() == 0) { | ||||
106 | QStringRef _q_result = _q_self->notationName(); | ||||
107 | | ||||
108 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
109 | QString _q_convertedResult = _q_result.toString(); | ||||
110 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
111 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
112 | } | ||||
113 | break; | ||||
114 | | ||||
115 | case 2: | ||||
116 | if (context->argumentCount() == 1) { | ||||
117 | QXmlStreamEntityDeclaration _q_arg0 = qscriptvalue_cast<QXmlStreamEntityDeclaration>(context->argument(0)); | ||||
118 | bool _q_result = _q_self->operator==(_q_arg0); | ||||
119 | return QScriptValue(context->engine(), _q_result); | ||||
120 | } | ||||
121 | break; | ||||
122 | | ||||
123 | case 3: | ||||
124 | if (context->argumentCount() == 0) { | ||||
125 | QStringRef _q_result = _q_self->publicId(); | ||||
126 | | ||||
127 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
128 | QString _q_convertedResult = _q_result.toString(); | ||||
129 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
130 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
131 | } | ||||
132 | break; | ||||
133 | | ||||
134 | case 4: | ||||
135 | if (context->argumentCount() == 0) { | ||||
136 | QStringRef _q_result = _q_self->systemId(); | ||||
137 | | ||||
138 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
139 | QString _q_convertedResult = _q_result.toString(); | ||||
140 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
141 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
142 | } | ||||
143 | break; | ||||
144 | | ||||
145 | case 5: | ||||
146 | if (context->argumentCount() == 0) { | ||||
147 | QStringRef _q_result = _q_self->value(); | ||||
148 | | ||||
149 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
150 | QString _q_convertedResult = _q_result.toString(); | ||||
151 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
152 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
153 | } | ||||
154 | break; | ||||
155 | | ||||
156 | case 6: { | ||||
157 | QString result = QString::fromLatin1("QXmlStreamEntityDeclaration"); | ||||
158 | return QScriptValue(context->engine(), result); | ||||
159 | } | ||||
160 | | ||||
161 | default: | ||||
162 | Q_ASSERT(false); | ||||
163 | } | ||||
164 | return qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper(context, | ||||
165 | qtscript_QXmlStreamEntityDeclaration_function_names[_id+1], | ||||
166 | qtscript_QXmlStreamEntityDeclaration_function_signatures[_id+1]); | ||||
167 | } | ||||
168 | | ||||
169 | static QScriptValue qtscript_QXmlStreamEntityDeclaration_static_call(QScriptContext *context, QScriptEngine *) | ||||
170 | { | ||||
171 | uint _id = context->callee().data().toUInt32(); | ||||
172 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
173 | _id &= 0x0000FFFF; | ||||
174 | switch (_id) { | ||||
175 | case 0: | ||||
176 | if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { | ||||
177 | return context->throwError(QString::fromLatin1("QXmlStreamEntityDeclaration(): Did you forget to construct with 'new'?")); | ||||
178 | } | ||||
179 | if (context->argumentCount() == 0) { | ||||
180 | QXmlStreamEntityDeclaration _q_cpp_result; | ||||
181 | QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); | ||||
182 | return _q_result; | ||||
183 | } else if (context->argumentCount() == 1) { | ||||
184 | QXmlStreamEntityDeclaration _q_arg0 = qscriptvalue_cast<QXmlStreamEntityDeclaration>(context->argument(0)); | ||||
185 | QXmlStreamEntityDeclaration _q_cpp_result(_q_arg0); | ||||
186 | QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); | ||||
187 | return _q_result; | ||||
188 | } | ||||
189 | break; | ||||
190 | | ||||
191 | default: | ||||
192 | Q_ASSERT(false); | ||||
193 | } | ||||
194 | return qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper(context, | ||||
195 | qtscript_QXmlStreamEntityDeclaration_function_names[_id], | ||||
196 | qtscript_QXmlStreamEntityDeclaration_function_signatures[_id]); | ||||
197 | } | ||||
198 | | ||||
199 | QScriptValue qtscript_create_QXmlStreamEntityDeclaration_class(QScriptEngine *engine) | ||||
200 | { | ||||
201 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamEntityDeclaration*>(), QScriptValue()); | ||||
202 | QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamEntityDeclaration*)0)); | ||||
203 | for (int i = 0; i < 7; ++i) { | ||||
204 | QScriptValue fun = engine->newFunction(qtscript_QXmlStreamEntityDeclaration_prototype_call, qtscript_QXmlStreamEntityDeclaration_function_lengths[i+1]); | ||||
205 | fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); | ||||
206 | proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamEntityDeclaration_function_names[i+1]), | ||||
207 | fun, QScriptValue::SkipInEnumeration); | ||||
208 | } | ||||
209 | | ||||
210 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamEntityDeclaration>(), proto); | ||||
211 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamEntityDeclaration*>(), proto); | ||||
212 | | ||||
213 | QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamEntityDeclaration_static_call, proto, qtscript_QXmlStreamEntityDeclaration_function_lengths[0]); | ||||
214 | ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); | ||||
215 | | ||||
216 | return ctor; | ||||
217 | } |