Initializing links within packages

An initRelations() operation is generated for packages to initialize the links between the objects in a package. The name of the link initialization operation has the format <package>_initRelations().

For example, if the Default package has an object A of implicit type and an object C of type B, and A has a directional link to type B, a Default_initRelations() operation is generated in the implementation file for the Default package to initialize the link between A and C, the only object of type B:

static void Default_initRelations() {
    A_Init(&A);
    B_Init(&C);
}

This operation calls the initialization operations for A and C, which in turn initialize the links to the respective objects.


Feedback