Language-specific issues in roundtripping
There are a number of language-specific aspects in the roundtripping feature.
The following points apply to roundtripping of C++ code.
- You can perform an Advanced (Full) roundtrip for language types in Rhapsody® Developer for C++.
- There is support of #includes and forward declarations.
- Roundtripping can convert auto-generated operations
to user operations on modifying in code through either of the following
methods:
- By setting the
CG::CGGeneral::GeneratedCodeInBrowser
property toChecked
.
This works for all auto-generated operations that are shown in the browser except constructors and destructors. - If the
CG::CGGeneral::GeneratedCodeInBrowser
property is not used because there are no auto-generated operations in the browser, then you can remove the//##auto_generated
annotation of the operation so that user operations will be added to the model.
- By setting the
- Roundtripping takes into account code changes made for all user-defined types.
- If you change the order of elements, the code-preserving option preserves the
order of the following elements for the next code generation:
- Global elements
- Class elements
#includes
and forward declarations- Auto-generated operations (excluding statechart and instrumentation code)
- Position of
<<friend>>
dependency is preserved by roundtripping in code preserving mode. - You can roundtrip C++ templates.
Roundtripping for Java
The following details apply to roundtripping in Java only.
- Advanced (Full) roundtrip is supported for Java.
- You can add "import" statement in the code, which creates a dependency in the model.
- There is JDK 1.5 support for generics, enumerations, and type-safe containers.