Bundt Scripting Reference
·
Bundt Scripting Language version 1.0.1.0
create attribute
statement
Creates a new attribute and puts it in context.
The class owning the new attribute is also put in context.
Syntax
create attribute Name:
Cardinality [^] (BaseType | enum EnumType)
[( AspectList )]
[of Owner]
Element |
Type |
Optionality |
Notes |
Name |
Expression<Identifier> or Expression<Dictionary<Identifier>> |
Mandatory. |
Specifies the name of the new attribute, either as an identifier or in multilingual dictionary format. |
Cardinality |
Cardinality |
Mandatory. |
Specifies the cardinality of the new attribute. |
^ |
|
Optional. If omitted, the new attribute is not made sorted. |
Specifies whether the new attribute must be sorted. |
BaseType |
Base type name |
Optional. If this is specified, then EnumType cannot be specified. |
Specifies the base type for the new attribute. |
EnumType |
Enumerated type name |
Optional. If this is specified, then BaseType cannot be specified. |
Specifies the enumerated type for the new attribute. |
AspectList |
Marker list |
Optional. |
Specifies the aspects used by the new attribute. Accepted markers are S for subjective, K for constant, T for temporal, and L for multilingual. |
Owner |
Class name |
Optional. If no owner is specified, the class in context is used. If no class is in context, an error occurs. |
Specifies the class that will own the new attribute. |
Returns
The attribute just created.
Examples
Intent |
Code |
Create a new attribute with a simple name in the context class |
create attribute Description: 0..1 Text; |
Create a new attribute with a multilingual name in the context class |
create attribute [en_GB: Description, es_ES: DescripciĆ³n]: 0..1 Text; |
Create a new attribute in an explicit class |
create attribute Description: 0..1 Text of Building; |
Create a new multilingual and subjective attribute |
create attribute Description: 0..1 Text (S, L) of Building; |
Create a new enumerated sorted temporal attribute |
create attribute Style: 0..*^ enum ArchitecturalStyles (T) of Building; |
See Also
Contents distributed under a Creative Commons Attribution 4.0 International License
·
About
·
Terms of Use
·
Contact Us
·
last updated on 08 October 2020