The Features window for a primitive operation enables you
to change the features for it, including its return values, arguments,
and modifiers.
About this task
On the General tab,
you define the general features for a primitive operation through
the various controls on the tab. Notice that the signature for the
primitive operation is displayed at the top of the General tab
of the Features window.
- In the Name field you specify
the name of the element. The default name is Message_n,
where n is an incremental integer starting with 0. To enter a detailed
description of the operation, use the Description tab.
- You use the L button to
open the Name and Label window to specify the
label for the element, if any. For information about creating labels,
see Assign descriptive labels to elements for information about creating labels.
- In the Stereotype list you
specify the stereotype of the attribute, if any. For information about
creating stereotypes, see Defining stereotypes.
- In the Visibility list you
specify the visibility of the primitive operation: Public, Protected,
or Private.
- In the Type list box you
specify the operation type. For primitive operations, this box is
set to Primitive Operation. If this is a template class, select
the Template check box. To specify the necessary
arguments for the template, use the Template Parameters tab
that displays once you select the Template check
box. For more information, see Creating a template class.
- In the Returns area you specify the return
type of a function.
- If the function will return a defined type, select
the Use existing type check box and select
the return type from the Type list box that displays once you
select the check box. Or to define a new type, delete the value in
the Type list box to enable the Invoke Feature
Dialog button
and click it to open the
Type window.
For more information about
creating types, see Creating composite types.
- If you want to use a type that is not defined,
clear the Use existing type check box. A C++[Java]
Declaration box displays. Enter the code as you want it
to appear in the return statement. To access the text editor, click
the Ellipses button
.
- In the Modifiers area you
specify the modifiers of the operation. The possible values are Virtual, Static, Inline, Constant,
or Abstract, but the available modifier types vary according
to the type of operation.