summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlpartdecomposition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlpartdecomposition.cpp')
-rw-r--r--src/uml/qumlpartdecomposition.cpp351
1 files changed, 11 insertions, 340 deletions
diff --git a/src/uml/qumlpartdecomposition.cpp b/src/uml/qumlpartdecomposition.cpp
index 52de0064..d1dfe893 100644
--- a/src/uml/qumlpartdecomposition.cpp
+++ b/src/uml/qumlpartdecomposition.cpp
@@ -40,356 +40,27 @@
****************************************************************************/
#include "qumlpartdecomposition.h"
-#include <QtUml/QUmlComment>
-#include <QtUml/QUmlDependency>
-#include <QtUml/QUmlElement>
-#include <QtUml/QUmlGate>
-#include <QtUml/QUmlGeneralOrdering>
-#include <QtUml/QUmlInteraction>
-#include <QtUml/QUmlInteractionOperand>
-#include <QtUml/QUmlLifeline>
-#include <QtUml/QUmlNamedElement>
-#include <QtUml/QUmlNamespace>
-#include <QtUml/QUmlPackage>
-#include <QtUml/QUmlProperty>
-#include <QtUml/QUmlStringExpression>
-#include <QtUml/QUmlValueSpecification>
-
-QT_BEGIN_NAMESPACE
+#include "private/qumlpartdecompositionobject_p.h"
/*!
- \class UmlPartDecomposition
+ \class QUmlPartDecomposition
\inmodule QtUml
\brief A part decomposition is a description of the internal interactions of one lifeline relative to an interaction.
*/
-
-QUmlPartDecomposition::QUmlPartDecomposition(QObject *parent) :
- QObject(parent)
-{
-}
-
-// OWNED ATTRIBUTES [Element]
-
-/*!
- The Comments owned by this element.
- */
-const QSet<QUmlComment *> QUmlPartDecomposition::ownedComment() const
-{
- return *(reinterpret_cast<const QSet<QUmlComment *> *>(&_ownedComment));
-}
-
-/*!
- The Elements owned by this element.
- */
-const QSet<QUmlElement *> QUmlPartDecomposition::ownedElement() const
-{
- return *(reinterpret_cast<const QSet<QUmlElement *> *>(&_ownedElement));
-}
-
-/*!
- The Element that owns this element.
- */
-QUmlElement *QUmlPartDecomposition::owner() const
-{
- return reinterpret_cast<QUmlElement *>(_owner);
-}
-
-// OWNED ATTRIBUTES [NamedElement]
-
-/*!
- Indicates the dependencies that reference the client.
- */
-const QSet<QUmlDependency *> QUmlPartDecomposition::clientDependency() const
-{
- return *(reinterpret_cast<const QSet<QUmlDependency *> *>(&_clientDependency));
-}
-
-/*!
- The name of the NamedElement.
- */
-QString QUmlPartDecomposition::name() const
-{
- return _name;
-}
-
-/*!
- The string expression used to define the name of this named element.
- */
-QUmlStringExpression *QUmlPartDecomposition::nameExpression() const
-{
- return reinterpret_cast<QUmlStringExpression *>(_nameExpression);
-}
-
-/*!
- Specifies the namespace that owns the NamedElement.
- */
-QUmlNamespace *QUmlPartDecomposition::namespace_() const
-{
- return reinterpret_cast<QUmlNamespace *>(_namespace_);
-}
-
-/*!
- 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.
- */
-QString QUmlPartDecomposition::qualifiedName() const
-{
- return UmlNamedElement::qualifiedName();
-}
-
-/*!
- Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility.
- */
-QtUml::VisibilityKind QUmlPartDecomposition::visibility() const
-{
- return _visibility;
-}
-
-// OWNED ATTRIBUTES [InteractionFragment]
-
-/*!
- References the Lifelines that the InteractionFragment involves.
- */
-const QSet<QUmlLifeline *> QUmlPartDecomposition::covered() const
-{
- return *(reinterpret_cast<const QSet<QUmlLifeline *> *>(&_covered));
-}
-
-/*!
- The Interaction enclosing this InteractionFragment.
- */
-QUmlInteraction *QUmlPartDecomposition::enclosingInteraction() const
-{
- return reinterpret_cast<QUmlInteraction *>(_enclosingInteraction);
-}
-
-/*!
- The operand enclosing this InteractionFragment (they may nest recursively)
- */
-QUmlInteractionOperand *QUmlPartDecomposition::enclosingOperand() const
-{
- return reinterpret_cast<QUmlInteractionOperand *>(_enclosingOperand);
-}
-
-/*!
- The general ordering relationships contained in this fragment.
- */
-const QSet<QUmlGeneralOrdering *> QUmlPartDecomposition::generalOrdering() const
-{
- return *(reinterpret_cast<const QSet<QUmlGeneralOrdering *> *>(&_generalOrdering));
-}
-
-// OWNED ATTRIBUTES [InteractionUse]
-
-/*!
- The actual gates of the InteractionUse
- */
-const QSet<QUmlGate *> QUmlPartDecomposition::actualGate() const
-{
- return *(reinterpret_cast<const QSet<QUmlGate *> *>(&_actualGate));
-}
-
-/*!
- The actual arguments of the Interaction
- */
-const QList<QUmlValueSpecification *> QUmlPartDecomposition::argument() const
-{
- return *(reinterpret_cast<const QList<QUmlValueSpecification *> *>(&_argument));
-}
-
-/*!
- Refers to the Interaction that defines its meaning
- */
-QUmlInteraction *QUmlPartDecomposition::refersTo() const
-{
- return reinterpret_cast<QUmlInteraction *>(_refersTo);
-}
-
-/*!
- The value of the executed Interaction.
- */
-QUmlValueSpecification *QUmlPartDecomposition::returnValue() const
-{
- return reinterpret_cast<QUmlValueSpecification *>(_returnValue);
-}
-
-/*!
- The recipient of the return value.
- */
-QUmlProperty *QUmlPartDecomposition::returnValueRecipient() const
-{
- return reinterpret_cast<QUmlProperty *>(_returnValueRecipient);
-}
-
-// OPERATIONS [Element]
-
-/*!
- The query allOwnedElements() gives all of the direct and indirect owned elements of an element.
- */
-QSet<QUmlElement *> QUmlPartDecomposition::allOwnedElements() const
-{
- QSet<QUmlElement *> r;
- foreach (UmlElement *element, UmlElement::allOwnedElements())
- r.insert(reinterpret_cast<QUmlElement *>(element));
- return r;
-}
-
-/*!
- The query mustBeOwned() indicates whether elements of this type must have an owner. Subclasses of Element that do not require an owner must override this operation.
- */
-bool QUmlPartDecomposition::mustBeOwned() const
-{
- return UmlElement::mustBeOwned();
-}
-
-// OPERATIONS [NamedElement]
-
-/*!
- The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards.
- */
-QList<QUmlNamespace *> QUmlPartDecomposition::allNamespaces() const
-{
- QList<QUmlNamespace *> r;
- foreach (UmlNamespace *element, UmlNamedElement::allNamespaces())
- r.append(reinterpret_cast<QUmlNamespace *>(element));
- return r;
-}
-
-/*!
- The query allOwningPackages() returns all the directly or indirectly owning packages.
- */
-QSet<QUmlPackage *> QUmlPartDecomposition::allOwningPackages() const
-{
- QSet<QUmlPackage *> r;
- foreach (UmlPackage *element, UmlNamedElement::allOwningPackages())
- r.insert(reinterpret_cast<QUmlPackage *>(element));
- return r;
-}
-
-/*!
- The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names.
- */
-bool QUmlPartDecomposition::isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) const
-{
- return UmlNamedElement::isDistinguishableFrom(n, ns);
-}
-
-/*!
- The query separator() gives the string that is used to separate names when constructing a qualified name.
- */
-QString QUmlPartDecomposition::separator() const
-{
- return UmlNamedElement::separator();
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Element]
-
-void QUmlPartDecomposition::addOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::addOwnedComment(ownedComment);
-}
-
-void QUmlPartDecomposition::removeOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::removeOwnedComment(ownedComment);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [NamedElement]
-
-void QUmlPartDecomposition::addClientDependency(UmlDependency *clientDependency)
-{
- UmlNamedElement::addClientDependency(clientDependency);
-}
-
-void QUmlPartDecomposition::removeClientDependency(UmlDependency *clientDependency)
+QUmlPartDecomposition::QUmlPartDecomposition(bool createQObject) :
+ QUmlInteractionUse(false)
{
- UmlNamedElement::removeClientDependency(clientDependency);
+ if (createQObject)
+ _qObject = new QUmlPartDecompositionObject(this);
}
-void QUmlPartDecomposition::setName(QString name)
+QUmlPartDecomposition::~QUmlPartDecomposition()
{
- UmlNamedElement::setName(name);
+ if (!deletingFromQObject) {
+ _qObject->setProperty("deletingFromModelingObject", true);
+ delete _qObject;
+ }
}
-void QUmlPartDecomposition::setNameExpression(QUmlStringExpression *nameExpression)
-{
- UmlNamedElement::setNameExpression(nameExpression);
-}
-
-void QUmlPartDecomposition::setVisibility(QtUml::VisibilityKind visibility)
-{
- UmlNamedElement::setVisibility(visibility);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [InteractionFragment]
-
-void QUmlPartDecomposition::addCovered(UmlLifeline *covered)
-{
- UmlInteractionFragment::addCovered(covered);
-}
-
-void QUmlPartDecomposition::removeCovered(UmlLifeline *covered)
-{
- UmlInteractionFragment::removeCovered(covered);
-}
-
-void QUmlPartDecomposition::setEnclosingInteraction(QUmlInteraction *enclosingInteraction)
-{
- UmlInteractionFragment::setEnclosingInteraction(enclosingInteraction);
-}
-
-void QUmlPartDecomposition::setEnclosingOperand(QUmlInteractionOperand *enclosingOperand)
-{
- UmlInteractionFragment::setEnclosingOperand(enclosingOperand);
-}
-
-void QUmlPartDecomposition::addGeneralOrdering(UmlGeneralOrdering *generalOrdering)
-{
- UmlInteractionFragment::addGeneralOrdering(generalOrdering);
-}
-
-void QUmlPartDecomposition::removeGeneralOrdering(UmlGeneralOrdering *generalOrdering)
-{
- UmlInteractionFragment::removeGeneralOrdering(generalOrdering);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [InteractionUse]
-
-void QUmlPartDecomposition::addActualGate(UmlGate *actualGate)
-{
- UmlInteractionUse::addActualGate(actualGate);
-}
-
-void QUmlPartDecomposition::removeActualGate(UmlGate *actualGate)
-{
- UmlInteractionUse::removeActualGate(actualGate);
-}
-
-void QUmlPartDecomposition::addArgument(UmlValueSpecification *argument)
-{
- UmlInteractionUse::addArgument(argument);
-}
-
-void QUmlPartDecomposition::removeArgument(UmlValueSpecification *argument)
-{
- UmlInteractionUse::removeArgument(argument);
-}
-
-void QUmlPartDecomposition::setRefersTo(QUmlInteraction *refersTo)
-{
- UmlInteractionUse::setRefersTo(refersTo);
-}
-
-void QUmlPartDecomposition::setReturnValue(QUmlValueSpecification *returnValue)
-{
- UmlInteractionUse::setReturnValue(returnValue);
-}
-
-void QUmlPartDecomposition::setReturnValueRecipient(QUmlProperty *returnValueRecipient)
-{
- UmlInteractionUse::setReturnValueRecipient(returnValueRecipient);
-}
-
-QT_END_NAMESPACE
-