summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlacceptcallaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlacceptcallaction.cpp')
-rw-r--r--src/uml/qumlacceptcallaction.cpp567
1 files changed, 32 insertions, 535 deletions
diff --git a/src/uml/qumlacceptcallaction.cpp b/src/uml/qumlacceptcallaction.cpp
index 0afa6fbf..cb5124d8 100644
--- a/src/uml/qumlacceptcallaction.cpp
+++ b/src/uml/qumlacceptcallaction.cpp
@@ -40,566 +40,63 @@
****************************************************************************/
#include "qumlacceptcallaction.h"
-#include <QtUml/QUmlActivity>
-#include <QtUml/QUmlActivityEdge>
-#include <QtUml/QUmlActivityGroup>
-#include <QtUml/QUmlActivityNode>
-#include <QtUml/QUmlActivityPartition>
-#include <QtUml/QUmlClassifier>
-#include <QtUml/QUmlComment>
-#include <QtUml/QUmlConstraint>
-#include <QtUml/QUmlDependency>
-#include <QtUml/QUmlElement>
-#include <QtUml/QUmlExceptionHandler>
-#include <QtUml/QUmlInputPin>
-#include <QtUml/QUmlInterruptibleActivityRegion>
-#include <QtUml/QUmlNamedElement>
-#include <QtUml/QUmlNamespace>
-#include <QtUml/QUmlOutputPin>
-#include <QtUml/QUmlPackage>
-#include <QtUml/QUmlRedefinableElement>
-#include <QtUml/QUmlStringExpression>
-#include <QtUml/QUmlStructuredActivityNode>
-#include <QtUml/QUmlTrigger>
+#include "private/qumlacceptcallactionobject_p.h"
-QT_BEGIN_NAMESPACE
+#include <QtUml/QUmlOutputPin>
/*!
- \class UmlAcceptCallAction
+ \class QUmlAcceptCallAction
\inmodule QtUml
\brief An accept call action is an accept event action representing the receipt of a synchronous call request. In addition to the normal operation parameters, the action produces an output that is needed later to supply the information to the reply action necessary to return control to the caller. This action is for synchronous calls. If it is used to handle an asynchronous call, execution of the subsequent reply action will complete immediately with no effects.
*/
-
-QUmlAcceptCallAction::QUmlAcceptCallAction(QObject *parent) :
- QObject(parent)
-{
-}
-
-// OWNED ATTRIBUTES [Element]
-
-/*!
- The Comments owned by this element.
- */
-const QSet<QUmlComment *> QUmlAcceptCallAction::ownedComment() const
-{
- return *(reinterpret_cast<const QSet<QUmlComment *> *>(&_ownedComment));
-}
-
-/*!
- The Elements owned by this element.
- */
-const QSet<QUmlElement *> QUmlAcceptCallAction::ownedElement() const
-{
- return *(reinterpret_cast<const QSet<QUmlElement *> *>(&_ownedElement));
-}
-
-/*!
- The Element that owns this element.
- */
-QUmlElement *QUmlAcceptCallAction::owner() const
-{
- return reinterpret_cast<QUmlElement *>(_owner);
-}
-
-// OWNED ATTRIBUTES [NamedElement]
-
-/*!
- Indicates the dependencies that reference the client.
- */
-const QSet<QUmlDependency *> QUmlAcceptCallAction::clientDependency() const
-{
- return *(reinterpret_cast<const QSet<QUmlDependency *> *>(&_clientDependency));
-}
-
-/*!
- The name of the NamedElement.
- */
-QString QUmlAcceptCallAction::name() const
-{
- return _name;
-}
-
-/*!
- The string expression used to define the name of this named element.
- */
-QUmlStringExpression *QUmlAcceptCallAction::nameExpression() const
-{
- return reinterpret_cast<QUmlStringExpression *>(_nameExpression);
-}
-
-/*!
- Specifies the namespace that owns the NamedElement.
- */
-QUmlNamespace *QUmlAcceptCallAction::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 QUmlAcceptCallAction::qualifiedName() const
-{
- return UmlNamedElement::qualifiedName();
-}
-
-/*!
- Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility.
- */
-QtUml::VisibilityKind QUmlAcceptCallAction::visibility() const
-{
- return _visibility;
-}
-
-// OWNED ATTRIBUTES [RedefinableElement]
-
-/*!
- Indicates whether it is possible to further redefine a RedefinableElement. If the value is true, then it is not possible to further redefine the RedefinableElement. Note that this property is preserved through package merge operations; that is, the capability to redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in the resulting RedefinableElement of a package merge operation where a RedefinableElement with isLeaf=false is merged with a matching RedefinableElement with isLeaf=true: the resulting RedefinableElement will have isLeaf=false. Default value is false.
- */
-bool QUmlAcceptCallAction::isLeaf() const
-{
- return _isLeaf;
-}
-
-/*!
- The redefinable element that is being redefined by this element.
- */
-const QSet<QUmlRedefinableElement *> QUmlAcceptCallAction::redefinedElement() const
-{
- return *(reinterpret_cast<const QSet<QUmlRedefinableElement *> *>(&_redefinedElement));
-}
-
-/*!
- References the contexts that this element may be redefined from.
- */
-const QSet<QUmlClassifier *> QUmlAcceptCallAction::redefinitionContext() const
-{
- return *(reinterpret_cast<const QSet<QUmlClassifier *> *>(&_redefinitionContext));
-}
-
-// OWNED ATTRIBUTES [ActivityNode]
-
-/*!
- Activity containing the node.
- */
-QUmlActivity *QUmlAcceptCallAction::activity() const
-{
- return reinterpret_cast<QUmlActivity *>(_activity);
-}
-
-/*!
- Groups containing the node.
- */
-const QSet<QUmlActivityGroup *> QUmlAcceptCallAction::inGroup() const
-{
- return *(reinterpret_cast<const QSet<QUmlActivityGroup *> *>(&_inGroup));
-}
-
-/*!
- Interruptible regions containing the node.
- */
-const QSet<QUmlInterruptibleActivityRegion *> QUmlAcceptCallAction::inInterruptibleRegion() const
-{
- return *(reinterpret_cast<const QSet<QUmlInterruptibleActivityRegion *> *>(&_inInterruptibleRegion));
-}
-
-/*!
- Partitions containing the node.
- */
-const QSet<QUmlActivityPartition *> QUmlAcceptCallAction::inPartition() const
-{
- return *(reinterpret_cast<const QSet<QUmlActivityPartition *> *>(&_inPartition));
-}
-
-/*!
- Structured activity node containing the node.
- */
-QUmlStructuredActivityNode *QUmlAcceptCallAction::inStructuredNode() const
-{
- return reinterpret_cast<QUmlStructuredActivityNode *>(_inStructuredNode);
-}
-
-/*!
- Edges that have the node as target.
- */
-const QSet<QUmlActivityEdge *> QUmlAcceptCallAction::incoming() const
-{
- return *(reinterpret_cast<const QSet<QUmlActivityEdge *> *>(&_incoming));
-}
-
-/*!
- Edges that have the node as source.
- */
-const QSet<QUmlActivityEdge *> QUmlAcceptCallAction::outgoing() const
-{
- return *(reinterpret_cast<const QSet<QUmlActivityEdge *> *>(&_outgoing));
-}
-
-/*!
- Inherited nodes replaced by this node in a specialization of the activity.
- */
-const QSet<QUmlActivityNode *> QUmlAcceptCallAction::redefinedNode() const
-{
- return *(reinterpret_cast<const QSet<QUmlActivityNode *> *>(&_redefinedNode));
-}
-
-// OWNED ATTRIBUTES [ExecutableNode]
-
-/*!
- A set of exception handlers that are examined if an uncaught exception propagates to the outer level of the executable node.
- */
-const QSet<QUmlExceptionHandler *> QUmlAcceptCallAction::handler() const
-{
- return *(reinterpret_cast<const QSet<QUmlExceptionHandler *> *>(&_handler));
-}
-
-// OWNED ATTRIBUTES [Action]
-
-/*!
- The classifier that owns the behavior of which this action is a part.
- */
-QUmlClassifier *QUmlAcceptCallAction::context() const
-{
- return reinterpret_cast<QUmlClassifier *>(UmlAction::context());
-}
-
-/*!
- The ordered set of input pins connected to the Action. These are among the total set of inputs.
- */
-const QList<QUmlInputPin *> QUmlAcceptCallAction::input() const
-{
- return *(reinterpret_cast<const QList<QUmlInputPin *> *>(&_input));
-}
-
-/*!
- If true, the action can begin a new, concurrent execution, even if there is already another execution of the action ongoing. If false, the action cannot begin a new execution until any previous execution has completed.
- */
-bool QUmlAcceptCallAction::isLocallyReentrant() const
-{
- return _isLocallyReentrant;
-}
-
-/*!
- Constraint that must be satisfied when executed is completed.
- */
-const QSet<QUmlConstraint *> QUmlAcceptCallAction::localPostcondition() const
-{
- return *(reinterpret_cast<const QSet<QUmlConstraint *> *>(&_localPostcondition));
-}
-
-/*!
- Constraint that must be satisfied when execution is started.
- */
-const QSet<QUmlConstraint *> QUmlAcceptCallAction::localPrecondition() const
+QUmlAcceptCallAction::QUmlAcceptCallAction(bool createQObject) :
+ QUmlAcceptEventAction(false),
+ _returnInformation(0)
{
- return *(reinterpret_cast<const QSet<QUmlConstraint *> *>(&_localPrecondition));
+ if (createQObject)
+ _qObject = new QUmlAcceptCallActionObject(this);
}
-/*!
- The ordered set of output pins connected to the Action. The action places its results onto pins in this set.
- */
-const QList<QUmlOutputPin *> QUmlAcceptCallAction::output() const
+QUmlAcceptCallAction::~QUmlAcceptCallAction()
{
- return *(reinterpret_cast<const QList<QUmlOutputPin *> *>(&_output));
+ if (!deletingFromQObject) {
+ _qObject->setProperty("deletingFromModelingObject", true);
+ delete _qObject;
+ }
}
-// OWNED ATTRIBUTES [AcceptEventAction]
-
-/*!
- Indicates whether there is a single output pin for the event, or multiple output pins for attributes of the event.
- */
-bool QUmlAcceptCallAction::isUnmarshall() const
-{
- return _isUnmarshall;
-}
-
-/*!
- Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved.
- */
-const QSet<QUmlOutputPin *> QUmlAcceptCallAction::result() const
-{
- return *(reinterpret_cast<const QSet<QUmlOutputPin *> *>(&_result));
-}
-
-/*!
- The type of events accepted by the action, as specified by triggers. For triggers with signal events, a signal of the specified type or any subtype of the specified signal type is accepted.
- */
-const QSet<QUmlTrigger *> QUmlAcceptCallAction::trigger() const
-{
- return *(reinterpret_cast<const QSet<QUmlTrigger *> *>(&_trigger));
-}
-
-// OWNED ATTRIBUTES [AcceptCallAction]
+// OWNED ATTRIBUTES
/*!
Pin where a value is placed containing sufficient information to perform a subsequent reply and return control to the caller. The contents of this value are opaque. It can be passed and copied but it cannot be manipulated by the model.
*/
-QUmlOutputPin *QUmlAcceptCallAction::returnInformation() const
-{
- return reinterpret_cast<QUmlOutputPin *>(_returnInformation);
-}
-
-// OPERATIONS [Element]
-
-/*!
- The query allOwnedElements() gives all of the direct and indirect owned elements of an element.
- */
-QSet<QUmlElement *> QUmlAcceptCallAction::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 QUmlAcceptCallAction::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 *> QUmlAcceptCallAction::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 *> QUmlAcceptCallAction::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 QUmlAcceptCallAction::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 QUmlAcceptCallAction::separator() const
-{
- return UmlNamedElement::separator();
-}
-
-// OPERATIONS [RedefinableElement]
-
-/*!
- The query isConsistentWith() specifies, for any two RedefinableElements in a context in which redefinition is possible, whether redefinition would be logically consistent. By default, this is false; this operation must be overridden for subclasses of RedefinableElement to define the consistency conditions.
- */
-bool QUmlAcceptCallAction::isConsistentWith(QUmlRedefinableElement *redefinee) const
-{
- return UmlRedefinableElement::isConsistentWith(redefinee);
-}
-
-/*!
- The query isRedefinitionContextValid() specifies whether the redefinition contexts of this RedefinableElement are properly related to the redefinition contexts of the specified RedefinableElement to allow this element to redefine the other. By default at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element.
- */
-bool QUmlAcceptCallAction::isRedefinitionContextValid(QUmlRedefinableElement *redefined) const
-{
- return UmlRedefinableElement::isRedefinitionContextValid(redefined);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Element]
-
-void QUmlAcceptCallAction::addOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::addOwnedComment(ownedComment);
-}
-
-void QUmlAcceptCallAction::removeOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::removeOwnedComment(ownedComment);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [NamedElement]
-
-void QUmlAcceptCallAction::addClientDependency(UmlDependency *clientDependency)
-{
- UmlNamedElement::addClientDependency(clientDependency);
-}
-
-void QUmlAcceptCallAction::removeClientDependency(UmlDependency *clientDependency)
+QUmlOutputPin *
+QUmlAcceptCallAction::returnInformation() const
{
- UmlNamedElement::removeClientDependency(clientDependency);
-}
+ // This is a read-write association end
-void QUmlAcceptCallAction::setName(QString name)
-{
- UmlNamedElement::setName(name);
-}
-
-void QUmlAcceptCallAction::setNameExpression(QUmlStringExpression *nameExpression)
-{
- UmlNamedElement::setNameExpression(nameExpression);
+ return _returnInformation;
}
-void QUmlAcceptCallAction::setVisibility(QtUml::VisibilityKind visibility)
-{
- UmlNamedElement::setVisibility(visibility);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [RedefinableElement]
-
-void QUmlAcceptCallAction::setLeaf(bool isLeaf)
-{
- UmlRedefinableElement::setLeaf(isLeaf);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [ActivityNode]
-
-void QUmlAcceptCallAction::setActivity(QUmlActivity *activity)
-{
- UmlActivityNode::setActivity(activity);
-}
-
-void QUmlAcceptCallAction::addInInterruptibleRegion(UmlInterruptibleActivityRegion *inInterruptibleRegion)
-{
- UmlActivityNode::addInInterruptibleRegion(inInterruptibleRegion);
-}
-
-void QUmlAcceptCallAction::removeInInterruptibleRegion(UmlInterruptibleActivityRegion *inInterruptibleRegion)
-{
- UmlActivityNode::removeInInterruptibleRegion(inInterruptibleRegion);
-}
-
-void QUmlAcceptCallAction::addInPartition(UmlActivityPartition *inPartition)
-{
- UmlActivityNode::addInPartition(inPartition);
-}
-
-void QUmlAcceptCallAction::removeInPartition(UmlActivityPartition *inPartition)
-{
- UmlActivityNode::removeInPartition(inPartition);
-}
-
-void QUmlAcceptCallAction::setInStructuredNode(QUmlStructuredActivityNode *inStructuredNode)
-{
- UmlActivityNode::setInStructuredNode(inStructuredNode);
-}
-
-void QUmlAcceptCallAction::addIncoming(UmlActivityEdge *incoming)
-{
- UmlActivityNode::addIncoming(incoming);
-}
-
-void QUmlAcceptCallAction::removeIncoming(UmlActivityEdge *incoming)
-{
- UmlActivityNode::removeIncoming(incoming);
-}
-
-void QUmlAcceptCallAction::addOutgoing(UmlActivityEdge *outgoing)
-{
- UmlActivityNode::addOutgoing(outgoing);
-}
-
-void QUmlAcceptCallAction::removeOutgoing(UmlActivityEdge *outgoing)
-{
- UmlActivityNode::removeOutgoing(outgoing);
-}
-
-void QUmlAcceptCallAction::addRedefinedNode(UmlActivityNode *redefinedNode)
-{
- UmlActivityNode::addRedefinedNode(redefinedNode);
-}
-
-void QUmlAcceptCallAction::removeRedefinedNode(UmlActivityNode *redefinedNode)
-{
- UmlActivityNode::removeRedefinedNode(redefinedNode);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [ExecutableNode]
-
-void QUmlAcceptCallAction::addHandler(UmlExceptionHandler *handler)
-{
- UmlExecutableNode::addHandler(handler);
-}
-
-void QUmlAcceptCallAction::removeHandler(UmlExceptionHandler *handler)
-{
- UmlExecutableNode::removeHandler(handler);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Action]
-
-void QUmlAcceptCallAction::setLocallyReentrant(bool isLocallyReentrant)
-{
- UmlAction::setLocallyReentrant(isLocallyReentrant);
-}
-
-void QUmlAcceptCallAction::addLocalPostcondition(UmlConstraint *localPostcondition)
-{
- UmlAction::addLocalPostcondition(localPostcondition);
-}
-
-void QUmlAcceptCallAction::removeLocalPostcondition(UmlConstraint *localPostcondition)
-{
- UmlAction::removeLocalPostcondition(localPostcondition);
-}
-
-void QUmlAcceptCallAction::addLocalPrecondition(UmlConstraint *localPrecondition)
-{
- UmlAction::addLocalPrecondition(localPrecondition);
-}
-
-void QUmlAcceptCallAction::removeLocalPrecondition(UmlConstraint *localPrecondition)
-{
- UmlAction::removeLocalPrecondition(localPrecondition);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [AcceptEventAction]
-
-void QUmlAcceptCallAction::setUnmarshall(bool isUnmarshall)
-{
- UmlAcceptEventAction::setUnmarshall(isUnmarshall);
-}
-
-void QUmlAcceptCallAction::addResult(UmlOutputPin *result)
-{
- UmlAcceptEventAction::addResult(result);
-}
-
-void QUmlAcceptCallAction::removeResult(UmlOutputPin *result)
-{
- UmlAcceptEventAction::removeResult(result);
-}
-
-void QUmlAcceptCallAction::addTrigger(UmlTrigger *trigger)
+void QUmlAcceptCallAction::setReturnInformation(QUmlOutputPin *returnInformation)
{
- UmlAcceptEventAction::addTrigger(trigger);
-}
+ // This is a read-write association end
-void QUmlAcceptCallAction::removeTrigger(UmlTrigger *trigger)
-{
- UmlAcceptEventAction::removeTrigger(trigger);
-}
+ if (_returnInformation != returnInformation) {
+ // Adjust subsetted properties
+ removeOutput(_returnInformation);
-// SLOTS FOR OWNED ATTRIBUTES [AcceptCallAction]
+ _returnInformation = returnInformation;
+ if (returnInformation->asQObject() && this->asQObject())
+ QObject::connect(returnInformation->asQObject(), SIGNAL(destroyed()), this->asQObject(), SLOT(setReturnInformation()));
+ returnInformation->asQObject()->setParent(this->asQObject());
-void QUmlAcceptCallAction::setReturnInformation(QUmlOutputPin *returnInformation)
-{
- UmlAcceptCallAction::setReturnInformation(returnInformation);
+ // Adjust subsetted properties
+ if (returnInformation) {
+ addOutput(returnInformation);
+ }
+ }
}
-QT_END_NAMESPACE
-