Book a Demo

Author Topic: Transforming Object Instance to the class  (Read 1970 times)

castorek

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Transforming Object Instance to the class
« on: April 11, 2009, 12:59:33 am »
Hallo.
After searching the solution for my problem everywhere except this forum I have decided to rise the question here:
The goal is to generate the objects code definition that contains valid values for the given class attributes. Imagine that we have a :
classA
 - enum_definition1 m_attribute1;
- enum_definition2 m_attribute2;
endClass
Then, we create an instances of such classA with correct values in the m_attribute1 and m_attribute2 fields (I'm doing this by Context menu->Advanced->Set Run State...). The appriopriate values are shown on the instance picture. We can't directly generate code out of the Object instance, so first we have to use the Transformation mechanism to transform the object instance to the e.g. object. The problem is that the transformation is not copying the values that I have specified with the context menu (they are not the Attribute type). Can someone help me (or point me) to define the tranformation rule for having the copying mechanism of such "strange type" object members?
Ciao