Slide 21 of 26
Notes:
- These EXPRESS definitions are then compiled to generate C++ code, which can be used by analysis applications to access the values of the attributes (regular and idealized) of the entities defined in the APM.
- As shown in this slide, the pwb entity defined in using EXPRESS becomes the C++ class pwb, and the attributes of this entity become member variables of the class.
- The EXPRESS to C++ compilation automatically generates member functions to access and update the values of the attributes.
- In addition to the access and update member functions, each WHERE rule defines one access function for each possible combination of inputs and outputs.
- For example, from wr1 in we could generate a member function that outputs the width given the outline of the board. Likewise, from the same WHERE rule we could generate another member function to perform the opposite operation; calculate the outline of the board given the width (although, in this case, the problem must be somehow constrained in order to be able to reach a unique solution).