Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Domain classes are the main elements of the ___domain model. You can use ___domain classes to represent any kind of entity in your ___domain-specific language. These include states, use cases, and activities.
Root Domain Class
Domain-specific languages have one root ___domain class, which is associated with the diagram. All Domain-Specific Language Tools solution templates include a root ___domain class, for example, ExampleModel in the MinimalLanguage solution template. The diagram element has its ClassRepresented property set to the root ___domain class.
Adding Domain Classes
To add a ___domain class to the ___domain model, in the Toolbox, select either Domain Class or Named Domain Class and drag it to the diagram. (The only difference between a ___domain class and a named ___domain class is that the named ___domain class includes a Name ___domain property, which is distinct from the name of the ___domain class itself.) In both cases, a ___domain class is displayed on the diagram, and also in the DSL Explorer under Domain Classes.
You can add ___domain properties to the ___domain class by right-clicking the ___domain class on the diagram, pointing to Add, and then clicking Domain Property. You can also right-click the ___domain class in the DSL Explorer and then click Add New DomainProperty.
You must define the relationship of the ___domain class to the root ___domain class. All the ___domain classes in the ___domain model must be embedded in (in other words, contained by) the root ___domain class, either directly or indirectly. For more information about embedding relationships, see Defining Domain Relationships.
If you want to delete a ___domain class, right-click the ___domain class on the diagram or in the DSL Explorer and then click Delete. You can also select the ___domain class and then press DELETE.
Inheritance
The relationship between a base class and a derived class is an inheritance relationship. Inheritance relationships do not have names, roles, or multiplicities. To add an inheritance relationship between two classes, select the Inheritance tool in the Toolbox and then draw a line from the derived class to the base class. The relationship will appear on the diagram as a straight line that has a hollow arrow on the end that is nearer the base class.
In the following illustration, the abstract ___domain class UseCaseElement has a derived class Actor.
For more information about inheritance, see Inheritance.
Properties of Domain Classes
The ___domain class has properties such as Access Modifier (public or internal) and Inheritance Modifier (abstract, sealed, or none). For more information about ___domain class properties, see Properties of Domain Classes.
Presentation of Domain Classes
You can define the appearance of a ___domain class by adding a geometry shape to the diagram and then mapping the ___domain class to the shape. To map a shape to a ___domain class, drag the shape from the Toolbox to the diagram, and then select Diagram Element Map in the Toolbox and draw a line from the ___domain class to the shape. For more information about how to map elements to shapes, see Defining the Appearance of the Generated Language Designer.
See Also
Other Resources
Domain-Specific Language Tools Glossary
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Rewrote and refactored project. |
Content bug fix. |