Implementing the SDM operations

About this task

The basic structure of the SDM system is drawn in the Object Model Diagram, and the system operations need to be implemented.

Adding the code - Part 1

About this task

When the evNotify event is generated, the SDM needs to receive the event and call the Notify operation. To call the operation, add the implementation code to the Notify operation with these steps:

Procedure

  1. Right-click Notify in the browser to display a menu.
  2. Select the Features option and then the Implementation tab in the Features dialog box. The item selected in the browser forms the title bar of the window.
  3. Type the code in the Implementation area in this example.
  4. Click OK to save the code.
  5. To display the Notify operation in the class, right-click the SDM class in the diagram and select Display Options.
  6. Select the Operations tab.
  7. In the All Elements list, highlight the notify() item and click Display to put it into the Shown in Diagram column.
  8. Click OK. The diagram now resembles the following example:

Adding the code - Part 2

About this task

To add the implementation code for CreateRefFile:

Procedure

  1. Right-click CreateRefFile in the browser.
  2. Select Features and then the Implementation tab in the Features window.
  3. Type the code in the Implementation area. To speed up this step, you might want to copy this code from the SDM_Observers project in the Samples directory.
  4. Click OK.

Feedback