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
Right-click Notify in
the
browser to display a menu.
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.
Type the
code in the Implementation area
in this example.
Click OK to
save
the code.
To display the Notify
operation in the class,
right-click the SDM class in the diagram and select Display
Options.
Select
the Operations tab.
In the All Elements list, highlight
the notify() item and click Display to put
it into the Shown in Diagram column.
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
Right-click CreateRefFile in
the
browser.
Select Features and
then the Implementation tab
in the Features window.
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.