diff options
Diffstat (limited to 'src/uml/qumlbehavioralfeature.h')
-rw-r--r-- | src/uml/qumlbehavioralfeature.h | 191 |
1 files changed, 35 insertions, 156 deletions
diff --git a/src/uml/qumlbehavioralfeature.h b/src/uml/qumlbehavioralfeature.h index 28db37ca..dd678e73 100644 --- a/src/uml/qumlbehavioralfeature.h +++ b/src/uml/qumlbehavioralfeature.h @@ -43,8 +43,9 @@ #include <QtUml/QtUmlGlobal> -#include <QtCore/QObject> -#include "private/umlbehavioralfeature_p.h" +#include <QtUml/QUmlNamespace> +#include <QtUml/QUmlFeature> + #include <QtUml/QtUmlNamespace> @@ -55,173 +56,51 @@ QT_BEGIN_NAMESPACE QT_MODULE(QtUml) class QUmlBehavior; -class QUmlClassifier; -class QUmlComment; -class QUmlConstraint; -class QUmlDependency; -class QUmlElement; -class QUmlElementImport; class QUmlNamedElement; -class QUmlNamespace; -class QUmlPackage; -class QUmlPackageableElement; -class QUmlPackageImport; class QUmlParameter; class QUmlParameterSet; -class QUmlRedefinableElement; -class QUmlStringExpression; class QUmlType; -class Q_UML_EXPORT QUmlBehavioralFeature : public QObject, public UmlBehavioralFeature +class Q_UML_EXPORT QUmlBehavioralFeature : public QUmlNamespace, public QUmlFeature { - Q_OBJECT - - // Properties [Element] - Q_PROPERTY(QSet<QUmlComment *> ownedComment READ ownedComment) - Q_PROPERTY(QSet<QUmlElement *> ownedElement READ ownedElement) - Q_PROPERTY(QUmlElement * owner READ owner) - - // Properties [NamedElement] - Q_PROPERTY(QSet<QUmlDependency *> clientDependency READ clientDependency) - Q_PROPERTY(QString name READ name) - Q_PROPERTY(QUmlStringExpression * nameExpression READ nameExpression) - Q_PROPERTY(QUmlNamespace * namespace_ READ namespace_) - Q_PROPERTY(QString qualifiedName READ qualifiedName) - Q_PROPERTY(QtUml::VisibilityKind visibility READ visibility) - - // Properties [Namespace] - Q_PROPERTY(QSet<QUmlElementImport *> elementImport READ elementImport) - Q_PROPERTY(QSet<QUmlPackageableElement *> importedMember READ importedMember) - Q_PROPERTY(QSet<QUmlNamedElement *> member READ member) - Q_PROPERTY(QSet<QUmlNamedElement *> ownedMember READ ownedMember) - Q_PROPERTY(QSet<QUmlConstraint *> ownedRule READ ownedRule) - Q_PROPERTY(QSet<QUmlPackageImport *> packageImport READ packageImport) - - // Properties [RedefinableElement] - Q_PROPERTY(bool isLeaf READ isLeaf) - Q_PROPERTY(QSet<QUmlRedefinableElement *> redefinedElement READ redefinedElement) - Q_PROPERTY(QSet<QUmlClassifier *> redefinitionContext READ redefinitionContext) - - // Properties [Feature] - Q_PROPERTY(QSet<QUmlClassifier *> featuringClassifier READ featuringClassifier) - Q_PROPERTY(bool isStatic READ isStatic) - - // Properties [BehavioralFeature] - Q_PROPERTY(QtUml::CallConcurrencyKind concurrency READ concurrency) - Q_PROPERTY(bool isAbstract READ isAbstract) - Q_PROPERTY(QSet<QUmlBehavior *> method READ method) - Q_PROPERTY(QList<QUmlParameter *> ownedParameter READ ownedParameter) - Q_PROPERTY(QSet<QUmlParameterSet *> ownedParameterSet READ ownedParameterSet) - Q_PROPERTY(QSet<QUmlType *> raisedException READ raisedException) - public: - Q_DECL_HIDDEN explicit QUmlBehavioralFeature(QObject *parent = 0); - - // Owned attributes [Element] - Q_INVOKABLE const QSet<QUmlComment *> ownedComment() const; - Q_INVOKABLE const QSet<QUmlElement *> ownedElement() const; - Q_INVOKABLE QUmlElement *owner() const; - - // Owned attributes [NamedElement] - Q_INVOKABLE const QSet<QUmlDependency *> clientDependency() const; - Q_INVOKABLE QString name() const; - Q_INVOKABLE QUmlStringExpression *nameExpression() const; - Q_INVOKABLE QUmlNamespace *namespace_() const; - Q_INVOKABLE QString qualifiedName() const; - Q_INVOKABLE QtUml::VisibilityKind visibility() const; - - // Owned attributes [Namespace] - Q_INVOKABLE const QSet<QUmlElementImport *> elementImport() const; - Q_INVOKABLE const QSet<QUmlPackageableElement *> importedMember() const; - Q_INVOKABLE const QSet<QUmlNamedElement *> member() const; - Q_INVOKABLE const QSet<QUmlNamedElement *> ownedMember() const; - Q_INVOKABLE const QSet<QUmlConstraint *> ownedRule() const; - Q_INVOKABLE const QSet<QUmlPackageImport *> packageImport() const; - - // Owned attributes [RedefinableElement] - Q_INVOKABLE bool isLeaf() const; - Q_INVOKABLE const QSet<QUmlRedefinableElement *> redefinedElement() const; - Q_INVOKABLE const QSet<QUmlClassifier *> redefinitionContext() const; - - // Owned attributes [Feature] - Q_INVOKABLE const QSet<QUmlClassifier *> featuringClassifier() const; - Q_INVOKABLE bool isStatic() const; - - // Owned attributes [BehavioralFeature] - Q_INVOKABLE QtUml::CallConcurrencyKind concurrency() const; - Q_INVOKABLE bool isAbstract() const; - Q_INVOKABLE const QSet<QUmlBehavior *> method() const; - Q_INVOKABLE const QList<QUmlParameter *> ownedParameter() const; - Q_INVOKABLE const QSet<QUmlParameterSet *> ownedParameterSet() const; - Q_INVOKABLE const QSet<QUmlType *> raisedException() const; - - // Operations [Element] - Q_INVOKABLE QSet<QUmlElement *> allOwnedElements() const; - Q_INVOKABLE bool mustBeOwned() const; - - // Operations [NamedElement] - Q_INVOKABLE QList<QUmlNamespace *> allNamespaces() const; - Q_INVOKABLE QSet<QUmlPackage *> allOwningPackages() const; - Q_INVOKABLE QString separator() const; - - // Operations [Namespace] - Q_INVOKABLE QSet<QUmlPackageableElement *> excludeCollisions(QSet<QUmlPackageableElement *> imps) const; - Q_INVOKABLE QSet<QString> getNamesOfMember(QUmlNamedElement *element) const; - Q_INVOKABLE QSet<QUmlPackageableElement *> importMembers(QSet<QUmlPackageableElement *> imps) const; - Q_INVOKABLE bool membersAreDistinguishable() const; - - // Operations [RedefinableElement] - Q_INVOKABLE bool isConsistentWith(QUmlRedefinableElement *redefinee) const; - Q_INVOKABLE bool isRedefinitionContextValid(QUmlRedefinableElement *redefined) const; - - // Operations [BehavioralFeature] - Q_INVOKABLE bool isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) const; - -public Q_SLOTS: - - // Slots for owned attributes [Element] - void addOwnedComment(UmlComment *ownedComment); - void removeOwnedComment(UmlComment *ownedComment); - - // Slots for owned attributes [NamedElement] - void addClientDependency(UmlDependency *clientDependency); - void removeClientDependency(UmlDependency *clientDependency); - void setName(QString name); - void setNameExpression(QUmlStringExpression *nameExpression); - void setVisibility(QtUml::VisibilityKind visibility); - - // Slots for owned attributes [Namespace] - void addElementImport(UmlElementImport *elementImport); - void removeElementImport(UmlElementImport *elementImport); - void addOwnedRule(UmlConstraint *ownedRule); - void removeOwnedRule(UmlConstraint *ownedRule); - void addPackageImport(UmlPackageImport *packageImport); - void removePackageImport(UmlPackageImport *packageImport); - - // Slots for owned attributes [RedefinableElement] - void setLeaf(bool isLeaf); - - // Slots for owned attributes [Feature] - void setStatic(bool isStatic); - - // Slots for owned attributes [BehavioralFeature] + virtual ~QUmlBehavioralFeature(); + + // Owned attributes + QtUml::CallConcurrencyKind concurrency() const; void setConcurrency(QtUml::CallConcurrencyKind concurrency); + bool isAbstract() const; void setAbstract(bool isAbstract); - void addMethod(UmlBehavior *method); - void removeMethod(UmlBehavior *method); - void addOwnedParameter(UmlParameter *ownedParameter); - void removeOwnedParameter(UmlParameter *ownedParameter); - void addOwnedParameterSet(UmlParameterSet *ownedParameterSet); - void removeOwnedParameterSet(UmlParameterSet *ownedParameterSet); - void addRaisedException(UmlType *raisedException); - void removeRaisedException(UmlType *raisedException); + const QSet<QUmlBehavior *> method() const; + void addMethod(QUmlBehavior *method); + void removeMethod(QUmlBehavior *method); + const QList<QUmlParameter *> ownedParameter() const; + void addOwnedParameter(QUmlParameter *ownedParameter); + void removeOwnedParameter(QUmlParameter *ownedParameter); + const QSet<QUmlParameterSet *> ownedParameterSet() const; + void addOwnedParameterSet(QUmlParameterSet *ownedParameterSet); + void removeOwnedParameterSet(QUmlParameterSet *ownedParameterSet); + const QSet<QUmlType *> raisedException() const; + void addRaisedException(QUmlType *raisedException); + void removeRaisedException(QUmlType *raisedException); + + // Operations + bool isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) const; + +protected: + explicit QUmlBehavioralFeature(); + + QtUml::CallConcurrencyKind _concurrency; + bool _isAbstract; + QSet<QUmlBehavior *> _method; + QList<QUmlParameter *> _ownedParameter; + QSet<QUmlParameterSet *> _ownedParameterSet; + QSet<QUmlType *> _raisedException; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QUmlBehavioralFeature *) -Q_DECLARE_METATYPE(QList<QUmlBehavioralFeature *> *) -Q_DECLARE_METATYPE(QSet<QUmlBehavioralFeature *> *) +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlBehavioralFeature) *) QT_END_HEADER |