Tutorial: Building an Rogue Wave Server Application > Using Dynamic Modeling Services > Defining Member Functions
 
Defining Member Functions
Let us suppose we want to implement a display method in the Network class. Later, you will give this member function an Rogue Wave Views Script implementation (see Define Implementation of the display Method). At this stage, however, you must declare this method in the Network model so that it can be declared to the server model interpreter and be accessed both by script functions and by dynamic views.
To declare the display method in the Network model, do the following:
1. Open the class inspector of the Network class and select the Methods tab.
2. Use the right mouse button to insert a new method named display.
3. Double-click on the new method to open the Method Specification inspector.
4. Select Boolean as the return type for this method, as Rogue Wave® Server callbacks are always supposed to return a value when called from components.
Method Specification Inspector
You have now finished to define your server object model. It is time to save the file. In this exercise, you can save the file to the dynserver demonstration directory.
5. Save the file as net.mdl to the dynserver/data directory.
The next part of this tutorial consists in defining the behavior of the Network application.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.