Debian Codegraph @

texmf-dist/metapost/metauml/metauml_class_relations.mp

raw
1 % Copyright 2005 2015 Ovidiu Gheorghies
2 % Licensed under the Apache License, Version 2.0.
3
4 if known _metauml_class_relations_mp:
5 expandafter endinput
6 fi;
7 _metauml_class_relations_mp:=1;
8
9 defaultRelationHeadWidth := 25;
10 defaultRelationHeadHeight := 10;
11
12 vardef AssociationInfo@# =
13 LinkInfo@#;
14
15 @#widthA = 0;
16 @#heightA = 0;
17 @#drawMethodA = "drawNothing";
18
19 @#widthB = 0;
20 @#heightB = 0;
21 @#drawMethodB = "drawNothing";
22
23 @#drawMethod = "drawLine";
24 enddef;
25
26 vardef AssociationUniInfo@# =
27 LinkInfo@#;
28
29 @#widthA = 0;
30 @#heightA = 0;
31 @#drawMethodA = "drawNothing";
32
33 @#widthB = defaultRelationHeadWidth;
34 @#heightB = defaultRelationHeadHeight;
35 @#drawMethodB = "drawArrow";
36
37 @#drawMethod = "drawLine";
38 enddef;
39
40 vardef InheritanceInfo@# =
41 LinkInfo@#;
42
43 @#widthA = 0;
44 @#heightA = 0;
45 @#drawMethodA = "drawNothing";
46
47 @#widthB = defaultRelationHeadWidth;
48 @#heightB = defaultRelationHeadHeight;
49 @#drawMethodB = "drawTriangle";
50
51 @#drawMethod = "drawLine";
52 enddef;
53
54 vardef AggregationInfo@# =
55 LinkInfo@#;
56
57 @#widthA = 0;
58 @#heightA = 0;
59 @#drawMethodA = "drawNothing";
60
61 @#widthB = defaultRelationHeadWidth;
62 @#heightB = defaultRelationHeadHeight;
63 @#drawMethodB = "drawDiamond";
64
65 @#drawMethod = "drawLine";
66 enddef;
67
68 vardef AggregationUniInfo@# =
69 LinkInfo@#;
70
71 @#widthA = defaultRelationHeadWidth;
72 @#heightA = defaultRelationHeadHeight;
73 @#drawMethodA = "drawArrow";
74
75 @#widthB = defaultRelationHeadWidth;
76 @#heightB = defaultRelationHeadHeight;
77 @#drawMethodB = "drawDiamond";
78
79 @#drawMethod = "drawLine";
80 enddef;
81
82 vardef CompositionInfo@# =
83 LinkInfo@#;
84
85 @#widthA = 0;
86 @#heightA = 0;
87 @#drawMethodA = "drawNothing";
88
89 @#widthB = defaultRelationHeadWidth;
90 @#heightB = defaultRelationHeadHeight;
91 @#drawMethodB = "drawDiamondBlack";
92
93 @#drawMethod = "drawLine";
94 enddef;
95
96 vardef CompositionUniInfo@# =
97 LinkInfo@#;
98
99 @#widthA = defaultRelationHeadWidth;
100 @#heightA = defaultRelationHeadHeight;
101 @#drawMethodA = "drawArrow";
102
103 @#widthB = defaultRelationHeadWidth;
104 @#heightB = defaultRelationHeadHeight;
105 @#drawMethodB = "drawDiamondBlack";
106
107 @#drawMethod = "drawLine";
108 enddef;
109
110 vardef DashedLinkInfo@# =
111 LinkInfo@#;
112
113 @#widthA = 0;
114 @#heightA = 0;
115 @#drawMethodA = "drawNothing";
116
117 @#widthB = 0;
118 @#heightB = 0;
119 @#drawMethodB = "drawNothing";
120
121 @#drawMethod = "drawLineDashed";
122 enddef;
123
124 vardef DependencyInfo@# =
125 LinkInfo@#;
126
127 @#widthA = 0;
128 @#heightA = 0;
129 @#drawMethodA = "drawNothing";
130
131 @#widthB = defaultRelationHeadWidth;
132 @#heightB = defaultRelationHeadHeight;
133 @#drawMethodB = "drawArrow";
134
135 @#drawMethod = "drawLineDashed";
136 enddef;
137
138 vardef RealizationInfo@# =
139 LinkInfo@#;
140
141 @#widthA = 0;
142 @#heightA = 0;
143 @#drawMethodA = "drawNothing";
144
145 @#widthB = defaultRelationHeadWidth;
146 @#heightB = defaultRelationHeadHeight;
147 @#drawMethodB = "drawTriangle";
148
149 @#drawMethod = "drawLineDashed";
150 enddef;
151
152 AssociationInfo.association;
153 AssociationUniInfo.associationUni;
154 InheritanceInfo.inheritance;
155 AggregationInfo.aggregation;
156 AggregationUniInfo.aggregationUni;
157 CompositionInfo.composition;
158 CompositionUniInfo.compositionUni;
159 DashedLinkInfo.dashedLink;
160 DependencyInfo.dependency;
161 RealizationInfo.realization;
162
163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164
165 % Deprecated, kept to support code using the older API.
166 % Using the generic formulation involving link, e.g.
167 % link(association)(A.n--B.s) is preferable.
168 % link and clink are defined in metauml_links
169 %
170 vardef drawRelation(text iLink)(expr myPath)=
171 link(iLink)(myPath);
172 enddef;