A Class describes a group of objects that have common properties and behavior.
A Class is the underlying Modeler Automation Interface object for Class, Data Type, Interface and Signal items in Modeler:
• A Data Type is a Class object that has its Is Structure attribute set to TRUE.
• An Interface is a Class object that has its Is Interface and Is Abstract attributes set to TRUE.
• A Signal is a Class object that has its Is Signal attribute set to TRUE.
Note that although a Class object is used to model Class, Data Type, Interface and Signal model items, only Class items are linked to the Dictionary and Package objects through the Class association. Data types, Interfaces and Signals are linked to the Dictionary and Package objects through the UML Data Type, UML Interface and UML Signal associations respectively.
A relationship with dictionary items of type Association.
The following example demonstrates how to create an Association between two Classes.
'create the two classes Set objSourceClass = Dictionary.Add("Class", "Class A") Set objTargetClass = Dictionary.Add("Class", "Class B") 'create a new association between this class and the other Set Association1 = Dictionary.Add("Association", "Associates") Association1("Navigation") = "start-end" Association1("Aggregate") = "None" 'create a role for this end and attach this class Set StartRole = Dictionary.Add("Role", "start") StartRole("Association End") = "start" StartRole.Add "Class", objSourceClass StartRole.Add "Association", Association1 StartRole("Multiplicity") = "0+" 'create the role object for the other end Set EndRole = Dictionary.Add("Role", "end") EndRole("Association End") = "end" EndRole.Add "Class", objTargetClass EndRole.Add "Association", Association1 EndRole("Multiplicity") = "1" Multiplicity is 0+, access is read-only.
A collection of dictionary items of type Attribute.
Multiplicity is 0+, access is read/write.
Best Part Equivalent
When used with the Item, ItemEx or Items function, returns the Part that is the nearest equivalent part to the item that is specified as the index for the function. Note that virtual redefinitions inherit their properties from real redefinitions.
A collection of Receptions that are owned by the Class object (Class or Interface item).
Multiplicity is 0+, access is read/write.
Part
A collection of Parts (Attributes and Roles) that are contained by the Class object.
You must use the AddDirected function to add a Part through this association.
Multiplicity is 0+, access is read/write.
Part Equivalent
When used with the Item, ItemEx or Items function, returns the Part redefinition (if there is one) for the Part specified as the index for the function.
When used with the AddDirected function, creates a Part redefinition of the Part specified as the index for the function.