Basic code generation concepts Class Code Structure This section describes the structure of the generated code, including information on how the model maps to code and how you can control model mapping. In addition to the model elements, the generated source code includes annotations and, if instrumented, instrumentation macros. Note Annotations map code constructs to design constructs. They play an important role in tracing between the two. Do not touch or remove annotations. If you do, you hinder tracing between the model and the code. Annotations are comment lines starting with two slashes and a pound sign ( //# for C and C++) or two dashes and a plus sign ( --+ for Ada).
Instrumentation macros become hooks and utility functions to serve the animation/trace framework. They are implemented as macros to minimize the impact on the source code. If you remove instrumentation macros, animation cannot work correctly. The code structures shown are generic, using generic names such as class and state. Your code will contain the actual names. Class Header File The class header file contains the following sections:
Љ Prolog Љ Forward declarations Љ Instrumentation Љ Virtual and private inheritance Љ User-defined attributes and operations Љ Variable-length argument lists Љ Relation information Љ Statechart implementation Љ Events interface Љ Serialization instrumentation Љ State classes 932 User Guide