Operation mapping for Visual Basic (Visual Basic code)
ACS can generate the following class, structure, interface or module members from an Operation:
Functions - optionally apply the «VB Operation» stereotype to the Operation.
Event Handlers - apply the «VB EvHdlr» stereotype to the Operation and optionally apply the «VB Operation» to the Operation.
Events - apply the «VB Operation» stereotype to the Operation and set the VB Event property to True.
Operator Redefinitions - apply the «VB Operation» stereotype to the Operation and set the VB Operator property to True.
If the «VB DontGenerate» stereotype is applied to an Operation, ACS ignores that Operation.
ACS generates the child items, properties and tagged values of an Operation as follows.
Child items:
If the Operation owns Parameters, ACS generates the parameters in the order specified in Modeler. For Parameter mapping information, click here Parameter mapping for Visual Basic (Visual Basic code).
Properties:
Abstract property - when set to True (Abstract check box selected on Property Pages), ACS generates a MustOverride modifier for the class, structure, interface or module member.
Binding property - when set to At Runtime, ACS generates the Overridable, Overrides or MustOveride modifier for the class, structure, interface or module member:
If the owning Class, Data Type or Interface does not inherit an Operation that has the same signature, or does inherit an Operation that has the same signature and its Binding set to At Compile, ACS generates the Overridable modifier for the class, structure, interface or module member.
If the owning Class, Data Type or Interface inherits an Operation that has the same signature and its Binding set to At Runtime, ACS generates the Overrides modifier for the class, structure, interface or module member.
If the Operation has its Abstract property set to True, ACS generates the MustOverride modifier for the class, structure, interface or module member.
Body property - if a value is set, ACS generates that value as the body of the associated class, structure, interface or module member (except for events).
If reverse engineering is enabled in ACS, you can change the body code in the code file and ACS will update the Body property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
Data Usage property - when set to On Instance, ACS generates the shared modifier for the class, structure, interface or module member.
Description property - if a value is set, ACS generates that value on the line before the code generated for the class, structure, interface or module member. For information about how comments are generated, see Generation of code comments (Visual Basic code).
Immutable property - this property is ignored.
Name property - ACS generates the value as the identifier of the class, structure, interface or module member when appropriate.
* 
ACS may modify the Operation name that is added to the code to make it valid for Visual Basic. You can specify the exact Operation name to add to the code through the CODE_GENERATION_NAME property of an Operation. See Modification of item names when inserted into Visual Basic (Visual Basic code)
Return Type property - ACS generates the type for the class, structure, interface or module member when appropriate.
Timing properties - these properties (Synchronization and Duration) are ignored.
Visibility property - this property can be set to Public, Private, Protected or Package:
If the Visibility is set to Public, Protected, Private or Package, ACS generates the class, structure, interface or module member with either a public, protected or private modifier if appropriate (Package is generated as Public).
If the tagged value of the VB Access tag definition is set, ACS ignores the Visibility property and generates the value as the access of the class, structure, interface or module member.
Tag Definitions:
You can apply the «VB Operation» and «VB EvHdlr» stereotypes to an Operation.
The «VB Operation» stereotype applies the following Tag Definitions to an Operation:
VB Access - if a value is set, ACS ignores the Visibility property and generates the value as the access of the class, structure, interface or module member.
VB Attributes - if a value is set, ACS generates that value as .NET attributes of the class, structure, interface or module member. The .NET attributes should take the form of <AtrClass(OptInitList)>.
VB Event - when set to True, ACS generates an event from the Operation.
VB Implements - if a value is set, ACS generates an implements clause for the function, event or operator.
VB Modifiers - if a value is set, ACS generates that value as modifiers for the class, structure, interface or module member.
VB Operator - when set to True, ACS generates an operator. If you generate an Operation as an operator, ensure that the parameters and properties are appropriate for an operator.
When the «VB EvHdlr» stereotype is applied to an Operation, ACS generates an event handler. The «VB EvHdlr» stereotype applies the following Tag Definitions to an Operation:
VB EvHandles - if a value is set, ACS generates that value as the content of the event handler's handles clause.
VB EvHdlrArgs - if a value is set, ACS generates that value as the event handler's argument list.
VB EvPrefix - if a value is set, ACS generates that value as a prefix for the event handler's identifier.
Was this helpful?