The source for a member function connection must be either an
event or an attribute with an associated event. Connect to a
member function as follows:
- Open the connection menu for the source part.
- From this menu, select the event. If the event you want
is not on the Preferred Features list, select the
feature from the All Features menu.
- Move the mouse pointer to an empty point on the free-form
surface and click mouse button 1. Doing this
indicates that you want to connect the event to the
composite part rather than to one of its embedded parts.
The
Composition Editor displays the Member Function
Connection window.
- Type the signature of the existing member function in the
entry field. Be sure to type the full declaration of the
member function, including return type.
- If the member function takes input parameters and you
want to specify them as constants, select the Set
parameters push button.
- Select OK.
The connection window disappears and
VisualAge draws a green connection arrow from the source
part toward the edge of the free-form surface. If the
connection arrow is dashed, you must supply values for
the input parameters of the member function.
- Before you generate the code for your part, you must
switch to the Class Editor and enter the names of the
files containing the member function code so that
VisualAge includes them in your part code.
- You must create an .hpv file that contains a declaration
for this member function and a .cpv file that contains
the code for this member function. The member function
declaration that you enter in this field must be identical
to the declaration in the .hpv file.
Member Function
Connections
Supplying a Parameter Value
Using a Constant
Connecting Features to Custom
Logic
Connecting from Connection Results
Opening Connection Settings
Member Function
Connection - Settings Window