[MOFScript] How to express: if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) { ... } [message #607068] |
Thu, 30 August 2007 17:58 |
Ondrej Rohlik Messages: 13 Registered: July 2009 |
Junior Member |
|
|
Hello!
I am trying to query my UML model to find out whether a pseudostate in a
state machine is a deepHistory, shallowHistory, choice, or intial.
In UML metamodel there is PseudostateKind enumeration which contains
(among others) values deepHistory, shallowHistory, choice, or intial.
In UML metamodel there is a Pseudostate that has a "kind" of type
PseudostateKind.
Is there a way in MOFScript to write a condition like the one below?
uml.Region::getHistoryState() : uml.Pseudostate {
var pseudostate : uml.Pseudostate = self.getPseudostateFromRegion()
if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) {
stdout.println("Muhaha! The deepHistory found !")
result = pseudostate
}
}
The line in question is the third one.
Any hints welcome. Thanks you in advance.
Best regards,
Ondrej
|
|
|
Powered by
FUDForum. Page generated in 0.02754 seconds