ibm Rational Rhapsody 7.5 — Statechart Implementation

Class Code Structure In the implementation file, A.cpp , the following initialization code is generated: #include "A.h" //------------------------------------------------- // A.cpp //------------------------------------------------- // Static class member attribute OMString A::attr3 = "Shalom"; // Static class member attribute int A::attr1 = 5; // Static class member attribute OMBoolean A::attr2 = true; A::A() { }; Variable-Length Argument Lists To add a variable-length argument list ( ... ) as the last argument of an operation, open the Properties window for the operation, and set the CG::Operation::VariableLengthArgumentList property to Checked .

For example, if the VariableLengthArgumentList property is set to Checked for an operation void testA(int i) , the following declaration generated for testA() : void testA(int i, ...); Synthesized Methods and Data Members for Relations This section of the header file includes every relation of the class defined in the model. If appropriate, it includes a data member, as well as a set of accessor and mutator functions to manipulate the relation. You can control this section by changing the relation properties and container properties. For more information about the CG properties, see Properties . For example:

OMIterator rclass1* > get relation1 ()const; void add relation1 ( rclass * p); void remove relation1 ( rclass * p); void clear relation1 (); protected : // OMCollection rclass*> relation1 ; attrType1 get attr1 ()const; void set attrType1 ( attrType1 p); Statechart Implementation Љ Change the statechart implementation strategy from reusable to flat. Љ Disable code generation for statecharts. Rational Rhapsody 935