Computer Science 2574
Intro to Data Structures & Soft Eng

Amulet Integration

When integrating a complex code library, (like Amulet) into an existing system The communication between the two should be minimized to localize the dependencies. The image below depicts one possible integration design to achieve this goal:


A driver module should be created to act as an abstract layer between the Amulet interface code callback functions and the existing system code. The only communication that should occur between the Amulet code and the driver functions is through C++ string objects. (Amulet provides mechanisms for converting from Am_String <=> string objects and vice-versa. ) The driver module header file should contain only function prototypes, nothing else should exist in the header file. This will eliminate Amulet needing to know about any existing system structures or dependencies. The driver functions will call existing code modules and pass back any information that needs to be displayed in the interface by Amulet as string objects. The Amulet module should include no existing code header files, (except for driver.h). The main() function in the Amulet module will setup the Amulet interface, call any initialization driver functions that are needed and start the event loop function. After which, all communication between Amulet and the existing code will occur through the driver functions which are executed by calls in the interface callback functions.


D. Barnette 4/26/99 Virginia Tech © 1995-1999