Interface mapping for Visual Basic (Visual Basic code)
For each Interface, ACS generates an interface in the code. If the «VB Class» and «VB Unit» stereotypes are applied to the Interface and the value of the VB UnitType tag definition is set to Module, ACS generates a module.
If the «VB Unit» stereotype is not applied to the Interface, ACS generates the interface or module in its owner's namespace. If the «VB Unit» stereotype is applied to the Interface, ACS generates the interface or module in its own file.
If the «VB DontGenerate» stereotype is applied to an Interface, ACS ignores that Interface.
The interface declaration and body is derived from the items it owns, properties of the Interface, and the tagged values set for Tag Definitions applied by the «VB Class» and «VB Unit» stereotypes.
ACS generates the child items, properties and tagged values of an Interface as follows.
Child items:
If the Interface owns any Attributes, ACS generates each Attribute as a field or property. For more information about Attribute mapping, see Attribute mapping for Visual Basic (Visual Basic code).
If the Interface owns any Classes, ACS generates the Classes as nested classes.
If the Interface owns any Data Types, ACS generates the Data Types as nested structures.
If the Interface owns any Interfaces, ACS generates the Interfaces as nested interfaces.
If the Interface owns any Operations, ACS generates each Operation as a function, event handler, event or operator. For more information about Operation mapping, see Operation mapping for Visual Basic (Visual Basic code).
If the Interface owns any Roles, ACS generates the each Role as a field or property. For more information about Role mapping, see Association and role mapping for Visual Basic (Visual Basic code).
If the Interface owns any Type Definitions whose Construction is Enumeration, ACS generates each Type Definition as an enum. For more information about Type Definition mapping, see Type Definition mapping for Visual Basic (Visual Basic code).
Properties:
Description property - if a value is set, ACS generates that value on the line before the interface or module declaration. For information about how comments are generated, see Generation of code comments (Visual Basic code).
Name property - ACS generates the property as the identifier of the interface or module.
* 
ACS may modify the interface or module identifier that is added to the code to make it valid for Visual Basic. You can specify the exact identifier to use through the CODE_GENERATION_NAME property of an Interface. See Modification of item names when inserted into Visual Basic (Visual Basic code).
Template property - when set to True (Template check box selected on Property Pages), ACS generates the Modeler Interface as a Visual Basic generic type. ACS generates the Formal Template Parameters.
Visibility property - this property can be set to Public, Private, Protected or Package: ACS generates the value as the access of the interface or module (Package is generated as Public). ACS generates private and protected access only for nested Interfaces.
Tag Definitions:
You can apply the «VB Class» and «VB Unit» stereotypes to an Interface.
The «VB Class» stereotype applies the following Tag Definitions to an Interface:
VB Attributes tag definition - if a value is set, ACS generates that value as .NET attributes of the property, that is, before the access of the interface or module. The .NET attributes should take the form of <AtrClass(OptInitList)>.
VB Declare tag definition - if a value is set, ACS generates that value as the declare clauses for the interface or module.
If reverse engineering is enabled in ACS, you can change the declare clauses in the code file and ACS will update the VB Declare property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
VB Implements tag definition - if a value is set, ACS generates a colon after the name of the interface or module (or after the VB Inherits value if specified), and then generates the value after the colon. For example, you can set the value to 'Implements Mylft'.
VB Inherits tag definition - if a value is set, ACS generates a colon after the name of the interface or module, and then generates the value after the colon. For example, you can set the value to 'Inherits MyClass'.
VB Partial tag definition - when set to True, ACS generates the Partial keyword before the access of the interface or module.
VB UnitType tag definition - When the «VB Unit» stereotype is applied to the Interface and the VB UnitType tag definition is set to Module, ACS generates a module rather than an interface.
When the «VB Unit» stereotype is applied to an Interface, ACS generates the interface or module in its own file. The «VB Unit» stereotype applies the following Tag Definitions to an Interface:
VB UnitLocation tag definition - if a value is set, ACS uses the value to determine the name of the generated Visual Basic unit file and the folder in which that unit file is generated. For example:
A value of MyFile results in ACS generating a file named MyFile.vb in the ACS target folder.
A value of MySubfolder\MyFile results in ACS generating a file named MyFile.vb in a folder named MySubfolder, which ACS creates as a subfolder of the ACS target folder.
VB Imports tag definition - if a value is set, ACS generates that value as import clauses in the Visual Basic unit file.
If reverse engineering is enabled in ACS, you can change the import clauses in the code file and ACS will update the VB Imports property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
Was this helpful?