Derived feature in OCL [message #536911] |
Mon, 31 May 2010 13:28 |
Karel Smutny Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hello all,
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
|
|
|
Powered by
FUDForum. Page generated in 0.02917 seconds