3.1.1. Changes required to your source code

To make C++ class declarations and definitions visible in LISA+ behaviors, add #include statements, referencing the C++ header files, to the includes section of the component. Everything defined in these header files is visible inside the bodies of all behaviors of the component. However, #defines defined in these headers are not visible outside of the behavior bodies and cannot affect conditional compilation of LISA+ code. Additional information on the includes section is available elsewhere in this document. See Appendix A Preprocessor.

Figure 3.1 shows an example where a C++ component, MyCPPComponent, is imported into the LISA+ code for MyComponent. The LISA+ wrapper code references the C++ header for the MyCPPComponent model in the includes section. To access the C++ object, use pointers. In Figure 3.1, a pointer, *mycomp, is used to access the reset function of the MYCPPComponent C++ component.

Figure 3.1. Relationship between LISA+ and C++ source

Copyright © 2007-2010 ARM Limited. All rights reserved.ARM DUI 0372I