Question & Answer
Question
How can you realise multiple serialization/unserialization functions to handle different types (In, Out, InOut) of 'class' arguments in IBM Rational Rhapsody for C (RiC)?
Cause
There are things you need to know to make AnimUseMultipleSerializationFunctions property for class type.
Answer
You can use the AnimUseMultipleSerializationFunctions property to instruct RiC to use multiple user-provided serializer/un-serializer for arguments of 'class' type. But to successfully serialize 'class' type, there are things you need to know to make the property work. The attached model demonstrates the proven usage of AnimUseMultipleSerializationFunctions property.
- You need to use C_CG::Type::AnimUseMultipleSerializationFunctions instead of C_CG::Class::AnimUseMultipleSerializationFunctions.
- Set CG::Type::Animate to 'False' for arguments of 'class' type (which is 'attribute_3' and 'attribute_4' in the sample model).
- Do not modify Code pattern nor Type field in order to ensure Rhapsody recognise your serializer/un-serializer.
- Ensure you define both serializer and un-serializer to make the function work.
![](/support/pages/system/files/support/swg/rattech.nsf/0/62b00197c34697ee85257f95000ccef3/Content/0.39C.gif)
![](/support/pages/system/files/support/swg/rattech.nsf/0/62b00197c34697ee85257f95000ccef3/Content/0.3148.gif)
![](/support/pages/system/files/support/swg/rattech.nsf/0/62b00197c34697ee85257f95000ccef3/Content/0.4962.gif)
![](/support/pages/system/files/support/swg/rattech.nsf/0/62b00197c34697ee85257f95000ccef3/Content/0.A0EE.gif)
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21981278