summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlparameter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlparameter.h')
-rw-r--r--src/uml/qumlparameter.h189
1 files changed, 28 insertions, 161 deletions
diff --git a/src/uml/qumlparameter.h b/src/uml/qumlparameter.h
index 3644660a..9f8dd46d 100644
--- a/src/uml/qumlparameter.h
+++ b/src/uml/qumlparameter.h
@@ -43,8 +43,9 @@
#include <QtUml/QtUmlGlobal>
-#include <QtCore/QObject>
-#include "private/umlparameter_p.h"
+#include <QtUml/QUmlMultiplicityElement>
+#include <QtUml/QUmlConnectableElement>
+
#include <QtUml/QtUmlNamespace>
@@ -54,182 +55,48 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtUml)
-class QUmlComment;
-class QUmlConnectableElementTemplateParameter;
-class QUmlConnectorEnd;
-class QUmlDependency;
-class QUmlElement;
-class QUmlMultiplicityElement;
-class QUmlNamedElement;
-class QUmlNamespace;
class QUmlOperation;
-class QUmlPackage;
-class QUmlParameterableElement;
class QUmlParameterSet;
-class QUmlStringExpression;
-class QUmlTemplateParameter;
-class QUmlType;
class QUmlValueSpecification;
-class Q_UML_EXPORT QUmlParameter : public QObject, public UmlParameter
+class Q_UML_EXPORT QUmlParameter : public QUmlMultiplicityElement, public QUmlConnectableElement
{
- 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 [MultiplicityElement]
- Q_PROPERTY(bool isOrdered READ isOrdered)
- Q_PROPERTY(bool isUnique READ isUnique)
- Q_PROPERTY(int lower READ lower)
- Q_PROPERTY(QUmlValueSpecification * lowerValue READ lowerValue)
- Q_PROPERTY(int upper READ upper)
- Q_PROPERTY(QUmlValueSpecification * upperValue READ upperValue)
-
- // 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 [TypedElement]
- Q_PROPERTY(QUmlType * type READ type)
-
- // Properties [ParameterableElement]
- Q_PROPERTY(QUmlTemplateParameter * owningTemplateParameter READ owningTemplateParameter)
-
- // Properties [ConnectableElement]
- Q_PROPERTY(QList<QUmlConnectorEnd *> end READ end)
- Q_PROPERTY(QUmlConnectableElementTemplateParameter * templateParameter READ templateParameter)
-
- // Properties [Parameter]
- Q_PROPERTY(QString default_ READ default_)
- Q_PROPERTY(QUmlValueSpecification * defaultValue READ defaultValue)
- Q_PROPERTY(QtUml::ParameterDirectionKind direction READ direction)
- Q_PROPERTY(QtUml::ParameterEffectKind effect READ effect)
- Q_PROPERTY(bool isException READ isException)
- Q_PROPERTY(bool isStream READ isStream)
- Q_PROPERTY(QUmlOperation * operation READ operation)
- Q_PROPERTY(QSet<QUmlParameterSet *> parameterSet READ parameterSet)
-
public:
- Q_INVOKABLE explicit QUmlParameter(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 [MultiplicityElement]
- Q_INVOKABLE bool isOrdered() const;
- Q_INVOKABLE bool isUnique() const;
- Q_INVOKABLE int lower() const;
- Q_INVOKABLE QUmlValueSpecification *lowerValue() const;
- Q_INVOKABLE int upper() const;
- Q_INVOKABLE QUmlValueSpecification *upperValue() 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 [TypedElement]
- Q_INVOKABLE QUmlType *type() const;
-
- // Owned attributes [ParameterableElement]
- Q_INVOKABLE QUmlTemplateParameter *owningTemplateParameter() const;
-
- // Owned attributes [ConnectableElement]
- Q_INVOKABLE const QList<QUmlConnectorEnd *> end() const;
- Q_INVOKABLE QUmlConnectableElementTemplateParameter *templateParameter() const;
-
- // Owned attributes [Parameter]
- Q_INVOKABLE QString default_() const;
- Q_INVOKABLE QUmlValueSpecification *defaultValue() const;
- Q_INVOKABLE QtUml::ParameterDirectionKind direction() const;
- Q_INVOKABLE QtUml::ParameterEffectKind effect() const;
- Q_INVOKABLE bool isException() const;
- Q_INVOKABLE bool isStream() const;
- Q_INVOKABLE QUmlOperation *operation() const;
- Q_INVOKABLE const QSet<QUmlParameterSet *> parameterSet() const;
-
- // Operations [Element]
- Q_INVOKABLE QSet<QUmlElement *> allOwnedElements() const;
- Q_INVOKABLE bool mustBeOwned() const;
-
- // Operations [MultiplicityElement]
- Q_INVOKABLE bool compatibleWith(QUmlMultiplicityElement *other) const;
- Q_INVOKABLE bool includesCardinality(int C) const;
- Q_INVOKABLE bool includesMultiplicity(QUmlMultiplicityElement *M) const;
- Q_INVOKABLE bool is(int lowerbound, int upperbound) const;
- Q_INVOKABLE bool isMultivalued() const;
- Q_INVOKABLE int lowerBound() const;
- Q_INVOKABLE int upperBound() const;
-
- // Operations [NamedElement]
- Q_INVOKABLE QList<QUmlNamespace *> allNamespaces() const;
- Q_INVOKABLE QSet<QUmlPackage *> allOwningPackages() const;
- Q_INVOKABLE bool isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) const;
- Q_INVOKABLE QString separator() const;
-
- // Operations [ParameterableElement]
- Q_INVOKABLE bool isCompatibleWith(QUmlParameterableElement *p) const;
- Q_INVOKABLE bool isTemplateParameter() const;
-
-public Q_SLOTS:
-
- // Slots for owned attributes [Element]
- void addOwnedComment(UmlComment *ownedComment);
- void removeOwnedComment(UmlComment *ownedComment);
-
- // Slots for owned attributes [MultiplicityElement]
- void setOrdered(bool isOrdered);
- void setUnique(bool isUnique);
- void setLower(int lower);
- void setLowerValue(QUmlValueSpecification *lowerValue);
- void setUpper(int upper);
- void setUpperValue(QUmlValueSpecification *upperValue);
-
- // 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 [TypedElement]
- void setType(QUmlType *type);
-
- // Slots for owned attributes [ParameterableElement]
- void setOwningTemplateParameter(QUmlTemplateParameter *owningTemplateParameter);
-
- // Slots for owned attributes [ConnectableElement]
- void setTemplateParameter(QUmlConnectableElementTemplateParameter *templateParameter);
-
- // Slots for owned attributes [Parameter]
+ explicit QUmlParameter(bool createQObject = true);
+ virtual ~QUmlParameter();
+
+ // Owned attributes
+ QString default_() const;
void setDefault(QString default_);
+ QUmlValueSpecification *defaultValue() const;
void setDefaultValue(QUmlValueSpecification *defaultValue);
+ QtUml::ParameterDirectionKind direction() const;
void setDirection(QtUml::ParameterDirectionKind direction);
+ QtUml::ParameterEffectKind effect() const;
void setEffect(QtUml::ParameterEffectKind effect);
+ bool isException() const;
void setException(bool isException);
+ bool isStream() const;
void setStream(bool isStream);
+ QUmlOperation *operation() const;
void setOperation(QUmlOperation *operation);
- void addParameterSet(UmlParameterSet *parameterSet);
- void removeParameterSet(UmlParameterSet *parameterSet);
+ const QSet<QUmlParameterSet *> parameterSet() const;
+ void addParameterSet(QUmlParameterSet *parameterSet);
+ void removeParameterSet(QUmlParameterSet *parameterSet);
+
+protected:
+ QUmlValueSpecification *_defaultValue;
+ QtUml::ParameterDirectionKind _direction;
+ QtUml::ParameterEffectKind _effect;
+ bool _isException;
+ bool _isStream;
+ QUmlOperation *_operation;
+ QSet<QUmlParameterSet *> _parameterSet;
};
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QUmlParameter *)
-Q_DECLARE_METATYPE(QList<QUmlParameter *> *)
-Q_DECLARE_METATYPE(QSet<QUmlParameter *> *)
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlParameter) *)
QT_END_HEADER