This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
v050:language [2016/10/17 14:22] ndj94 [Ports and connectors] |
v050:language [2017/01/20 11:00] (current) gregobalu [Classes] |
||
---|---|---|---|
Line 12: | Line 12: | ||
In XtxtUML, this marking is done in a ''model-info.xtxtuml'' file of the following form: | In XtxtUML, this marking is done in a ''model-info.xtxtuml'' file of the following form: | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
model-package example.x.model as "ExampleModel"; | model-package example.x.model as "ExampleModel"; | ||
Line 41: | Line 41: | ||
==== Classes ==== | ==== Classes ==== | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
// Must be defined inside the package representing the model. | // Must be defined inside the package representing the model. | ||
Line 63: | Line 63: | ||
Additionally in //XtxtUML//, in case of an empty class definition, the curly braces can be replaced by a semicolon. That is, the following class definitions are semantically equivalent: | Additionally in //XtxtUML//, in case of an empty class definition, the curly braces can be replaced by a semicolon. That is, the following class definitions are semantically equivalent: | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
class ExampleClass {} | class ExampleClass {} | ||
</code> | </code> | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
class ExampleClass; | class ExampleClass; | ||
Line 77: | Line 77: | ||
In txtUML, the attributes of classes can only have primitive types. References to instances of model classes must be held with the use of associations. | In txtUML, the attributes of classes can only have primitive types. References to instances of model classes must be held with the use of associations. | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
class ExampleClass { | class ExampleClass { | ||
Line 97: | Line 97: | ||
=== Operations === | === Operations === | ||
- | <code> | + | <code xtxtuml> |
// XtxtUML: | // XtxtUML: | ||
class ExampleClass { | class ExampleClass { |