The following table lists the special annotation symbols.
| Language | Body Annotation Symbols |
|---|---|
| Ada | --+[ <ElementType> <ElementName> --+] |
| C | /*#[ <ElementType> <ElementName> */ /*#]*/ |
| C++ and Java | //#[ <ElementType> <ElementName> //#] |
For example, the following Initialize() operation for the Connection class in the PBX sample contains user code that was entered in the Implementation field of the Operation window. The user code is placed between the annotation symbols when code is generated for the class:
void Connection::Initialize() {
//#[ operation Initialize()
DigitsDialed = 0;
Digits[0] = 0;
Digits[1] = 0;
Busy = FALSE;
Extension = 0;
//#]
}
You can edit the code between the annotation symbols in a text editor and then roundtrip your changes back into the model. The roundtripped edits are retained upon the next code generation. This feature Rational Rhapsody keeps the code and the model synchronized to provide model-code associativity.