|
Re: interdependent attributes b/w classes [message #556752 is a reply to message #556685] |
Thu, 02 September 2010 14:05 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Santhosh,
You should model the relationships (the references from ClassA to Class
B and vice versa) from which the information is derived. Modeling the
derived attribute itself is mostly a convenience and will require you to
write the derivation code...
Santhosh Injineri wrote:
> Hello Friends,
>
> I am new to EMF and I am using Ecore model to generate the code ... Mz
> requirement is i have 2 classes classA and classB.
>
> Attributes in ClassA is -> nameA:EString , typeA:EString
> Attribute in ClassB is -> nameB:EString , typeB:nameA
>
> I want Attribute typeB in ClassB should depend on value held by Attr
> nameA.
>
> For Example1:
>
> nameA=Pressure , typeA:Int
>
> nameB=HighPressure, typeB=Pressure
>
> Example2:
>
> nameA=Switch, typeA:ON,OFF
>
> nameB=TwoWaySwitch, typeB=Switch
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03733 seconds