Implementing Templates
Template Support
There is a one-to-one correspondence between the template definitions in OASIS DEXlib and the entity definitions in the AP239E2_ARM_ASD_DEX_1_3_EXTENSION_lf.exp long form schema. This means that there is one entity definition corresponding to each template definition.
The template extension entities in the long form schema have only forward references to other extension entities and/or to pure PLCS entities. They are layered on top of the PLCS entities. This means that all template extension instances in a population can be stripped off (without hampering the pure PLCS instances) before exporting the population to a pure PLCS P21 file.
Implementation Examples
Implementation of the representing_part template is used as an example. The intention is that you can develop or understand the template functions, if you follow this example as a guideline.
Template Layers
Templates are layered on top of each other with the pure PLCS entities at the bottom. The template functions are layered in exactly the same way. The sketch underneath depicts the layers of the representing_part template definition.
The following three Express-G diagrams depict the representing_part template down to the lowest level of detail.
Figure 1. representing_part – Diagram 1
Figure 2. representing_part – Diagram 2
Figure 3. representing_part – Diagram 3
這是否有幫助?