Fix reset of properties with default value
[qt:qtmodeling.git] / src / uml / qobjects / qumlexpressionobject.cpp
1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Sandro S. Andrade <sandroandrade@kde.org>
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtUml module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.  For licensing terms and
14 ** conditions see http://qt.digia.com/licensing.  For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights.  These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file.  Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 #include "qumlexpressionobject_p.h"
42 #include "private/qmodelingobject_p.h"
43
44 #include <QtUml/QUmlExpression>
45 #include <QtUml/QUmlComment>
46 #include <QtUml/QUmlDependency>
47 #include <QtUml/QUmlElement>
48 #include <QtUml/QUmlNamedElement>
49 #include <QtUml/QUmlNamespace>
50 #include <QtUml/QUmlPackage>
51 #include <QtUml/QUmlParameterableElement>
52 #include <QtUml/QUmlStringExpression>
53 #include <QtUml/QUmlTemplateParameter>
54 #include <QtUml/QUmlType>
55 #include <QtUml/QUmlValueSpecification>
56
57 QT_BEGIN_NAMESPACE
58
59 QUmlExpressionObject::QUmlExpressionObject(QUmlExpression *modelingElement)
60 {
61     setProperty("modelingElement", QVariant::fromValue(static_cast<QModelingElement *>(modelingElement)));
62     setGroupProperties();
63     setPropertyData();
64 }
65
66 // OWNED ATTRIBUTES [Element]
67
68 const QSet<QObject *> QUmlExpressionObject::ownedComments() const
69 {
70     QSet<QObject *> set;
71     foreach (QUmlComment *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->ownedComments())
72         set.insert(element->asQModelingObject());
73     return set;
74 }
75
76 const QSet<QObject *> QUmlExpressionObject::ownedElements() const
77 {
78     QSet<QObject *> set;
79     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->ownedElements())
80         set.insert(element->asQModelingObject());
81     return set;
82 }
83
84 QObject *QUmlExpressionObject::owner() const
85 {
86     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->owner())
87         return 0;
88     else
89         return qmodelingelementproperty_cast<QUmlExpression *>(this)->owner()->asQModelingObject();
90 }
91
92 // OWNED ATTRIBUTES [NamedElement]
93
94 const QSet<QObject *> QUmlExpressionObject::clientDependencies() const
95 {
96     QSet<QObject *> set;
97     foreach (QUmlDependency *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->clientDependencies())
98         set.insert(element->asQModelingObject());
99     return set;
100 }
101
102 QString QUmlExpressionObject::name() const
103 {
104     return qmodelingelementproperty_cast<QUmlExpression *>(this)->name();
105 }
106
107 QObject *QUmlExpressionObject::nameExpression() const
108 {
109     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->nameExpression())
110         return 0;
111     else
112         return qmodelingelementproperty_cast<QUmlExpression *>(this)->nameExpression()->asQModelingObject();
113 }
114
115 QObject *QUmlExpressionObject::namespace_() const
116 {
117     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->namespace_())
118         return 0;
119     else
120         return qmodelingelementproperty_cast<QUmlExpression *>(this)->namespace_()->asQModelingObject();
121 }
122
123 QString QUmlExpressionObject::qualifiedName() const
124 {
125     return qmodelingelementproperty_cast<QUmlExpression *>(this)->qualifiedName();
126 }
127
128 // OWNED ATTRIBUTES [TypedElement]
129
130 QObject *QUmlExpressionObject::type() const
131 {
132     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->type())
133         return 0;
134     else
135         return qmodelingelementproperty_cast<QUmlExpression *>(this)->type()->asQModelingObject();
136 }
137
138 // OWNED ATTRIBUTES [ParameterableElement]
139
140 QObject *QUmlExpressionObject::owningTemplateParameter() const
141 {
142     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->owningTemplateParameter())
143         return 0;
144     else
145         return qmodelingelementproperty_cast<QUmlExpression *>(this)->owningTemplateParameter()->asQModelingObject();
146 }
147
148 QObject *QUmlExpressionObject::templateParameter() const
149 {
150     if (!qmodelingelementproperty_cast<QUmlExpression *>(this)->templateParameter())
151         return 0;
152     else
153         return qmodelingelementproperty_cast<QUmlExpression *>(this)->templateParameter()->asQModelingObject();
154 }
155
156 // OWNED ATTRIBUTES [PackageableElement]
157
158 QtUml::VisibilityKind QUmlExpressionObject::visibility() const
159 {
160     return qmodelingelementproperty_cast<QUmlExpression *>(this)->visibility();
161 }
162
163 // OWNED ATTRIBUTES [Expression]
164
165 const QList<QObject *> QUmlExpressionObject::operands() const
166 {
167     QList<QObject *> list;
168     foreach (QUmlValueSpecification *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->operands())
169         list.append(element->asQModelingObject());
170     return list;
171 }
172
173 QString QUmlExpressionObject::symbol() const
174 {
175     return qmodelingelementproperty_cast<QUmlExpression *>(this)->symbol();
176 }
177
178 // OPERATIONS [Element]
179
180 QSet<QObject *> QUmlExpressionObject::allOwnedElements() const
181 {
182     QSet<QObject *> set;
183     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->allOwnedElements())
184         set.insert(element->asQModelingObject());
185     return set;
186 }
187
188 bool QUmlExpressionObject::mustBeOwned() const
189 {
190     return qmodelingelementproperty_cast<QUmlExpression *>(this)->mustBeOwned();
191 }
192
193 // OPERATIONS [NamedElement]
194
195 QList<QObject *> QUmlExpressionObject::allNamespaces() const
196 {
197     QList<QObject *> set;
198     foreach (QUmlNamespace *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->allNamespaces())
199         set.append(element->asQModelingObject());
200     return set;
201 }
202
203 QSet<QObject *> QUmlExpressionObject::allOwningPackages() const
204 {
205     QSet<QObject *> set;
206     foreach (QUmlPackage *element, qmodelingelementproperty_cast<QUmlExpression *>(this)->allOwningPackages())
207         set.insert(element->asQModelingObject());
208     return set;
209 }
210
211 bool QUmlExpressionObject::isDistinguishableFrom(QObject *n, QObject *ns) const
212 {
213     return qmodelingelementproperty_cast<QUmlExpression *>(this)->isDistinguishableFrom(qmodelingelementproperty_cast<QUmlNamedElement *>(n), qmodelingelementproperty_cast<QUmlNamespace *>(ns));
214 }
215
216 QString QUmlExpressionObject::separator() const
217 {
218     return qmodelingelementproperty_cast<QUmlExpression *>(this)->separator();
219 }
220
221 // OPERATIONS [ParameterableElement]
222
223 bool QUmlExpressionObject::isTemplateParameter() const
224 {
225     return qmodelingelementproperty_cast<QUmlExpression *>(this)->isTemplateParameter();
226 }
227
228 // OPERATIONS [ValueSpecification]
229
230 bool QUmlExpressionObject::booleanValue() const
231 {
232     return qmodelingelementproperty_cast<QUmlExpression *>(this)->booleanValue();
233 }
234
235 int QUmlExpressionObject::integerValue() const
236 {
237     return qmodelingelementproperty_cast<QUmlExpression *>(this)->integerValue();
238 }
239
240 bool QUmlExpressionObject::isCompatibleWith(QObject *p) const
241 {
242     return qmodelingelementproperty_cast<QUmlExpression *>(this)->isCompatibleWith(qmodelingelementproperty_cast<QUmlParameterableElement *>(p));
243 }
244
245 bool QUmlExpressionObject::isComputable() const
246 {
247     return qmodelingelementproperty_cast<QUmlExpression *>(this)->isComputable();
248 }
249
250 bool QUmlExpressionObject::isNull() const
251 {
252     return qmodelingelementproperty_cast<QUmlExpression *>(this)->isNull();
253 }
254
255 double QUmlExpressionObject::realValue() const
256 {
257     return qmodelingelementproperty_cast<QUmlExpression *>(this)->realValue();
258 }
259
260 QString QUmlExpressionObject::stringValue() const
261 {
262     return qmodelingelementproperty_cast<QUmlExpression *>(this)->stringValue();
263 }
264
265 int QUmlExpressionObject::unlimitedValue() const
266 {
267     return qmodelingelementproperty_cast<QUmlExpression *>(this)->unlimitedValue();
268 }
269
270 // SLOTS FOR OWNED ATTRIBUTES [Element]
271
272 void QUmlExpressionObject::addOwnedComment(QObject *ownedComment)
273 {
274     qmodelingelementproperty_cast<QUmlExpression *>(this)->addOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment));
275 }
276
277 void QUmlExpressionObject::removeOwnedComment(QObject *ownedComment)
278 {
279     qmodelingelementproperty_cast<QUmlExpression *>(this)->removeOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment));
280 }
281
282 void QUmlExpressionObject::addOwnedElement(QObject *ownedElement)
283 {
284     qmodelingelementproperty_cast<QUmlExpression *>(this)->addOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement));
285 }
286
287 void QUmlExpressionObject::removeOwnedElement(QObject *ownedElement)
288 {
289     qmodelingelementproperty_cast<QUmlExpression *>(this)->removeOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement));
290 }
291
292 void QUmlExpressionObject::setOwner(QObject *owner)
293 {
294     qmodelingelementproperty_cast<QUmlExpression *>(this)->setOwner(qmodelingelementproperty_cast<QUmlElement *>(owner));
295 }
296
297 // SLOTS FOR OWNED ATTRIBUTES [NamedElement]
298
299 void QUmlExpressionObject::addClientDependency(QObject *clientDependency)
300 {
301     qmodelingelementproperty_cast<QUmlExpression *>(this)->addClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency));
302 }
303
304 void QUmlExpressionObject::removeClientDependency(QObject *clientDependency)
305 {
306     qmodelingelementproperty_cast<QUmlExpression *>(this)->removeClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency));
307 }
308
309 void QUmlExpressionObject::setName(QString name)
310 {
311     qmodelingelementproperty_cast<QUmlExpression *>(this)->setName(name);
312 }
313
314 void QUmlExpressionObject::setNameExpression(QObject *nameExpression)
315 {
316     qmodelingelementproperty_cast<QUmlExpression *>(this)->setNameExpression(qmodelingelementproperty_cast<QUmlStringExpression *>(nameExpression));
317 }
318
319 void QUmlExpressionObject::setNamespace(QObject *namespace_)
320 {
321     qmodelingelementproperty_cast<QUmlExpression *>(this)->setNamespace(qmodelingelementproperty_cast<QUmlNamespace *>(namespace_));
322 }
323
324 void QUmlExpressionObject::setQualifiedName(QString qualifiedName)
325 {
326     qmodelingelementproperty_cast<QUmlExpression *>(this)->setQualifiedName(qualifiedName);
327 }
328 // SLOTS FOR OWNED ATTRIBUTES [TypedElement]
329
330 void QUmlExpressionObject::setType(QObject *type)
331 {
332     qmodelingelementproperty_cast<QUmlExpression *>(this)->setType(qmodelingelementproperty_cast<QUmlType *>(type));
333 }
334
335 // SLOTS FOR OWNED ATTRIBUTES [ParameterableElement]
336
337 void QUmlExpressionObject::setOwningTemplateParameter(QObject *owningTemplateParameter)
338 {
339     qmodelingelementproperty_cast<QUmlExpression *>(this)->setOwningTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(owningTemplateParameter));
340 }
341
342 void QUmlExpressionObject::setTemplateParameter(QObject *templateParameter)
343 {
344     qmodelingelementproperty_cast<QUmlExpression *>(this)->setTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(templateParameter));
345 }
346
347 // SLOTS FOR OWNED ATTRIBUTES [PackageableElement]
348
349 void QUmlExpressionObject::setVisibility(QtUml::VisibilityKind visibility)
350 {
351     qmodelingelementproperty_cast<QUmlExpression *>(this)->setVisibility(visibility);
352 }
353
354 void QUmlExpressionObject::unsetVisibility()
355 {
356     Q_D(QModelingObject);
357     setVisibility(QtUml::VisibilityKindPublic);
358     d->modifiedResettableProperties.removeAll(QStringLiteral("visibility"));
359 }
360
361 // SLOTS FOR OWNED ATTRIBUTES [Expression]
362
363 void QUmlExpressionObject::addOperand(QObject *operand)
364 {
365     qmodelingelementproperty_cast<QUmlExpression *>(this)->addOperand(qmodelingelementproperty_cast<QUmlValueSpecification *>(operand));
366 }
367
368 void QUmlExpressionObject::removeOperand(QObject *operand)
369 {
370     qmodelingelementproperty_cast<QUmlExpression *>(this)->removeOperand(qmodelingelementproperty_cast<QUmlValueSpecification *>(operand));
371 }
372
373 void QUmlExpressionObject::setSymbol(QString symbol)
374 {
375     qmodelingelementproperty_cast<QUmlExpression *>(this)->setSymbol(symbol);
376 }
377
378
379 void QUmlExpressionObject::setGroupProperties()
380 {
381     Q_D(QModelingObject);
382     const QMetaObject *metaObject = this->metaObject();
383
384     d->propertyGroups << QStringLiteral("QObject");
385     d->groupProperties.insert(QStringLiteral("QObject"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("objectName"))));
386
387     d->propertyGroups << QStringLiteral("QUmlElement");
388     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedComments"))));
389     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedElements"))));
390     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owner"))));
391
392     d->propertyGroups << QStringLiteral("QUmlNamedElement");
393     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clientDependencies"))));
394     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("name"))));
395     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("nameExpression"))));
396     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("namespace_"))));
397     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("qualifiedName"))));
398
399     d->propertyGroups << QStringLiteral("QUmlTypedElement");
400     d->groupProperties.insert(QStringLiteral("QUmlTypedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("type"))));
401
402     d->propertyGroups << QStringLiteral("QUmlParameterableElement");
403     d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owningTemplateParameter"))));
404     d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("templateParameter"))));
405
406     d->propertyGroups << QStringLiteral("QUmlPackageableElement");
407     d->groupProperties.insert(QStringLiteral("QUmlPackageableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("visibility"))));
408
409     d->propertyGroups << QStringLiteral("QUmlValueSpecification");
410
411     d->propertyGroups << QStringLiteral("QUmlExpression");
412     d->groupProperties.insert(QStringLiteral("QUmlExpression"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("operands"))));
413     d->groupProperties.insert(QStringLiteral("QUmlExpression"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("symbol"))));
414 }
415
416 void QUmlExpressionObject::setPropertyData()
417 {
418     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, AggregationRole, QStringLiteral("composite"));
419     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, PropertyClassRole, QStringLiteral("QUmlElement"));
420     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, IsDerivedRole, false);
421     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, IsDerivedUnionRole, false);
422     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, DocumentationRole, QStringLiteral("The Comments owned by this element."));
423     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, RedefinedPropertiesRole, QStringLiteral(""));
424     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
425     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, OppositeEndRole, QStringLiteral(""));
426
427     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, AggregationRole, QStringLiteral("composite"));
428     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, PropertyClassRole, QStringLiteral("QUmlElement"));
429     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, IsDerivedRole, true);
430     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, IsDerivedUnionRole, true);
431     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, DocumentationRole, QStringLiteral("The Elements owned by this element."));
432     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, RedefinedPropertiesRole, QStringLiteral(""));
433     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, SubsettedPropertiesRole, QStringLiteral(""));
434     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, OppositeEndRole, QStringLiteral("Element-owner"));
435
436     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, AggregationRole, QStringLiteral("none"));
437     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, PropertyClassRole, QStringLiteral("QUmlElement"));
438     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, IsDerivedRole, true);
439     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, IsDerivedUnionRole, true);
440     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, DocumentationRole, QStringLiteral("The Element that owns this element."));
441     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, RedefinedPropertiesRole, QStringLiteral(""));
442     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, SubsettedPropertiesRole, QStringLiteral(""));
443     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, OppositeEndRole, QStringLiteral("Element-ownedElement"));
444
445     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, AggregationRole, QStringLiteral("none"));
446     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
447     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, IsDerivedRole, false);
448     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, IsDerivedUnionRole, false);
449     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, DocumentationRole, QStringLiteral("Indicates the dependencies that reference the client."));
450     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, RedefinedPropertiesRole, QStringLiteral(""));
451     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, SubsettedPropertiesRole, QStringLiteral("A_source_directedRelationship-directedRelationship"));
452     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, OppositeEndRole, QStringLiteral("Dependency-client"));
453
454     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, AggregationRole, QStringLiteral("none"));
455     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
456     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, IsDerivedRole, false);
457     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, IsDerivedUnionRole, false);
458     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, DocumentationRole, QStringLiteral("The name of the NamedElement."));
459     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, RedefinedPropertiesRole, QStringLiteral(""));
460     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, SubsettedPropertiesRole, QStringLiteral(""));
461     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, OppositeEndRole, QStringLiteral(""));
462
463     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, AggregationRole, QStringLiteral("composite"));
464     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
465     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, IsDerivedRole, false);
466     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, IsDerivedUnionRole, false);
467     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, DocumentationRole, QStringLiteral("The string expression used to define the name of this named element."));
468     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, RedefinedPropertiesRole, QStringLiteral(""));
469     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
470     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, OppositeEndRole, QStringLiteral(""));
471
472     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, AggregationRole, QStringLiteral("none"));
473     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
474     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, IsDerivedRole, true);
475     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, IsDerivedUnionRole, true);
476     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, DocumentationRole, QStringLiteral("Specifies the namespace that owns the NamedElement."));
477     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, RedefinedPropertiesRole, QStringLiteral(""));
478     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, SubsettedPropertiesRole, QStringLiteral("A_member_memberNamespace-memberNamespace Element-owner"));
479     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, OppositeEndRole, QStringLiteral("Namespace-ownedMember"));
480
481     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, AggregationRole, QStringLiteral("none"));
482     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
483     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, IsDerivedRole, true);
484     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, IsDerivedUnionRole, false);
485     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, DocumentationRole, QStringLiteral("A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself."));
486     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, RedefinedPropertiesRole, QStringLiteral(""));
487     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, SubsettedPropertiesRole, QStringLiteral(""));
488     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, OppositeEndRole, QStringLiteral(""));
489
490     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, AggregationRole, QStringLiteral("none"));
491     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
492     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, IsDerivedRole, false);
493     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, IsDerivedUnionRole, false);
494     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, DocumentationRole, QStringLiteral("Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility."));
495     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, RedefinedPropertiesRole, QStringLiteral(""));
496     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, SubsettedPropertiesRole, QStringLiteral(""));
497     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, OppositeEndRole, QStringLiteral(""));
498
499     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, AggregationRole, QStringLiteral("none"));
500     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, PropertyClassRole, QStringLiteral("QUmlTypedElement"));
501     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, IsDerivedRole, false);
502     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, IsDerivedUnionRole, false);
503     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, DocumentationRole, QStringLiteral("This information is derived from the return result for this Operation.The type of the TypedElement."));
504     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, RedefinedPropertiesRole, QStringLiteral(""));
505     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, SubsettedPropertiesRole, QStringLiteral(""));
506     Q_DECLARE_METAPROPERTY_INFO(QUmlTypedElement, type, OppositeEndRole, QStringLiteral(""));
507
508     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, AggregationRole, QStringLiteral("none"));
509     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, PropertyClassRole, QStringLiteral("QUmlParameterableElement"));
510     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, IsDerivedRole, false);
511     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, IsDerivedUnionRole, false);
512     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, DocumentationRole, QStringLiteral("The formal template parameter that owns this element."));
513     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, RedefinedPropertiesRole, QStringLiteral(""));
514     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, SubsettedPropertiesRole, QStringLiteral("ParameterableElement-templateParameter Element-owner"));
515     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, OppositeEndRole, QStringLiteral("TemplateParameter-ownedParameteredElement"));
516
517     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, AggregationRole, QStringLiteral("none"));
518     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, PropertyClassRole, QStringLiteral("QUmlParameterableElement"));
519     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, IsDerivedRole, false);
520     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, IsDerivedUnionRole, false);
521     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, DocumentationRole, QStringLiteral("The template parameter that exposes this element as a formal parameter."));
522     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, RedefinedPropertiesRole, QStringLiteral(""));
523     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, SubsettedPropertiesRole, QStringLiteral(""));
524     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, OppositeEndRole, QStringLiteral("TemplateParameter-parameteredElement"));
525
526     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, AggregationRole, QStringLiteral("none"));
527     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, PropertyClassRole, QStringLiteral("QUmlPackageableElement"));
528     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, IsDerivedRole, false);
529     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, IsDerivedUnionRole, false);
530     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, DocumentationRole, QStringLiteral("Indicates that packageable elements must always have a visibility, i.e., visibility is not optional."));
531     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, RedefinedPropertiesRole, QStringLiteral("NamedElement-visibility"));
532     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, SubsettedPropertiesRole, QStringLiteral(""));
533     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, OppositeEndRole, QStringLiteral(""));
534
535     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, AggregationRole, QStringLiteral("composite"));
536     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, PropertyClassRole, QStringLiteral("QUmlExpression"));
537     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, IsDerivedRole, false);
538     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, IsDerivedUnionRole, false);
539     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, DocumentationRole, QStringLiteral("Specifies a sequence of operands."));
540     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, RedefinedPropertiesRole, QStringLiteral(""));
541     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
542     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, operands, OppositeEndRole, QStringLiteral(""));
543
544     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, AggregationRole, QStringLiteral("none"));
545     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, PropertyClassRole, QStringLiteral("QUmlExpression"));
546     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, IsDerivedRole, false);
547     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, IsDerivedUnionRole, false);
548     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, DocumentationRole, QStringLiteral("The symbol associated with the node in the expression tree."));
549     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, RedefinedPropertiesRole, QStringLiteral(""));
550     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, SubsettedPropertiesRole, QStringLiteral(""));
551     Q_DECLARE_METAPROPERTY_INFO(QUmlExpression, symbol, OppositeEndRole, QStringLiteral(""));
552
553 }
554
555 QT_END_NAMESPACE
556