For objects of implicit type, a C structure is generated with the name of the object and the suffix "_t." A type is not defined for the object. For example, a C structure named A_t is generated in the specification file for an object A that is of implicit type. This object has one attribute named att1, which is generated as a data member of the structure, as follows:
struct A_t {
/*** User-explicit entries ***/
int att1; /*## attribute att1 */
};
The object is instantiated and memory is allocated in the specification file for the package to which the object belongs. For example, the following statements are generated in the specification file for the Default package, to which the object A belongs:
struct A_t; extern struct A_t A;
The first statement is a declaration of the structure A_t; the second is the actual definition and memory allocation for an instance A of struct A_t.
IBM® Rational® Rhapsody® automatically generates operations to handle object creation, initialization, cleanup, and destruction. These operations are analogous to what are known as constructors and destructors in C++. For example, the following operations are automatically generated for A:
Create() and Destroy() operations are not generated for singletons. See Singleton objects for more information.