next up previous top
Next: RoutineDef
Up: Player Type
Previous: ReadNext

RoutineCall

Semantics

The player type RoutineCall corresponds to an imported function or procedure (i.e., a routine). An imported routine is actually realized as a call to a function or procedure definition that is located in (i.e., exported by) another component. The routine call has a name and a signature. The name refers to the name of the function or procedure as it appears in the definition in the exporting component, and the signature describes the expectations that the importing component has regarding the types of the arguments and the type of the return value of the routine (the RoutineDef player in the exporting component specifies the actual signature). RoutineCall players make calls to RoutineDef players within the boundary of a single process.

A RoutineCall player does not describe a call to a function or service located in a remote process. It does describe a call to a function or procedure within a single process.

Component Types In

A player of type RoutineCall can legally be defined in components of the following types:

Role Type
Associations

A player of type RoutineCall can legally be associated with the following role types in connections of the specified type:

Properties

The following properties can be legally included in the property list of a RoutineCall player:

The syntax for the MaxAssocs property in a RoutineCall player is a single <integer> surrounded by parentheses:

MAXASSOCS (1)
The syntax for the MinAssocs property in a RoutineCall player is a single <integer> surrounded by parentheses:

MINASSOCS (1)
The syntax for the Signature property in a RoutineCall player consists of two fields, separated by a semicolon, surrounded by parentheses. Each of the fields is optional, yet one of them must be specified. The first field is a list of items that are either <identifier>s or "string"s. The second field is a single <identifier> or "string". If the first field is omitted, the semicolon is required. If the second field is omitted, the semicolon must not be present:

SIGNATURE (int, "char *", double; "void")
SIGNATURE (int, "char *", double)
SIGNATURE (; "void")

Implementation Considerations

In the source code implementation, a RoutineCall player is implemented as a normal procedure or function call, in the syntax of the given programming language (in this case C). For example, the following are function calls in C (in boldface type) that implement
RoutineCall players:

/* assume the function returns an integer result, and the variable is of type integer */
an_integer = a_function_call (parameter1, parameter2);
/* the result of the function call below is discarded, making it look like a procedure call */ a_C_procedure_call (parameter1, parameter2);

next up previous top
Next: RoutineDef
Up: Player Type
Previous: ReadNext

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996