Question & Answer
Question
Using parameters such as enum or struct during animation will result in their values not appearing in the animated sequence diagrams. The animator only understands the types defined in the rawtypes.h in Rhapsody\Share\Lang\oxf. So how do we get the enum values like {blue, green, yellow} instead of 0,1,2
Answer
Using parameters such as enum or struct during animation will result in their values not appearing in the animated sequence diagrams. The animator only understands the types defined in the rawtypes.h in Rhapsody\Share\Lang\oxf
To display values such as enum {blue, yellow, red} during animation (as opposed to 0,1,2) use the interpreter functions <lang>_CG::Type::AnimSerializeOperation and <lang>_CG::Type::AnimUnserializeOperation
See the Rhapsody -> Help -> Help Topics -> Using Rhapsody -> Animation -> Guidelines for Writing Serialization Functions
Example, the attribute ‘words’ is of an enum type in the tester class is an event reception that takes an enum parameter called tDay
The serialize function converts the values to a textual string, whilst the unserialize reverses this:
Thus upon animation the string appears:
The values should now be displayed in the animated sequence diagram
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21397691