Attribute mapping for Visual Basic (Visual Basic code)
ACS generates Class, Data Type and Interface scoped Attributes as fields or properties of the class, structure, interface or module that is generated for the owning item:
If the «VB Property» stereotype is not applied to the Attribute, ACS generates a field.
If the «VB Property» stereotype is applied to the Attribute, ACS generates a property.
Package scoped Attributes are ignored.
If the «VB DontGenerate» stereotype is applied to an Attribute, ACS ignores that Attribute.
ACS generates the child items, properties and tagged values of an Attribute as follows.
Child items:
An Attribute does not have any child items that are generated.
Properties:
Behavior property - this property is ignored.
Composite property - this property is ignored.
Data Typeproperty - if a value is set, ACS generates that value as the type of the field or property.
* 
If the type is a class, structure or interface, you may prefer to model the field through a Role, rather than an Attribute. For more information about Role mapping, see Association and role mapping for Visual Basic (Visual Basic code).
Default Value property - if a value is set, ACS generates that value as follows:
If the «VB Property» stereotype is not applied to the Attribute, ACS generates the value of the Default Value property as the default of the field.
If the «VB Property» stereotype is applied to the Attribute, ACS ignores the Default Value property.
Description property - if a value is set, ACS generates that description on the line before the member declaration. For information about how comments are generated, see Generation of code comments (Visual Basic code)
Multiplicityproperty - this property is ignored.
Name·property - ACS generates this property as the identifier of the field or property in the code.
* 
ACS may modify the Attribute name that is added to the code to make it valid for Visual Basic. You can specify the exact Attribute name to add to the code through the CODE_GENERATION_NAME property of an Attribute. See Modification of item names when inserted into Visual Basic (Visual Basic code)
Port property - this property is ignored.
Read Only property - when set to true (Read Only check box selected on Property Pages), ACS generates the code as follows:
If the «VB Property» stereotype is not applied to the Attribute, ACS generates the field with the Const modifier.
If the «VB Property» stereotype is applied to the Attribute, ACS ignores the Read Only property.
Storage property - when set to On Class, ACS generates the field or property with the Shared modifier.
Unique property - this property is ignored.
Visibilityproperty - this property can be set to Public, Private, Protected or Package; ACS generates the value as the access of the field or property (Package is generated as Public).
If the Visibility is set to Public, Protected, Private or Package; ACS generates the access of the field or property accordingly, unless a tagged value is specified for the VB Access tag definition.
If a value is set for the VB Access tag definition, ACS ignores the Visibility property and generates that the VB Access value as the access of the field or property.
Tag Definitions for Fields and Properties:
The «VB Attribute» stereotype is automatically applied to all Attributes. The «VB Attribute» stereotype applies the following tag definitions to an Attribute:
VB Access tag definition - if a value is set, ACS ignores the Visibility property and generates the value as the access of the field or property.
VB Attributes tag definition - if a value is set, ACS generates that value as .NET attributes of the field or property. The .NET attributes should take the form of <AtrClass(OptInitList)>.
VB CreateInstance tag definition - for fields only, specifies whether ACS generates a New keyword before the field's type:
When set to Always, ACS generates a New keyword before the field's type.
When set to Default or Never, ACS does not generate a New keyword.
VB Get tag definition - specifies whether ACS generates an accessor operation for the field or property:
When set to None, ACS does not generate an accessor operation for the field or property.
When set to Public, Protected or Private; ACS generates an accessor operation for the field or property using the specified access.
VB Set tag definition - specifies whether ACS generates a mutator operation for the field or property:
When set to None, ACS does not generate a mutator operation for the field or property.
When set to Public, Protected or Private; ACS generates a mutator operation for the field or property using the specified access.
VB Modifiers tag definition - if a value is set, ACS generates that value as modifiers for the field or property.
Tag Definitions for Properties only
For generating properties, apply the «VB Property» stereotype to the Attribute. The «VB Property» stereotype applies the following tag definitions to an Attribute:
VB Access tag definition - if a value is set, ACS ignores the Visibility property and generates the value as the access of the property. Note that this Tag Definition is also applied by the «VB Attribute» stereotype.
VB Attributes tag definition - if a value is set, ACS generates that value as .NET attributes of the property. The .NET attributes should take the form of <AtrClass(OptInitList)>. Note that this Tag Definition is also applied by the «VB Attribute» stereotype.
VB GetAccessorAttributes tag definition - if a value is set, ACS generates that value as the accessor for the Get function that is generated for the property, that is, the value is generated before the Get function and before any Get function modifiers.
VB GetAccessorBody tag definition - if a value is set, ACS generates that value as the body code of the Get function that is generated for the property.
If reverse engineering is enabled in ACS, you can change the body code in the code file and ACS will update the VB GetAccessorBody property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
VB GetAccessorModifiers tag definition - if a value is set, ACS generates that value as the modifiers for the Get function that is generated for the property, that is, the value is generated before the Get function.
VB Modifiers tag definition - if a value is set, ACS generates that value as modifiers for the field or property. Note that this Tag Definition is also applied by the «VB Attribute» stereotype.
VB PropertyAccess tag definition - specifies whether the property access is ReadOnly, WriteOnly or Full:
When set to ReadOnly, ACS generates a ReadOnly keyword before the Property keyword, and generates a Get function for the property.
When set to WriteOnly, ACS generates a WriteOnly keyword before the Property keyword, and generates a Set function for the property.
When set to Full, ACS does not generate a ReadOnly or WriteOnly keyword, and generates both Get and Set functions for the property.
VB PropertyParameters tag definition - if a value is set, ACS generates that value as property parameters after the name of the property, within parentheses.
VB SetAccessorAttributes tag definition - if a value is set, ACS generates that value as the accessor for the Set function that is generated for the property, that is, the value is generated before the Set function and before any Set function modifiers.
VB SetAccessorBody tag definition - if a value is set, ACS generates that value as the body code of the Set function that is generated for the property.
If reverse engineering is enabled in ACS, you can change the body code in the code file and ACS will update the VB SetAccessorBody property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
VB SetAccessorModifiers tag definition - if a value is set, ACS generates that value as the modifiers for the Set function that is generated for the property, that is, the value is generated before the Set function.
Was this helpful?