diff options
Diffstat (limited to 'src/uml/qumlstate.h')
-rw-r--r-- | src/uml/qumlstate.h | 232 |
1 files changed, 54 insertions, 178 deletions
diff --git a/src/uml/qumlstate.h b/src/uml/qumlstate.h index 31ecbb62..a63313ad 100644 --- a/src/uml/qumlstate.h +++ b/src/uml/qumlstate.h @@ -43,10 +43,10 @@ #include <QtUml/QtUmlGlobal> -#include <QtCore/QObject> -#include "private/umlstate_p.h" +#include <QtUml/QUmlNamespace> +#include <QtUml/QUmlRedefinableElement> +#include <QtUml/QUmlVertex> -#include <QtUml/QtUmlNamespace> QT_BEGIN_HEADER @@ -56,200 +56,76 @@ QT_MODULE(QtUml) class QUmlBehavior; class QUmlClassifier; -class QUmlComment; class QUmlConnectionPointReference; class QUmlConstraint; -class QUmlDependency; -class QUmlElement; -class QUmlElementImport; -class QUmlNamedElement; -class QUmlNamespace; -class QUmlPackage; -class QUmlPackageableElement; -class QUmlPackageImport; class QUmlPseudostate; -class QUmlRedefinableElement; class QUmlRegion; class QUmlStateMachine; -class QUmlStringExpression; -class QUmlTransition; class QUmlTrigger; -class Q_UML_EXPORT QUmlState : public QObject, public UmlState +class Q_UML_EXPORT QUmlState : public QUmlNamespace, public QUmlRedefinableElement, public QUmlVertex { - 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) - - // Properties [Vertex] - Q_PROPERTY(QUmlRegion * container READ container) - Q_PROPERTY(QSet<QUmlTransition *> incoming READ incoming) - Q_PROPERTY(QSet<QUmlTransition *> outgoing READ outgoing) - - // Properties [State] - Q_PROPERTY(QSet<QUmlConnectionPointReference *> connection READ connection) - Q_PROPERTY(QSet<QUmlPseudostate *> connectionPoint READ connectionPoint) - Q_PROPERTY(QSet<QUmlTrigger *> deferrableTrigger READ deferrableTrigger) - Q_PROPERTY(QUmlBehavior * doActivity READ doActivity) - Q_PROPERTY(QUmlBehavior * entry READ entry) - Q_PROPERTY(QUmlBehavior * exit READ exit) - Q_PROPERTY(bool isComposite READ isComposite) - Q_PROPERTY(bool isOrthogonal READ isOrthogonal) - Q_PROPERTY(bool isSimple READ isSimple) - Q_PROPERTY(bool isSubmachineState READ isSubmachineState) - Q_PROPERTY(QUmlState * redefinedState READ redefinedState) - Q_PROPERTY(QUmlClassifier * redefinitionContext READ redefinitionContext) - Q_PROPERTY(QSet<QUmlRegion *> region READ region) - Q_PROPERTY(QUmlConstraint * stateInvariant READ stateInvariant) - Q_PROPERTY(QUmlStateMachine * submachine READ submachine) - public: - Q_INVOKABLE explicit QUmlState(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; - - // Owned attributes [Vertex] - Q_INVOKABLE QUmlRegion *container() const; - Q_INVOKABLE const QSet<QUmlTransition *> incoming() const; - Q_INVOKABLE const QSet<QUmlTransition *> outgoing() const; - - // Owned attributes [State] - Q_INVOKABLE const QSet<QUmlConnectionPointReference *> connection() const; - Q_INVOKABLE const QSet<QUmlPseudostate *> connectionPoint() const; - Q_INVOKABLE const QSet<QUmlTrigger *> deferrableTrigger() const; - Q_INVOKABLE QUmlBehavior *doActivity() const; - Q_INVOKABLE QUmlBehavior *entry() const; - Q_INVOKABLE QUmlBehavior *exit() const; - Q_INVOKABLE bool isComposite() const; - Q_INVOKABLE bool isOrthogonal() const; - Q_INVOKABLE bool isSimple() const; - Q_INVOKABLE bool isSubmachineState() const; - Q_INVOKABLE QUmlState *redefinedState() const; - Q_INVOKABLE QUmlClassifier *redefinitionContext() const; - Q_INVOKABLE const QSet<QUmlRegion *> region() const; - Q_INVOKABLE QUmlConstraint *stateInvariant() const; - Q_INVOKABLE QUmlStateMachine *submachine() 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 bool isDistinguishableFrom(QUmlNamedElement *n, QUmlNamespace *ns) 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] - - // Operations [Vertex] - - // Operations [State] - Q_INVOKABLE QUmlStateMachine *containingStateMachine() const; - Q_INVOKABLE bool isConsistentWith(QUmlRedefinableElement *redefinee) const; - Q_INVOKABLE bool isRedefinitionContextValid(QUmlState *redefined) 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 [Vertex] - void setContainer(QUmlRegion *container); - - // Slots for owned attributes [State] - void addConnection(UmlConnectionPointReference *connection); - void removeConnection(UmlConnectionPointReference *connection); - void addConnectionPoint(UmlPseudostate *connectionPoint); - void removeConnectionPoint(UmlPseudostate *connectionPoint); - void addDeferrableTrigger(UmlTrigger *deferrableTrigger); - void removeDeferrableTrigger(UmlTrigger *deferrableTrigger); + explicit QUmlState(bool createQObject = true); + virtual ~QUmlState(); + + // Owned attributes + const QSet<QUmlConnectionPointReference *> connection() const; + void addConnection(QUmlConnectionPointReference *connection); + void removeConnection(QUmlConnectionPointReference *connection); + const QSet<QUmlPseudostate *> connectionPoint() const; + void addConnectionPoint(QUmlPseudostate *connectionPoint); + void removeConnectionPoint(QUmlPseudostate *connectionPoint); + const QSet<QUmlTrigger *> deferrableTrigger() const; + void addDeferrableTrigger(QUmlTrigger *deferrableTrigger); + void removeDeferrableTrigger(QUmlTrigger *deferrableTrigger); + QUmlBehavior *doActivity() const; void setDoActivity(QUmlBehavior *doActivity); + QUmlBehavior *entry() const; void setEntry(QUmlBehavior *entry); + QUmlBehavior *exit() const; void setExit(QUmlBehavior *exit); + bool isComposite() const; + Q_DECL_HIDDEN void setComposite(bool isComposite); + bool isOrthogonal() const; + Q_DECL_HIDDEN void setOrthogonal(bool isOrthogonal); + bool isSimple() const; + Q_DECL_HIDDEN void setSimple(bool isSimple); + bool isSubmachineState() const; + Q_DECL_HIDDEN void setSubmachineState(bool isSubmachineState); + QUmlState *redefinedState() const; void setRedefinedState(QUmlState *redefinedState); - void addRegion(UmlRegion *region); - void removeRegion(UmlRegion *region); + QUmlClassifier *redefinitionContext() const; + Q_DECL_HIDDEN void setRedefinitionContext(QUmlClassifier *redefinitionContext); + const QSet<QUmlRegion *> region() const; + void addRegion(QUmlRegion *region); + void removeRegion(QUmlRegion *region); + QUmlConstraint *stateInvariant() const; void setStateInvariant(QUmlConstraint *stateInvariant); + QUmlStateMachine *submachine() const; void setSubmachine(QUmlStateMachine *submachine); + + // Operations + QUmlStateMachine *containingStateMachine() const; + bool isConsistentWith(QUmlRedefinableElement *redefinee) const; + bool isRedefinitionContextValid(QUmlState *redefined) const; + +protected: + QSet<QUmlConnectionPointReference *> _connection; + QSet<QUmlPseudostate *> _connectionPoint; + QSet<QUmlTrigger *> _deferrableTrigger; + QUmlBehavior *_doActivity; + QUmlBehavior *_entry; + QUmlBehavior *_exit; + QUmlState *_redefinedState; + QSet<QUmlRegion *> _region; + QUmlConstraint *_stateInvariant; + QUmlStateMachine *_submachine; }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QUmlState *) -Q_DECLARE_METATYPE(QList<QUmlState *> *) -Q_DECLARE_METATYPE(QSet<QUmlState *> *) +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QUmlState) *) QT_END_HEADER |