Fix reset of properties with default value
[qt:qtmodeling.git] / src / uml / qobjects / qumlrealizationobject.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 "qumlrealizationobject_p.h"
42 #include "private/qmodelingobject_p.h"
43
44 #include <QtUml/QUmlRealization>
45 #include <QtUml/QUmlComment>
46 #include <QtUml/QUmlDependency>
47 #include <QtUml/QUmlElement>
48 #include <QtUml/QUmlNamedElement>
49 #include <QtUml/QUmlNamespace>
50 #include <QtUml/QUmlOpaqueExpression>
51 #include <QtUml/QUmlPackage>
52 #include <QtUml/QUmlParameterableElement>
53 #include <QtUml/QUmlStringExpression>
54 #include <QtUml/QUmlTemplateParameter>
55
56 QT_BEGIN_NAMESPACE
57
58 QUmlRealizationObject::QUmlRealizationObject(QUmlRealization *modelingElement)
59 {
60     setProperty("modelingElement", QVariant::fromValue(static_cast<QModelingElement *>(modelingElement)));
61     setGroupProperties();
62     setPropertyData();
63 }
64
65 // OWNED ATTRIBUTES [Element]
66
67 const QSet<QObject *> QUmlRealizationObject::ownedComments() const
68 {
69     QSet<QObject *> set;
70     foreach (QUmlComment *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->ownedComments())
71         set.insert(element->asQModelingObject());
72     return set;
73 }
74
75 const QSet<QObject *> QUmlRealizationObject::ownedElements() const
76 {
77     QSet<QObject *> set;
78     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->ownedElements())
79         set.insert(element->asQModelingObject());
80     return set;
81 }
82
83 QObject *QUmlRealizationObject::owner() const
84 {
85     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->owner())
86         return 0;
87     else
88         return qmodelingelementproperty_cast<QUmlRealization *>(this)->owner()->asQModelingObject();
89 }
90
91 // OWNED ATTRIBUTES [ParameterableElement]
92
93 QObject *QUmlRealizationObject::owningTemplateParameter() const
94 {
95     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->owningTemplateParameter())
96         return 0;
97     else
98         return qmodelingelementproperty_cast<QUmlRealization *>(this)->owningTemplateParameter()->asQModelingObject();
99 }
100
101 QObject *QUmlRealizationObject::templateParameter() const
102 {
103     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->templateParameter())
104         return 0;
105     else
106         return qmodelingelementproperty_cast<QUmlRealization *>(this)->templateParameter()->asQModelingObject();
107 }
108
109 // OWNED ATTRIBUTES [NamedElement]
110
111 const QSet<QObject *> QUmlRealizationObject::clientDependencies() const
112 {
113     QSet<QObject *> set;
114     foreach (QUmlDependency *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->clientDependencies())
115         set.insert(element->asQModelingObject());
116     return set;
117 }
118
119 QString QUmlRealizationObject::name() const
120 {
121     return qmodelingelementproperty_cast<QUmlRealization *>(this)->name();
122 }
123
124 QObject *QUmlRealizationObject::nameExpression() const
125 {
126     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->nameExpression())
127         return 0;
128     else
129         return qmodelingelementproperty_cast<QUmlRealization *>(this)->nameExpression()->asQModelingObject();
130 }
131
132 QObject *QUmlRealizationObject::namespace_() const
133 {
134     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->namespace_())
135         return 0;
136     else
137         return qmodelingelementproperty_cast<QUmlRealization *>(this)->namespace_()->asQModelingObject();
138 }
139
140 QString QUmlRealizationObject::qualifiedName() const
141 {
142     return qmodelingelementproperty_cast<QUmlRealization *>(this)->qualifiedName();
143 }
144
145 // OWNED ATTRIBUTES [PackageableElement]
146
147 QtUml::VisibilityKind QUmlRealizationObject::visibility() const
148 {
149     return qmodelingelementproperty_cast<QUmlRealization *>(this)->visibility();
150 }
151
152 // OWNED ATTRIBUTES [Relationship]
153
154 const QSet<QObject *> QUmlRealizationObject::relatedElements() const
155 {
156     QSet<QObject *> set;
157     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->relatedElements())
158         set.insert(element->asQModelingObject());
159     return set;
160 }
161
162 // OWNED ATTRIBUTES [DirectedRelationship]
163
164 const QSet<QObject *> QUmlRealizationObject::sources() const
165 {
166     QSet<QObject *> set;
167     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->sources())
168         set.insert(element->asQModelingObject());
169     return set;
170 }
171
172 const QSet<QObject *> QUmlRealizationObject::targets() const
173 {
174     QSet<QObject *> set;
175     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->targets())
176         set.insert(element->asQModelingObject());
177     return set;
178 }
179
180 // OWNED ATTRIBUTES [Dependency]
181
182 const QSet<QObject *> QUmlRealizationObject::clients() const
183 {
184     QSet<QObject *> set;
185     foreach (QUmlNamedElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->clients())
186         set.insert(element->asQModelingObject());
187     return set;
188 }
189
190 const QSet<QObject *> QUmlRealizationObject::suppliers() const
191 {
192     QSet<QObject *> set;
193     foreach (QUmlNamedElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->suppliers())
194         set.insert(element->asQModelingObject());
195     return set;
196 }
197
198 // OWNED ATTRIBUTES [Abstraction]
199
200 QObject *QUmlRealizationObject::mapping() const
201 {
202     if (!qmodelingelementproperty_cast<QUmlRealization *>(this)->mapping())
203         return 0;
204     else
205         return qmodelingelementproperty_cast<QUmlRealization *>(this)->mapping()->asQModelingObject();
206 }
207
208 // OPERATIONS [Element]
209
210 QSet<QObject *> QUmlRealizationObject::allOwnedElements() const
211 {
212     QSet<QObject *> set;
213     foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->allOwnedElements())
214         set.insert(element->asQModelingObject());
215     return set;
216 }
217
218 bool QUmlRealizationObject::mustBeOwned() const
219 {
220     return qmodelingelementproperty_cast<QUmlRealization *>(this)->mustBeOwned();
221 }
222
223 // OPERATIONS [ParameterableElement]
224
225 bool QUmlRealizationObject::isCompatibleWith(QObject *p) const
226 {
227     return qmodelingelementproperty_cast<QUmlRealization *>(this)->isCompatibleWith(qmodelingelementproperty_cast<QUmlParameterableElement *>(p));
228 }
229
230 bool QUmlRealizationObject::isTemplateParameter() const
231 {
232     return qmodelingelementproperty_cast<QUmlRealization *>(this)->isTemplateParameter();
233 }
234
235 // OPERATIONS [NamedElement]
236
237 QList<QObject *> QUmlRealizationObject::allNamespaces() const
238 {
239     QList<QObject *> set;
240     foreach (QUmlNamespace *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->allNamespaces())
241         set.append(element->asQModelingObject());
242     return set;
243 }
244
245 QSet<QObject *> QUmlRealizationObject::allOwningPackages() const
246 {
247     QSet<QObject *> set;
248     foreach (QUmlPackage *element, qmodelingelementproperty_cast<QUmlRealization *>(this)->allOwningPackages())
249         set.insert(element->asQModelingObject());
250     return set;
251 }
252
253 bool QUmlRealizationObject::isDistinguishableFrom(QObject *n, QObject *ns) const
254 {
255     return qmodelingelementproperty_cast<QUmlRealization *>(this)->isDistinguishableFrom(qmodelingelementproperty_cast<QUmlNamedElement *>(n), qmodelingelementproperty_cast<QUmlNamespace *>(ns));
256 }
257
258 QString QUmlRealizationObject::separator() const
259 {
260     return qmodelingelementproperty_cast<QUmlRealization *>(this)->separator();
261 }
262
263 // SLOTS FOR OWNED ATTRIBUTES [Element]
264
265 void QUmlRealizationObject::addOwnedComment(QObject *ownedComment)
266 {
267     qmodelingelementproperty_cast<QUmlRealization *>(this)->addOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment));
268 }
269
270 void QUmlRealizationObject::removeOwnedComment(QObject *ownedComment)
271 {
272     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment));
273 }
274
275 void QUmlRealizationObject::addOwnedElement(QObject *ownedElement)
276 {
277     qmodelingelementproperty_cast<QUmlRealization *>(this)->addOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement));
278 }
279
280 void QUmlRealizationObject::removeOwnedElement(QObject *ownedElement)
281 {
282     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement));
283 }
284
285 void QUmlRealizationObject::setOwner(QObject *owner)
286 {
287     qmodelingelementproperty_cast<QUmlRealization *>(this)->setOwner(qmodelingelementproperty_cast<QUmlElement *>(owner));
288 }
289
290 // SLOTS FOR OWNED ATTRIBUTES [ParameterableElement]
291
292 void QUmlRealizationObject::setOwningTemplateParameter(QObject *owningTemplateParameter)
293 {
294     qmodelingelementproperty_cast<QUmlRealization *>(this)->setOwningTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(owningTemplateParameter));
295 }
296
297 void QUmlRealizationObject::setTemplateParameter(QObject *templateParameter)
298 {
299     qmodelingelementproperty_cast<QUmlRealization *>(this)->setTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(templateParameter));
300 }
301
302 // SLOTS FOR OWNED ATTRIBUTES [NamedElement]
303
304 void QUmlRealizationObject::addClientDependency(QObject *clientDependency)
305 {
306     qmodelingelementproperty_cast<QUmlRealization *>(this)->addClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency));
307 }
308
309 void QUmlRealizationObject::removeClientDependency(QObject *clientDependency)
310 {
311     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency));
312 }
313
314 void QUmlRealizationObject::setName(QString name)
315 {
316     qmodelingelementproperty_cast<QUmlRealization *>(this)->setName(name);
317 }
318
319 void QUmlRealizationObject::setNameExpression(QObject *nameExpression)
320 {
321     qmodelingelementproperty_cast<QUmlRealization *>(this)->setNameExpression(qmodelingelementproperty_cast<QUmlStringExpression *>(nameExpression));
322 }
323
324 void QUmlRealizationObject::setNamespace(QObject *namespace_)
325 {
326     qmodelingelementproperty_cast<QUmlRealization *>(this)->setNamespace(qmodelingelementproperty_cast<QUmlNamespace *>(namespace_));
327 }
328
329 void QUmlRealizationObject::setQualifiedName(QString qualifiedName)
330 {
331     qmodelingelementproperty_cast<QUmlRealization *>(this)->setQualifiedName(qualifiedName);
332 }
333 // SLOTS FOR OWNED ATTRIBUTES [PackageableElement]
334
335 void QUmlRealizationObject::setVisibility(QtUml::VisibilityKind visibility)
336 {
337     qmodelingelementproperty_cast<QUmlRealization *>(this)->setVisibility(visibility);
338 }
339
340 void QUmlRealizationObject::unsetVisibility()
341 {
342     Q_D(QModelingObject);
343     setVisibility(QtUml::VisibilityKindPublic);
344     d->modifiedResettableProperties.removeAll(QStringLiteral("visibility"));
345 }
346
347 // SLOTS FOR OWNED ATTRIBUTES [Relationship]
348
349 void QUmlRealizationObject::addRelatedElement(QObject *relatedElement)
350 {
351     qmodelingelementproperty_cast<QUmlRealization *>(this)->addRelatedElement(qmodelingelementproperty_cast<QUmlElement *>(relatedElement));
352 }
353
354 void QUmlRealizationObject::removeRelatedElement(QObject *relatedElement)
355 {
356     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeRelatedElement(qmodelingelementproperty_cast<QUmlElement *>(relatedElement));
357 }
358
359 // SLOTS FOR OWNED ATTRIBUTES [DirectedRelationship]
360
361 void QUmlRealizationObject::addSource(QObject *source)
362 {
363     qmodelingelementproperty_cast<QUmlRealization *>(this)->addSource(qmodelingelementproperty_cast<QUmlElement *>(source));
364 }
365
366 void QUmlRealizationObject::removeSource(QObject *source)
367 {
368     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeSource(qmodelingelementproperty_cast<QUmlElement *>(source));
369 }
370
371 void QUmlRealizationObject::addTarget(QObject *target)
372 {
373     qmodelingelementproperty_cast<QUmlRealization *>(this)->addTarget(qmodelingelementproperty_cast<QUmlElement *>(target));
374 }
375
376 void QUmlRealizationObject::removeTarget(QObject *target)
377 {
378     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeTarget(qmodelingelementproperty_cast<QUmlElement *>(target));
379 }
380
381 // SLOTS FOR OWNED ATTRIBUTES [Dependency]
382
383 void QUmlRealizationObject::addClient(QObject *client)
384 {
385     qmodelingelementproperty_cast<QUmlRealization *>(this)->addClient(qmodelingelementproperty_cast<QUmlNamedElement *>(client));
386 }
387
388 void QUmlRealizationObject::removeClient(QObject *client)
389 {
390     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeClient(qmodelingelementproperty_cast<QUmlNamedElement *>(client));
391 }
392
393 void QUmlRealizationObject::addSupplier(QObject *supplier)
394 {
395     qmodelingelementproperty_cast<QUmlRealization *>(this)->addSupplier(qmodelingelementproperty_cast<QUmlNamedElement *>(supplier));
396 }
397
398 void QUmlRealizationObject::removeSupplier(QObject *supplier)
399 {
400     qmodelingelementproperty_cast<QUmlRealization *>(this)->removeSupplier(qmodelingelementproperty_cast<QUmlNamedElement *>(supplier));
401 }
402
403 // SLOTS FOR OWNED ATTRIBUTES [Abstraction]
404
405 void QUmlRealizationObject::setMapping(QObject *mapping)
406 {
407     qmodelingelementproperty_cast<QUmlRealization *>(this)->setMapping(qmodelingelementproperty_cast<QUmlOpaqueExpression *>(mapping));
408 }
409
410
411 void QUmlRealizationObject::setGroupProperties()
412 {
413     Q_D(QModelingObject);
414     const QMetaObject *metaObject = this->metaObject();
415
416     d->propertyGroups << QStringLiteral("QObject");
417     d->groupProperties.insert(QStringLiteral("QObject"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("objectName"))));
418
419     d->propertyGroups << QStringLiteral("QUmlElement");
420     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedComments"))));
421     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedElements"))));
422     d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owner"))));
423
424     d->propertyGroups << QStringLiteral("QUmlParameterableElement");
425     d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owningTemplateParameter"))));
426     d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("templateParameter"))));
427
428     d->propertyGroups << QStringLiteral("QUmlNamedElement");
429     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clientDependencies"))));
430     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("name"))));
431     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("nameExpression"))));
432     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("namespace_"))));
433     d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("qualifiedName"))));
434
435     d->propertyGroups << QStringLiteral("QUmlPackageableElement");
436     d->groupProperties.insert(QStringLiteral("QUmlPackageableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("visibility"))));
437
438     d->propertyGroups << QStringLiteral("QUmlRelationship");
439     d->groupProperties.insert(QStringLiteral("QUmlRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("relatedElements"))));
440
441     d->propertyGroups << QStringLiteral("QUmlDirectedRelationship");
442     d->groupProperties.insert(QStringLiteral("QUmlDirectedRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("sources"))));
443     d->groupProperties.insert(QStringLiteral("QUmlDirectedRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("targets"))));
444
445     d->propertyGroups << QStringLiteral("QUmlDependency");
446     d->groupProperties.insert(QStringLiteral("QUmlDependency"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clients"))));
447     d->groupProperties.insert(QStringLiteral("QUmlDependency"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("suppliers"))));
448
449     d->propertyGroups << QStringLiteral("QUmlAbstraction");
450     d->groupProperties.insert(QStringLiteral("QUmlAbstraction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("mapping"))));
451
452     d->propertyGroups << QStringLiteral("QUmlRealization");
453 }
454
455 void QUmlRealizationObject::setPropertyData()
456 {
457     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, AggregationRole, QStringLiteral("composite"));
458     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, PropertyClassRole, QStringLiteral("QUmlElement"));
459     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, IsDerivedRole, false);
460     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, IsDerivedUnionRole, false);
461     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, DocumentationRole, QStringLiteral("The Comments owned by this element."));
462     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, RedefinedPropertiesRole, QStringLiteral(""));
463     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
464     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedComments, OppositeEndRole, QStringLiteral(""));
465
466     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, AggregationRole, QStringLiteral("composite"));
467     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, PropertyClassRole, QStringLiteral("QUmlElement"));
468     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, IsDerivedRole, true);
469     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, IsDerivedUnionRole, true);
470     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, DocumentationRole, QStringLiteral("The Elements owned by this element."));
471     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, RedefinedPropertiesRole, QStringLiteral(""));
472     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, SubsettedPropertiesRole, QStringLiteral(""));
473     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, ownedElements, OppositeEndRole, QStringLiteral("Element-owner"));
474
475     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, AggregationRole, QStringLiteral("none"));
476     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, PropertyClassRole, QStringLiteral("QUmlElement"));
477     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, IsDerivedRole, true);
478     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, IsDerivedUnionRole, true);
479     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, DocumentationRole, QStringLiteral("The Element that owns this element."));
480     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, RedefinedPropertiesRole, QStringLiteral(""));
481     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, SubsettedPropertiesRole, QStringLiteral(""));
482     Q_DECLARE_METAPROPERTY_INFO(QUmlElement, owner, OppositeEndRole, QStringLiteral("Element-ownedElement"));
483
484     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, AggregationRole, QStringLiteral("none"));
485     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, PropertyClassRole, QStringLiteral("QUmlParameterableElement"));
486     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, IsDerivedRole, false);
487     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, IsDerivedUnionRole, false);
488     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, DocumentationRole, QStringLiteral("The formal template parameter that owns this element."));
489     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, RedefinedPropertiesRole, QStringLiteral(""));
490     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, SubsettedPropertiesRole, QStringLiteral("ParameterableElement-templateParameter Element-owner"));
491     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, owningTemplateParameter, OppositeEndRole, QStringLiteral("TemplateParameter-ownedParameteredElement"));
492
493     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, AggregationRole, QStringLiteral("none"));
494     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, PropertyClassRole, QStringLiteral("QUmlParameterableElement"));
495     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, IsDerivedRole, false);
496     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, IsDerivedUnionRole, false);
497     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, DocumentationRole, QStringLiteral("The template parameter that exposes this element as a formal parameter."));
498     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, RedefinedPropertiesRole, QStringLiteral(""));
499     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, SubsettedPropertiesRole, QStringLiteral(""));
500     Q_DECLARE_METAPROPERTY_INFO(QUmlParameterableElement, templateParameter, OppositeEndRole, QStringLiteral("TemplateParameter-parameteredElement"));
501
502     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, AggregationRole, QStringLiteral("none"));
503     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
504     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, IsDerivedRole, false);
505     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, IsDerivedUnionRole, false);
506     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, DocumentationRole, QStringLiteral("Indicates the dependencies that reference the client."));
507     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, RedefinedPropertiesRole, QStringLiteral(""));
508     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, SubsettedPropertiesRole, QStringLiteral("A_source_directedRelationship-directedRelationship"));
509     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, clientDependencies, OppositeEndRole, QStringLiteral("Dependency-client"));
510
511     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, AggregationRole, QStringLiteral("none"));
512     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
513     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, IsDerivedRole, false);
514     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, IsDerivedUnionRole, false);
515     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, DocumentationRole, QStringLiteral("The name of the NamedElement."));
516     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, RedefinedPropertiesRole, QStringLiteral(""));
517     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, SubsettedPropertiesRole, QStringLiteral(""));
518     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, name, OppositeEndRole, QStringLiteral(""));
519
520     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, AggregationRole, QStringLiteral("composite"));
521     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
522     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, IsDerivedRole, false);
523     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, IsDerivedUnionRole, false);
524     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, DocumentationRole, QStringLiteral("The string expression used to define the name of this named element."));
525     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, RedefinedPropertiesRole, QStringLiteral(""));
526     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
527     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, nameExpression, OppositeEndRole, QStringLiteral(""));
528
529     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, AggregationRole, QStringLiteral("none"));
530     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
531     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, IsDerivedRole, true);
532     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, IsDerivedUnionRole, true);
533     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, DocumentationRole, QStringLiteral("Specifies the namespace that owns the NamedElement."));
534     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, RedefinedPropertiesRole, QStringLiteral(""));
535     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, SubsettedPropertiesRole, QStringLiteral("A_member_memberNamespace-memberNamespace Element-owner"));
536     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, namespace_, OppositeEndRole, QStringLiteral("Namespace-ownedMember"));
537
538     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, AggregationRole, QStringLiteral("none"));
539     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
540     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, IsDerivedRole, true);
541     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, IsDerivedUnionRole, false);
542     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."));
543     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, RedefinedPropertiesRole, QStringLiteral(""));
544     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, SubsettedPropertiesRole, QStringLiteral(""));
545     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, qualifiedName, OppositeEndRole, QStringLiteral(""));
546
547     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, AggregationRole, QStringLiteral("none"));
548     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, PropertyClassRole, QStringLiteral("QUmlNamedElement"));
549     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, IsDerivedRole, false);
550     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, IsDerivedUnionRole, false);
551     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, DocumentationRole, QStringLiteral("Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility."));
552     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, RedefinedPropertiesRole, QStringLiteral(""));
553     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, SubsettedPropertiesRole, QStringLiteral(""));
554     Q_DECLARE_METAPROPERTY_INFO(QUmlNamedElement, visibility, OppositeEndRole, QStringLiteral(""));
555
556     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, AggregationRole, QStringLiteral("none"));
557     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, PropertyClassRole, QStringLiteral("QUmlPackageableElement"));
558     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, IsDerivedRole, false);
559     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, IsDerivedUnionRole, false);
560     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, DocumentationRole, QStringLiteral("Indicates that packageable elements must always have a visibility, i.e., visibility is not optional."));
561     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, RedefinedPropertiesRole, QStringLiteral("NamedElement-visibility"));
562     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, SubsettedPropertiesRole, QStringLiteral(""));
563     Q_DECLARE_METAPROPERTY_INFO(QUmlPackageableElement, visibility, OppositeEndRole, QStringLiteral(""));
564
565     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, AggregationRole, QStringLiteral("none"));
566     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, PropertyClassRole, QStringLiteral("QUmlRelationship"));
567     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, IsDerivedRole, true);
568     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, IsDerivedUnionRole, true);
569     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, DocumentationRole, QStringLiteral("Specifies the elements related by the Relationship."));
570     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, RedefinedPropertiesRole, QStringLiteral(""));
571     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, SubsettedPropertiesRole, QStringLiteral(""));
572     Q_DECLARE_METAPROPERTY_INFO(QUmlRelationship, relatedElements, OppositeEndRole, QStringLiteral(""));
573
574     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, AggregationRole, QStringLiteral("none"));
575     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, PropertyClassRole, QStringLiteral("QUmlDirectedRelationship"));
576     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, IsDerivedRole, true);
577     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, IsDerivedUnionRole, true);
578     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, DocumentationRole, QStringLiteral("Specifies the sources of the DirectedRelationship."));
579     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, RedefinedPropertiesRole, QStringLiteral(""));
580     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, SubsettedPropertiesRole, QStringLiteral("Relationship-relatedElement"));
581     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, sources, OppositeEndRole, QStringLiteral(""));
582
583     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, AggregationRole, QStringLiteral("none"));
584     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, PropertyClassRole, QStringLiteral("QUmlDirectedRelationship"));
585     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, IsDerivedRole, true);
586     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, IsDerivedUnionRole, true);
587     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, DocumentationRole, QStringLiteral("Specifies the targets of the DirectedRelationship."));
588     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, RedefinedPropertiesRole, QStringLiteral(""));
589     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, SubsettedPropertiesRole, QStringLiteral("Relationship-relatedElement"));
590     Q_DECLARE_METAPROPERTY_INFO(QUmlDirectedRelationship, targets, OppositeEndRole, QStringLiteral(""));
591
592     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, AggregationRole, QStringLiteral("none"));
593     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, PropertyClassRole, QStringLiteral("QUmlDependency"));
594     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, IsDerivedRole, false);
595     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, IsDerivedUnionRole, false);
596     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, DocumentationRole, QStringLiteral("The element(s) dependent on the supplier element(s). In some cases (such as a Trace Abstraction) the assignment of direction (that is, the designation of the client element) is at the discretion of the modeler, and is a stipulation."));
597     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, RedefinedPropertiesRole, QStringLiteral(""));
598     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, SubsettedPropertiesRole, QStringLiteral("DirectedRelationship-source"));
599     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, clients, OppositeEndRole, QStringLiteral("NamedElement-clientDependency"));
600
601     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, AggregationRole, QStringLiteral("none"));
602     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, PropertyClassRole, QStringLiteral("QUmlDependency"));
603     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, IsDerivedRole, false);
604     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, IsDerivedUnionRole, false);
605     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, DocumentationRole, QStringLiteral("The element(s) independent of the client element(s), in the same respect and the same dependency relationship. In some directed dependency relationships (such as Refinement Abstractions), a common convention in the domain of class-based OO software is to put the more abstract element in this role. Despite this convention, users of UML may stipulate a sense of dependency suitable for their domain, which makes a more abstract element dependent on that which is more specific."));
606     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, RedefinedPropertiesRole, QStringLiteral(""));
607     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, SubsettedPropertiesRole, QStringLiteral("DirectedRelationship-target"));
608     Q_DECLARE_METAPROPERTY_INFO(QUmlDependency, suppliers, OppositeEndRole, QStringLiteral(""));
609
610     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, AggregationRole, QStringLiteral("composite"));
611     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, PropertyClassRole, QStringLiteral("QUmlAbstraction"));
612     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, IsDerivedRole, false);
613     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, IsDerivedUnionRole, false);
614     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, DocumentationRole, QStringLiteral("An composition of an Expression that states the abstraction relationship between the supplier and the client. In some cases, such as Derivation, it is usually formal and unidirectional; in other cases, such as Trace, it is usually informal and bidirectional. The mapping expression is optional and may be omitted if the precise relationship between the elements is not specified."));
615     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, RedefinedPropertiesRole, QStringLiteral(""));
616     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, SubsettedPropertiesRole, QStringLiteral("Element-ownedElement"));
617     Q_DECLARE_METAPROPERTY_INFO(QUmlAbstraction, mapping, OppositeEndRole, QStringLiteral(""));
618
619 }
620
621 QT_END_NAMESPACE
622