Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsDerived feature in OCL
https://www.eclipse.org/forums/index.php/mv/msg/197090/628478/#msg_628478
How would one define a derived feature in OCL, please? There is a nice presentation showing operation bodies and invariant constraints in OCL, they are then directly generated into code.
How can I do the same for derived features?
Let's assume there is a class
class A {
+ /a: B [*] {union}
+ /b: B [*] {subsets a}
}
I have tried to:
- define getB(): B[*] method, but the genmodel wizard has complained (applying EReference stereotype and setting transient and volatile to true didn't help)
- define a badicGetB(): B[*], but there were two such method generated (one from a model, one to be implemented by me)
Thank you for any help,
Karel]]>Karel Smutny2010-05-31T13:28:38-00:00