summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlexecutionenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlexecutionenvironment.cpp')
-rw-r--r--src/uml/qumlexecutionenvironment.cpp1092
1 files changed, 11 insertions, 1081 deletions
diff --git a/src/uml/qumlexecutionenvironment.cpp b/src/uml/qumlexecutionenvironment.cpp
index 44f84153..1e5bcaf6 100644
--- a/src/uml/qumlexecutionenvironment.cpp
+++ b/src/uml/qumlexecutionenvironment.cpp
@@ -40,1097 +40,27 @@
****************************************************************************/
#include "qumlexecutionenvironment.h"
-#include <QtUml/QUmlBehavior>
-#include <QtUml/QUmlClass>
-#include <QtUml/QUmlClassifier>
-#include <QtUml/QUmlClassifierTemplateParameter>
-#include <QtUml/QUmlCollaborationUse>
-#include <QtUml/QUmlComment>
-#include <QtUml/QUmlConnectableElement>
-#include <QtUml/QUmlConnector>
-#include <QtUml/QUmlConstraint>
-#include <QtUml/QUmlDependency>
-#include <QtUml/QUmlDeployment>
-#include <QtUml/QUmlElement>
-#include <QtUml/QUmlElementImport>
-#include <QtUml/QUmlExtension>
-#include <QtUml/QUmlFeature>
-#include <QtUml/QUmlGeneralization>
-#include <QtUml/QUmlGeneralizationSet>
-#include <QtUml/QUmlInterfaceRealization>
-#include <QtUml/QUmlNamedElement>
-#include <QtUml/QUmlNamespace>
-#include <QtUml/QUmlNode>
-#include <QtUml/QUmlOperation>
-#include <QtUml/QUmlPackage>
-#include <QtUml/QUmlPackageableElement>
-#include <QtUml/QUmlPackageImport>
-#include <QtUml/QUmlParameterableElement>
-#include <QtUml/QUmlPort>
-#include <QtUml/QUmlProperty>
-#include <QtUml/QUmlReception>
-#include <QtUml/QUmlRedefinableElement>
-#include <QtUml/QUmlRedefinableTemplateSignature>
-#include <QtUml/QUmlStringExpression>
-#include <QtUml/QUmlSubstitution>
-#include <QtUml/QUmlTemplateBinding>
-#include <QtUml/QUmlTemplateParameter>
-#include <QtUml/QUmlTemplateSignature>
-#include <QtUml/QUmlType>
-#include <QtUml/QUmlUseCase>
-
-QT_BEGIN_NAMESPACE
+#include "private/qumlexecutionenvironmentobject_p.h"
/*!
- \class UmlExecutionEnvironment
+ \class QUmlExecutionEnvironment
\inmodule QtUml
\brief An execution environment is a node that offers an execution environment for specific types of components that are deployed on it in the form of executable artifacts.
*/
-
-QUmlExecutionEnvironment::QUmlExecutionEnvironment(QObject *parent) :
- QObject(parent)
-{
-}
-
-// OWNED ATTRIBUTES [Element]
-
-/*!
- The Comments owned by this element.
- */
-const QSet<QUmlComment *> QUmlExecutionEnvironment::ownedComment() const
-{
- return *(reinterpret_cast<const QSet<QUmlComment *> *>(&_ownedComment));
-}
-
-/*!
- The Elements owned by this element.
- */
-const QSet<QUmlElement *> QUmlExecutionEnvironment::ownedElement() const
-{
- return *(reinterpret_cast<const QSet<QUmlElement *> *>(&_ownedElement));
-}
-
-/*!
- The Element that owns this element.
- */
-QUmlElement *QUmlExecutionEnvironment::owner() const
-{
- return reinterpret_cast<QUmlElement *>(_owner);
-}
-
-// OWNED ATTRIBUTES [NamedElement]
-
-/*!
- Indicates the dependencies that reference the client.
- */
-const QSet<QUmlDependency *> QUmlExecutionEnvironment::clientDependency() const
-{
- return *(reinterpret_cast<const QSet<QUmlDependency *> *>(&_clientDependency));
-}
-
-/*!
- The name of the NamedElement.
- */
-QString QUmlExecutionEnvironment::name() const
-{
- return _name;
-}
-
-/*!
- The string expression used to define the name of this named element.
- */
-QUmlStringExpression *QUmlExecutionEnvironment::nameExpression() const
-{
- return reinterpret_cast<QUmlStringExpression *>(_nameExpression);
-}
-
-/*!
- Specifies the namespace that owns the NamedElement.
- */
-QUmlNamespace *QUmlExecutionEnvironment::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 QUmlExecutionEnvironment::qualifiedName() const
-{
- return UmlNamedElement::qualifiedName();
-}
-// OWNED ATTRIBUTES [Namespace]
-
-/*!
- References the ElementImports owned by the Namespace.
- */
-const QSet<QUmlElementImport *> QUmlExecutionEnvironment::elementImport() const
-{
- return *(reinterpret_cast<const QSet<QUmlElementImport *> *>(&_elementImport));
-}
-
-/*!
- References the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports.
- */
-const QSet<QUmlPackageableElement *> QUmlExecutionEnvironment::importedMember() const
-{
- QSet<QUmlPackageableElement *> r;
- foreach (UmlPackageableElement *element, UmlNamespace::importedMember())
- r.insert(reinterpret_cast<QUmlPackageableElement *>(element));
- return r;
-}
-
-/*!
- A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance.
- */
-const QSet<QUmlNamedElement *> QUmlExecutionEnvironment::member() const
-{
- return *(reinterpret_cast<const QSet<QUmlNamedElement *> *>(&_member));
-}
-
-/*!
- A collection of NamedElements owned by the Namespace.
- */
-const QSet<QUmlNamedElement *> QUmlExecutionEnvironment::ownedMember() const
-{
- return *(reinterpret_cast<const QSet<QUmlNamedElement *> *>(&_ownedMember));
-}
-
-/*!
- Specifies a set of Constraints owned by this Namespace.
- */
-const QSet<QUmlConstraint *> QUmlExecutionEnvironment::ownedRule() const
-{
- return *(reinterpret_cast<const QSet<QUmlConstraint *> *>(&_ownedRule));
-}
-
-/*!
- References the PackageImports owned by the Namespace.
- */
-const QSet<QUmlPackageImport *> QUmlExecutionEnvironment::packageImport() const
-{
- return *(reinterpret_cast<const QSet<QUmlPackageImport *> *>(&_packageImport));
-}
-
-// OWNED ATTRIBUTES [ParameterableElement]
-
-/*!
- The formal template parameter that owns this element.
- */
-QUmlTemplateParameter *QUmlExecutionEnvironment::owningTemplateParameter() const
-{
- return reinterpret_cast<QUmlTemplateParameter *>(_owningTemplateParameter);
-}
-// OWNED ATTRIBUTES [PackageableElement]
-
-/*!
- Indicates that packageable elements must always have a visibility, i.e., visibility is not optional.
- */
-QtUml::VisibilityKind QUmlExecutionEnvironment::visibility() const
-{
- return _visibility;
-}
-
-// OWNED ATTRIBUTES [Type]
-
-/*!
- Specifies the owning package of this classifier, if any.
- */
-QUmlPackage *QUmlExecutionEnvironment::package() const
-{
- return reinterpret_cast<QUmlPackage *>(_package);
-}
-
-// 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 QUmlExecutionEnvironment::isLeaf() const
-{
- return _isLeaf;
-}
-
-/*!
- The redefinable element that is being redefined by this element.
- */
-const QSet<QUmlRedefinableElement *> QUmlExecutionEnvironment::redefinedElement() const
-{
- return *(reinterpret_cast<const QSet<QUmlRedefinableElement *> *>(&_redefinedElement));
-}
-
-/*!
- References the contexts that this element may be redefined from.
- */
-const QSet<QUmlClassifier *> QUmlExecutionEnvironment::redefinitionContext() const
-{
- return *(reinterpret_cast<const QSet<QUmlClassifier *> *>(&_redefinitionContext));
-}
-
-// OWNED ATTRIBUTES [TemplateableElement]
-
-/*!
- The optional bindings from this element to templates.
- */
-const QSet<QUmlTemplateBinding *> QUmlExecutionEnvironment::templateBinding() const
-{
- return *(reinterpret_cast<const QSet<QUmlTemplateBinding *> *>(&_templateBinding));
-}
-
-// OWNED ATTRIBUTES [Classifier]
-
-/*!
- Refers to all of the Properties that are direct (i.e. not inherited or imported) attributes of the classifier.
- */
-const QSet<QUmlProperty *> QUmlExecutionEnvironment::attribute() const
-{
- return *(reinterpret_cast<const QSet<QUmlProperty *> *>(&_attribute));
-}
-
-/*!
- References the collaboration uses owned by the classifier.
- */
-const QSet<QUmlCollaborationUse *> QUmlExecutionEnvironment::collaborationUse() const
-{
- return *(reinterpret_cast<const QSet<QUmlCollaborationUse *> *>(&_collaborationUse));
-}
-
-/*!
- Specifies each feature defined in the classifier.Note that there may be members of the Classifier that are of the type Feature but are not included in this association, e.g. inherited features.
- */
-const QSet<QUmlFeature *> QUmlExecutionEnvironment::feature() const
-{
- return *(reinterpret_cast<const QSet<QUmlFeature *> *>(&_feature));
-}
-
-/*!
- Specifies the Generalization relationships for this Classifier. These Generalizations navigaten to more general classifiers in the generalization hierarchy.
- */
-const QSet<QUmlGeneralization *> QUmlExecutionEnvironment::generalization() const
-{
- return *(reinterpret_cast<const QSet<QUmlGeneralization *> *>(&_generalization));
-}
-
-/*!
- Specifies all elements inherited by this classifier from the general classifiers.
- */
-const QSet<QUmlNamedElement *> QUmlExecutionEnvironment::inheritedMember() const
-{
- QSet<QUmlNamedElement *> r;
- foreach (UmlNamedElement *element, UmlClassifier::inheritedMember())
- r.insert(reinterpret_cast<QUmlNamedElement *>(element));
- return r;
-}
-
-/*!
- If true, the Classifier cannot be specialized by generalization. Note that this property is preserved through package merge operations; that is, the capability to specialize a Classifier (i.e., isFinalSpecialization =false) must be preserved in the resulting Classifier of a package merge operation where a Classifier with isFinalSpecialization =false is merged with a matching Classifier with isFinalSpecialization =true: the resulting Classifier will have isFinalSpecialization =false.
- */
-bool QUmlExecutionEnvironment::isFinalSpecialization() const
-{
- return _isFinalSpecialization;
-}
-
-/*!
- The optional template signature specifying the formal template parameters.
- */
-QUmlRedefinableTemplateSignature *QUmlExecutionEnvironment::ownedTemplateSignature() const
-{
- return reinterpret_cast<QUmlRedefinableTemplateSignature *>(_ownedTemplateSignature);
-}
-
-/*!
- References the use cases owned by this classifier.
- */
-const QSet<QUmlUseCase *> QUmlExecutionEnvironment::ownedUseCase() const
-{
- return *(reinterpret_cast<const QSet<QUmlUseCase *> *>(&_ownedUseCase));
-}
-
-/*!
- Designates the GeneralizationSet of which the associated Classifier is a power type.
- */
-const QSet<QUmlGeneralizationSet *> QUmlExecutionEnvironment::powertypeExtent() const
-{
- return *(reinterpret_cast<const QSet<QUmlGeneralizationSet *> *>(&_powertypeExtent));
-}
-
-/*!
- References the Classifiers that are redefined by this Classifier.
- */
-const QSet<QUmlClassifier *> QUmlExecutionEnvironment::redefinedClassifier() const
-{
- return *(reinterpret_cast<const QSet<QUmlClassifier *> *>(&_redefinedClassifier));
-}
-
-/*!
- References a collaboration use which indicates the collaboration that represents this classifier.
- */
-QUmlCollaborationUse *QUmlExecutionEnvironment::representation() const
-{
- return reinterpret_cast<QUmlCollaborationUse *>(_representation);
-}
-
-/*!
- References the substitutions that are owned by this Classifier.
- */
-const QSet<QUmlSubstitution *> QUmlExecutionEnvironment::substitution() const
-{
- return *(reinterpret_cast<const QSet<QUmlSubstitution *> *>(&_substitution));
-}
-
-/*!
- The template parameter that exposes this element as a formal parameter.
- */
-QUmlClassifierTemplateParameter *QUmlExecutionEnvironment::templateParameter() const
-{
- return reinterpret_cast<QUmlClassifierTemplateParameter *>(_templateParameter);
-}
-
-/*!
- The set of use cases for which this Classifier is the subject.
- */
-const QSet<QUmlUseCase *> QUmlExecutionEnvironment::useCase() const
-{
- return *(reinterpret_cast<const QSet<QUmlUseCase *> *>(&_useCase));
-}
-
-// OWNED ATTRIBUTES [StructuredClassifier]
-
-/*!
- References the connectors owned by the classifier.
- */
-const QSet<QUmlConnector *> QUmlExecutionEnvironment::ownedConnector() const
-{
- return *(reinterpret_cast<const QSet<QUmlConnector *> *>(&_ownedConnector));
-}
-
-/*!
- References the properties specifying instances that the classifier owns by composition. This association is derived, selecting those owned properties where isComposite is true.
- */
-const QSet<QUmlProperty *> QUmlExecutionEnvironment::part() const
-{
- QSet<QUmlProperty *> r;
- foreach (UmlProperty *element, UmlStructuredClassifier::part())
- r.insert(reinterpret_cast<QUmlProperty *>(element));
- return r;
-}
-
-/*!
- References the roles that instances may play in this classifier.
- */
-const QSet<QUmlConnectableElement *> QUmlExecutionEnvironment::role() const
-{
- return *(reinterpret_cast<const QSet<QUmlConnectableElement *> *>(&_role));
-}
-
-// OWNED ATTRIBUTES [EncapsulatedClassifier]
-
-/*!
- References a set of ports that an encapsulated classifier owns.
- */
-const QSet<QUmlPort *> QUmlExecutionEnvironment::ownedPort() const
-{
- QSet<QUmlPort *> r;
- foreach (UmlPort *element, UmlEncapsulatedClassifier::ownedPort())
- r.insert(reinterpret_cast<QUmlPort *>(element));
- return r;
-}
-
-// OWNED ATTRIBUTES [BehavioredClassifier]
-
-/*!
- A behavior specification that specifies the behavior of the classifier itself.
- */
-QUmlBehavior *QUmlExecutionEnvironment::classifierBehavior() const
-{
- return reinterpret_cast<QUmlBehavior *>(_classifierBehavior);
-}
-
-/*!
- The set of InterfaceRealizations owned by the BehavioredClassifier. Interface realizations reference the Interfaces of which the BehavioredClassifier is an implementation.
- */
-const QSet<QUmlInterfaceRealization *> QUmlExecutionEnvironment::interfaceRealization() const
-{
- return *(reinterpret_cast<const QSet<QUmlInterfaceRealization *> *>(&_interfaceRealization));
-}
-
-/*!
- References behavior specifications owned by a classifier.
- */
-const QSet<QUmlBehavior *> QUmlExecutionEnvironment::ownedBehavior() const
-{
- return *(reinterpret_cast<const QSet<QUmlBehavior *> *>(&_ownedBehavior));
-}
-
-// OWNED ATTRIBUTES [Class]
-
-/*!
- References the Extensions that specify additional properties of the metaclass. The property is derived from the extensions whose memberEnds are typed by the Class.
- */
-const QSet<QUmlExtension *> QUmlExecutionEnvironment::extension() const
-{
- QSet<QUmlExtension *> r;
- foreach (UmlExtension *element, UmlClass::extension())
- r.insert(reinterpret_cast<QUmlExtension *>(element));
- return r;
-}
-
-/*!
- If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers e.g. as the target of general metarelationships or generalization relationships.True when a class is abstract.
- */
-bool QUmlExecutionEnvironment::isAbstract() const
-{
- return _isAbstract;
-}
-
-/*!
- Determines whether an object specified by this class is active or not. If true, then the owning class is referred to as an active class. If false, then such a class is referred to as a passive class.
- */
-bool QUmlExecutionEnvironment::isActive() const
-{
- return _isActive;
-}
-
-/*!
- References all the Classifiers that are defined (nested) within the Class.
- */
-const QList<QUmlClassifier *> QUmlExecutionEnvironment::nestedClassifier() const
-{
- return *(reinterpret_cast<const QList<QUmlClassifier *> *>(&_nestedClassifier));
-}
-
-/*!
- The attributes (i.e. the properties) owned by the class.
- */
-const QList<QUmlProperty *> QUmlExecutionEnvironment::ownedAttribute() const
-{
- return *(reinterpret_cast<const QList<QUmlProperty *> *>(&_ownedAttribute));
-}
-
-/*!
- The operations owned by the class.
- */
-const QList<QUmlOperation *> QUmlExecutionEnvironment::ownedOperation() const
-{
- return *(reinterpret_cast<const QList<QUmlOperation *> *>(&_ownedOperation));
-}
-
-/*!
- Receptions that objects of this class are willing to accept.
- */
-const QSet<QUmlReception *> QUmlExecutionEnvironment::ownedReception() const
-{
- return *(reinterpret_cast<const QSet<QUmlReception *> *>(&_ownedReception));
-}
-
-/*!
- This gives the superclasses of a class.
- */
-const QSet<QUmlClass *> QUmlExecutionEnvironment::superClass() const
-{
- QSet<QUmlClass *> r;
- foreach (UmlClass *element, UmlClass::superClass())
- r.insert(reinterpret_cast<QUmlClass *>(element));
- return r;
-}
-
-// OWNED ATTRIBUTES [DeploymentTarget]
-
-/*!
- The set of elements that are manifested in an Artifact that is involved in Deployment to a DeploymentTarget.
- */
-const QSet<QUmlPackageableElement *> QUmlExecutionEnvironment::deployedElement() const
-{
- QSet<QUmlPackageableElement *> r;
- foreach (UmlPackageableElement *element, UmlDeploymentTarget::deployedElement())
- r.insert(reinterpret_cast<QUmlPackageableElement *>(element));
- return r;
-}
-
-/*!
- The set of Deployments for a DeploymentTarget.
- */
-const QSet<QUmlDeployment *> QUmlExecutionEnvironment::deployment() const
-{
- return *(reinterpret_cast<const QSet<QUmlDeployment *> *>(&_deployment));
-}
-
-// OWNED ATTRIBUTES [Node]
-
-/*!
- The Nodes that are defined (nested) within the Node.
- */
-const QSet<QUmlNode *> QUmlExecutionEnvironment::nestedNode() const
-{
- return *(reinterpret_cast<const QSet<QUmlNode *> *>(&_nestedNode));
-}
-
-// OPERATIONS [Element]
-
-/*!
- The query allOwnedElements() gives all of the direct and indirect owned elements of an element.
- */
-QSet<QUmlElement *> QUmlExecutionEnvironment::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 QUmlExecutionEnvironment::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 *> QUmlExecutionEnvironment::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 *> QUmlExecutionEnvironment::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 QUmlExecutionEnvironment::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 QUmlExecutionEnvironment::separator() const
-{
- return UmlNamedElement::separator();
-}
-
-// OPERATIONS [Namespace]
-
-/*!
- The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this namespace.
- */
-QSet<QUmlPackageableElement *> QUmlExecutionEnvironment::excludeCollisions(QSet<QUmlPackageableElement *> imps) const
-{
- QSet<QUmlPackageableElement *> r;
- foreach (UmlPackageableElement *element, UmlNamespace::excludeCollisions(*(reinterpret_cast<QSet<UmlPackageableElement *> *>(&imps))))
- r.insert(reinterpret_cast<QUmlPackageableElement *>(element));
- return r;
-}
-
-/*!
- The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace. In general a member can have multiple names in a Namespace if it is imported more than once with different aliases. The query takes account of importing. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package.The query getNamesOfMember() takes importing into account. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package.
- */
-QSet<QString> QUmlExecutionEnvironment::getNamesOfMember(QUmlNamedElement *element) const
-{
- return UmlNamespace::getNamesOfMember(element);
-}
-
-/*!
- The query importMembers() defines which of a set of PackageableElements are actually imported into the namespace. This excludes hidden ones, i.e., those which have names that conflict with names of owned members, and also excludes elements which would have the same name when imported.
- */
-QSet<QUmlPackageableElement *> QUmlExecutionEnvironment::importMembers(QSet<QUmlPackageableElement *> imps) const
-{
- QSet<QUmlPackageableElement *> r;
- foreach (UmlPackageableElement *element, UmlNamespace::importMembers(*(reinterpret_cast<QSet<UmlPackageableElement *> *>(&imps))))
- r.insert(reinterpret_cast<QUmlPackageableElement *>(element));
- return r;
-}
-
-/*!
- The Boolean query membersAreDistinguishable() determines whether all of the namespace's members are distinguishable within it.
- */
-bool QUmlExecutionEnvironment::membersAreDistinguishable() const
-{
- return UmlNamespace::membersAreDistinguishable();
-}
-
-// OPERATIONS [ParameterableElement]
-
-/*!
- The query isCompatibleWith() determines if this parameterable element is compatible with the specified parameterable element. By default parameterable element P is compatible with parameterable element Q if the kind of P is the same or a subtype as the kind of Q. Subclasses should override this operation to specify different compatibility constraints.
- */
-bool QUmlExecutionEnvironment::isCompatibleWith(QUmlParameterableElement *p) const
-{
- return UmlParameterableElement::isCompatibleWith(p);
-}
-
-/*!
- The query isTemplateParameter() determines if this parameterable element is exposed as a formal template parameter.
- */
-bool QUmlExecutionEnvironment::isTemplateParameter() const
-{
- return UmlParameterableElement::isTemplateParameter();
-}
-
-// OPERATIONS [Type]
-// 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 QUmlExecutionEnvironment::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 QUmlExecutionEnvironment::isRedefinitionContextValid(QUmlRedefinableElement *redefined) const
-{
- return UmlRedefinableElement::isRedefinitionContextValid(redefined);
-}
-
-// OPERATIONS [TemplateableElement]
-
-/*!
- The query parameterableElements() returns the set of elements that may be used as the parametered elements for a template parameter of this templateable element. By default, this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements.
- */
-QSet<QUmlParameterableElement *> QUmlExecutionEnvironment::parameterableElements() const
-{
- QSet<QUmlParameterableElement *> r;
- foreach (UmlParameterableElement *element, UmlTemplateableElement::parameterableElements())
- r.insert(reinterpret_cast<QUmlParameterableElement *>(element));
- return r;
-}
-
-// OPERATIONS [Classifier]
-
-/*!
- The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature.
- */
-QSet<QUmlFeature *> QUmlExecutionEnvironment::allFeatures() const
-{
- QSet<QUmlFeature *> r;
- foreach (UmlFeature *element, UmlClassifier::allFeatures())
- r.insert(reinterpret_cast<QUmlFeature *>(element));
- return r;
-}
-
-/*!
- The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier.
- */
-QSet<QUmlClassifier *> QUmlExecutionEnvironment::allParents() const
-{
- QSet<QUmlClassifier *> r;
- foreach (UmlClassifier *element, UmlClassifier::allParents())
- r.insert(reinterpret_cast<QUmlClassifier *>(element));
- return r;
-}
-
-/*!
- The query conformsTo() gives true for a classifier that defines a type that conforms to another. This is used, for example, in the specification of signature conformance for operations.
- */
-bool QUmlExecutionEnvironment::conformsTo(QUmlClassifier *other) const
-{
- return UmlClassifier::conformsTo(other);
-}
-
-/*!
- The query hasVisibilityOf() determines whether a named element is visible in the classifier. By default all are visible. It is only called when the argument is something owned by a parent.
- */
-bool QUmlExecutionEnvironment::hasVisibilityOf(QUmlNamedElement *n) const
-{
- return UmlClassifier::hasVisibilityOf(n);
-}
-
-/*!
- The query inheritableMembers() gives all of the members of a classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply.
- */
-QSet<QUmlNamedElement *> QUmlExecutionEnvironment::inheritableMembers(QUmlClassifier *c) const
-{
- QSet<QUmlNamedElement *> r;
- foreach (UmlNamedElement *element, UmlClassifier::inheritableMembers(c))
- r.insert(reinterpret_cast<QUmlNamedElement *>(element));
- return r;
-}
-
-/*!
- The query isTemplate() returns whether this templateable element is actually a template.
- */
-bool QUmlExecutionEnvironment::isTemplate() const
-{
- return UmlClassifier::isTemplate();
-}
-
-/*!
- The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints.
- */
-bool QUmlExecutionEnvironment::maySpecializeType(QUmlClassifier *c) const
-{
- return UmlClassifier::maySpecializeType(c);
-}
-
-/*!
- The query parents() gives all of the immediate ancestors of a generalized Classifier.
- */
-QSet<QUmlClassifier *> QUmlExecutionEnvironment::parents() const
-{
- QSet<QUmlClassifier *> r;
- foreach (UmlClassifier *element, UmlClassifier::parents())
- r.insert(reinterpret_cast<QUmlClassifier *>(element));
- return r;
-}
-
-// OPERATIONS [Class]
-
-/*!
- The inherit operation is overridden to exclude redefined properties.
- */
-QSet<QUmlNamedElement *> QUmlExecutionEnvironment::inherit(QSet<QUmlNamedElement *> inhs) const
-{
- QSet<QUmlNamedElement *> r;
- foreach (UmlNamedElement *element, UmlClass::inherit(*(reinterpret_cast<QSet<UmlNamedElement *> *>(&inhs))))
- r.insert(reinterpret_cast<QUmlNamedElement *>(element));
- return r;
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Element]
-
-void QUmlExecutionEnvironment::addOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::addOwnedComment(ownedComment);
-}
-
-void QUmlExecutionEnvironment::removeOwnedComment(UmlComment *ownedComment)
-{
- UmlElement::removeOwnedComment(ownedComment);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [NamedElement]
-
-void QUmlExecutionEnvironment::addClientDependency(UmlDependency *clientDependency)
-{
- UmlNamedElement::addClientDependency(clientDependency);
-}
-
-void QUmlExecutionEnvironment::removeClientDependency(UmlDependency *clientDependency)
-{
- UmlNamedElement::removeClientDependency(clientDependency);
-}
-
-void QUmlExecutionEnvironment::setName(QString name)
-{
- UmlNamedElement::setName(name);
-}
-
-void QUmlExecutionEnvironment::setNameExpression(QUmlStringExpression *nameExpression)
-{
- UmlNamedElement::setNameExpression(nameExpression);
-}
-// SLOTS FOR OWNED ATTRIBUTES [Namespace]
-
-void QUmlExecutionEnvironment::addElementImport(UmlElementImport *elementImport)
-{
- UmlNamespace::addElementImport(elementImport);
-}
-
-void QUmlExecutionEnvironment::removeElementImport(UmlElementImport *elementImport)
-{
- UmlNamespace::removeElementImport(elementImport);
-}
-
-void QUmlExecutionEnvironment::addOwnedRule(UmlConstraint *ownedRule)
-{
- UmlNamespace::addOwnedRule(ownedRule);
-}
-
-void QUmlExecutionEnvironment::removeOwnedRule(UmlConstraint *ownedRule)
-{
- UmlNamespace::removeOwnedRule(ownedRule);
-}
-
-void QUmlExecutionEnvironment::addPackageImport(UmlPackageImport *packageImport)
-{
- UmlNamespace::addPackageImport(packageImport);
-}
-
-void QUmlExecutionEnvironment::removePackageImport(UmlPackageImport *packageImport)
-{
- UmlNamespace::removePackageImport(packageImport);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [ParameterableElement]
-
-void QUmlExecutionEnvironment::setOwningTemplateParameter(QUmlTemplateParameter *owningTemplateParameter)
-{
- UmlParameterableElement::setOwningTemplateParameter(owningTemplateParameter);
-}
-// SLOTS FOR OWNED ATTRIBUTES [PackageableElement]
-
-void QUmlExecutionEnvironment::setVisibility(QtUml::VisibilityKind visibility)
-{
- UmlPackageableElement::setVisibility(visibility);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Type]
-
-void QUmlExecutionEnvironment::setPackage(QUmlPackage *package)
-{
- UmlType::setPackage(package);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [RedefinableElement]
-
-void QUmlExecutionEnvironment::setLeaf(bool isLeaf)
-{
- UmlRedefinableElement::setLeaf(isLeaf);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [TemplateableElement]
-
-void QUmlExecutionEnvironment::addTemplateBinding(UmlTemplateBinding *templateBinding)
-{
- UmlTemplateableElement::addTemplateBinding(templateBinding);
-}
-
-void QUmlExecutionEnvironment::removeTemplateBinding(UmlTemplateBinding *templateBinding)
-{
- UmlTemplateableElement::removeTemplateBinding(templateBinding);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Classifier]
-
-void QUmlExecutionEnvironment::addCollaborationUse(UmlCollaborationUse *collaborationUse)
+QUmlExecutionEnvironment::QUmlExecutionEnvironment(bool createQObject) :
+ QUmlNode(false)
{
- UmlClassifier::addCollaborationUse(collaborationUse);
+ if (createQObject)
+ _qObject = new QUmlExecutionEnvironmentObject(this);
}
-void QUmlExecutionEnvironment::removeCollaborationUse(UmlCollaborationUse *collaborationUse)
+QUmlExecutionEnvironment::~QUmlExecutionEnvironment()
{
- UmlClassifier::removeCollaborationUse(collaborationUse);
+ if (!deletingFromQObject) {
+ _qObject->setProperty("deletingFromModelingObject", true);
+ delete _qObject;
+ }
}
-void QUmlExecutionEnvironment::addGeneralization(UmlGeneralization *generalization)
-{
- UmlClassifier::addGeneralization(generalization);
-}
-
-void QUmlExecutionEnvironment::removeGeneralization(UmlGeneralization *generalization)
-{
- UmlClassifier::removeGeneralization(generalization);
-}
-
-void QUmlExecutionEnvironment::setFinalSpecialization(bool isFinalSpecialization)
-{
- UmlClassifier::setFinalSpecialization(isFinalSpecialization);
-}
-
-void QUmlExecutionEnvironment::setOwnedTemplateSignature(QUmlRedefinableTemplateSignature *ownedTemplateSignature)
-{
- UmlClassifier::setOwnedTemplateSignature(ownedTemplateSignature);
-}
-
-void QUmlExecutionEnvironment::addOwnedUseCase(UmlUseCase *ownedUseCase)
-{
- UmlClassifier::addOwnedUseCase(ownedUseCase);
-}
-
-void QUmlExecutionEnvironment::removeOwnedUseCase(UmlUseCase *ownedUseCase)
-{
- UmlClassifier::removeOwnedUseCase(ownedUseCase);
-}
-
-void QUmlExecutionEnvironment::addPowertypeExtent(UmlGeneralizationSet *powertypeExtent)
-{
- UmlClassifier::addPowertypeExtent(powertypeExtent);
-}
-
-void QUmlExecutionEnvironment::removePowertypeExtent(UmlGeneralizationSet *powertypeExtent)
-{
- UmlClassifier::removePowertypeExtent(powertypeExtent);
-}
-
-void QUmlExecutionEnvironment::addRedefinedClassifier(UmlClassifier *redefinedClassifier)
-{
- UmlClassifier::addRedefinedClassifier(redefinedClassifier);
-}
-
-void QUmlExecutionEnvironment::removeRedefinedClassifier(UmlClassifier *redefinedClassifier)
-{
- UmlClassifier::removeRedefinedClassifier(redefinedClassifier);
-}
-
-void QUmlExecutionEnvironment::setRepresentation(QUmlCollaborationUse *representation)
-{
- UmlClassifier::setRepresentation(representation);
-}
-
-void QUmlExecutionEnvironment::addSubstitution(UmlSubstitution *substitution)
-{
- UmlClassifier::addSubstitution(substitution);
-}
-
-void QUmlExecutionEnvironment::removeSubstitution(UmlSubstitution *substitution)
-{
- UmlClassifier::removeSubstitution(substitution);
-}
-
-void QUmlExecutionEnvironment::setTemplateParameter(QUmlClassifierTemplateParameter *templateParameter)
-{
- UmlClassifier::setTemplateParameter(templateParameter);
-}
-
-void QUmlExecutionEnvironment::addUseCase(UmlUseCase *useCase)
-{
- UmlClassifier::addUseCase(useCase);
-}
-
-void QUmlExecutionEnvironment::removeUseCase(UmlUseCase *useCase)
-{
- UmlClassifier::removeUseCase(useCase);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [StructuredClassifier]
-
-void QUmlExecutionEnvironment::addOwnedConnector(UmlConnector *ownedConnector)
-{
- UmlStructuredClassifier::addOwnedConnector(ownedConnector);
-}
-
-void QUmlExecutionEnvironment::removeOwnedConnector(UmlConnector *ownedConnector)
-{
- UmlStructuredClassifier::removeOwnedConnector(ownedConnector);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [EncapsulatedClassifier]
-
-// SLOTS FOR OWNED ATTRIBUTES [BehavioredClassifier]
-
-void QUmlExecutionEnvironment::setClassifierBehavior(QUmlBehavior *classifierBehavior)
-{
- UmlBehavioredClassifier::setClassifierBehavior(classifierBehavior);
-}
-
-void QUmlExecutionEnvironment::addInterfaceRealization(UmlInterfaceRealization *interfaceRealization)
-{
- UmlBehavioredClassifier::addInterfaceRealization(interfaceRealization);
-}
-
-void QUmlExecutionEnvironment::removeInterfaceRealization(UmlInterfaceRealization *interfaceRealization)
-{
- UmlBehavioredClassifier::removeInterfaceRealization(interfaceRealization);
-}
-
-void QUmlExecutionEnvironment::addOwnedBehavior(UmlBehavior *ownedBehavior)
-{
- UmlBehavioredClassifier::addOwnedBehavior(ownedBehavior);
-}
-
-void QUmlExecutionEnvironment::removeOwnedBehavior(UmlBehavior *ownedBehavior)
-{
- UmlBehavioredClassifier::removeOwnedBehavior(ownedBehavior);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Class]
-
-void QUmlExecutionEnvironment::setAbstract(bool isAbstract)
-{
- UmlClass::setAbstract(isAbstract);
-}
-
-void QUmlExecutionEnvironment::setActive(bool isActive)
-{
- UmlClass::setActive(isActive);
-}
-
-void QUmlExecutionEnvironment::addNestedClassifier(UmlClassifier *nestedClassifier)
-{
- UmlClass::addNestedClassifier(nestedClassifier);
-}
-
-void QUmlExecutionEnvironment::removeNestedClassifier(UmlClassifier *nestedClassifier)
-{
- UmlClass::removeNestedClassifier(nestedClassifier);
-}
-
-void QUmlExecutionEnvironment::addOwnedAttribute(UmlProperty *ownedAttribute)
-{
- UmlClass::addOwnedAttribute(ownedAttribute);
-}
-
-void QUmlExecutionEnvironment::removeOwnedAttribute(UmlProperty *ownedAttribute)
-{
- UmlClass::removeOwnedAttribute(ownedAttribute);
-}
-
-void QUmlExecutionEnvironment::addOwnedOperation(UmlOperation *ownedOperation)
-{
- UmlClass::addOwnedOperation(ownedOperation);
-}
-
-void QUmlExecutionEnvironment::removeOwnedOperation(UmlOperation *ownedOperation)
-{
- UmlClass::removeOwnedOperation(ownedOperation);
-}
-
-void QUmlExecutionEnvironment::addOwnedReception(UmlReception *ownedReception)
-{
- UmlClass::addOwnedReception(ownedReception);
-}
-
-void QUmlExecutionEnvironment::removeOwnedReception(UmlReception *ownedReception)
-{
- UmlClass::removeOwnedReception(ownedReception);
-}
-
-void QUmlExecutionEnvironment::addSuperClass(UmlClass *superClass)
-{
- UmlClass::addSuperClass(superClass);
-}
-
-void QUmlExecutionEnvironment::removeSuperClass(UmlClass *superClass)
-{
- UmlClass::removeSuperClass(superClass);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [DeploymentTarget]
-
-void QUmlExecutionEnvironment::addDeployment(UmlDeployment *deployment)
-{
- UmlDeploymentTarget::addDeployment(deployment);
-}
-
-void QUmlExecutionEnvironment::removeDeployment(UmlDeployment *deployment)
-{
- UmlDeploymentTarget::removeDeployment(deployment);
-}
-
-// SLOTS FOR OWNED ATTRIBUTES [Node]
-
-void QUmlExecutionEnvironment::addNestedNode(UmlNode *nestedNode)
-{
- UmlNode::addNestedNode(nestedNode);
-}
-
-void QUmlExecutionEnvironment::removeNestedNode(UmlNode *nestedNode)
-{
- UmlNode::removeNestedNode(nestedNode);
-}
-
-QT_END_NAMESPACE
-