4
4
<Class name =" UMLExplorer.ClassView" >
5
5
<Description >
6
6
Class contains methods that return structured class data.</Description >
7
- <TimeChanged >63668,773.59952 </TimeChanged >
7
+ <TimeChanged >63668,60898.691763 </TimeChanged >
8
8
<TimeCreated >63653,67019.989197</TimeCreated >
9
9
10
10
<Method name =" getClassTree" >
11
+ <Description >
12
+ Returns structured class tree with all classes available in current namespace</Description >
11
13
<ClassMethod >1</ClassMethod >
12
14
<ReturnType >%ZEN.proxyObject</ReturnType >
13
15
<Implementation ><![CDATA[
@@ -47,8 +49,10 @@ Class contains methods that return structured class data.</Description>
47
49
</Method >
48
50
49
51
<Method name =" getClassData" >
52
+ <Description >
53
+ return structured data about class</Description >
50
54
<ClassMethod >1</ClassMethod >
51
- <FormalSpec >classDefinition:%Dictionary.ClassDefinition</FormalSpec >
55
+ <FormalSpec >oData:%ZEN.proxyObject, classDefinition:%Dictionary.ClassDefinition</FormalSpec >
52
56
<ReturnType >%ZEN.proxyObject</ReturnType >
53
57
<Implementation ><![CDATA[
54
58
set oClass = ##class(%ZEN.proxyObject).%New()
@@ -59,29 +63,34 @@ Class contains methods that return structured class data.</Description>
59
63
set count = classDefinition.Properties.Count()
60
64
for i = 1:1:count {
61
65
set oProp = ##class(%ZEN.proxyObject).%New()
62
- do oProperties.%DispatchSetProperty(classDefinition.Properties.GetAt(i).Name, oProp)
63
- do oProp.%DispatchSetProperty("private", classDefinition.Properties.GetAt(i).Private)
64
- do oProp.%DispatchSetProperty("readOnly", classDefinition.Properties.GetAt(i).ReadOnly)
65
- do oProp.%DispatchSetProperty("type", classDefinition.Properties.GetAt(i).Type)
66
+ set p = classDefinition.Properties.GetAt(i)
67
+ do oProperties.%DispatchSetProperty(p.Name, oProp)
68
+ do oProp.%DispatchSetProperty("private", p.Private)
69
+ do oProp.%DispatchSetProperty("readOnly", p.ReadOnly)
70
+ do oProp.%DispatchSetProperty("type", p.Type)
71
+ do ..collectAggregation(oData, classDefinition.Name, p.Type)
66
72
}
67
73
68
74
set oMethods = ##class(%ZEN.proxyObject).%New()
69
75
set oClass.methods = oMethods
70
76
set count = classDefinition.Methods.Count()
71
77
for i = 1:1:count {
72
78
set oMeth = ##class(%ZEN.proxyObject).%New()
73
- do oMethods.%DispatchSetProperty(classDefinition.Methods.GetAt(i).Name, oMeth)
74
- do oMeth.%DispatchSetProperty("private", classDefinition.Methods.GetAt(i).Private)
75
- do oMeth.%DispatchSetProperty("returns", classDefinition.Methods.GetAt(i).ReturnType)
79
+ set met = classDefinition.Methods.GetAt(i)
80
+ do oMethods.%DispatchSetProperty(met.Name, oMeth)
81
+ do oMeth.%DispatchSetProperty("private", met.Private)
82
+ do oMeth.%DispatchSetProperty("returns", met.ReturnType)
83
+ do oMeth.%DispatchSetProperty("classMethod", met.ClassMethod)
76
84
}
77
85
78
86
set oParameters = ##class(%ZEN.proxyObject).%New()
79
87
set oClass.parameters = oParameters
80
88
set count = classDefinition.Parameters.Count()
81
89
for i = 1:1:count {
82
90
set oPar = ##class(%ZEN.proxyObject).%New()
83
- do oParameters.%DispatchSetProperty(classDefinition.Parameters.GetAt(i).Name, oPar)
84
- do oPar.%DispatchSetProperty("type", classDefinition.Parameters.GetAt(i).Type)
91
+ set p = classDefinition.Parameters.GetAt(i)
92
+ do oParameters.%DispatchSetProperty(p.Name, oPar)
93
+ do oPar.%DispatchSetProperty("type", p.Type)
85
94
}
86
95
87
96
quit oClass
@@ -99,6 +108,7 @@ Class contains methods that return structured class data.</Description>
99
108
"%DataType": "%Library.DataType",
100
109
"%Status": "%Library.Status",
101
110
"%CacheString": "%Library.CacheString",
111
+ "%Persistent": "%Library.Persistent",
102
112
:typeName)
103
113
]]> </Implementation >
104
114
</Method >
@@ -119,7 +129,7 @@ Class contains methods that return structured class data.</Description>
119
129
if (oData.classes.%DispatchGetProperty(className) = "") {
120
130
set cdef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
121
131
if (cdef '= "") {
122
- do oData.classes.%DispatchSetProperty(className, ..getClassData(cdef))
132
+ do oData.classes.%DispatchSetProperty(className, ..getClassData(oData, cdef))
123
133
do ..collectInheritance(oData, cdef)
124
134
}
125
135
}
@@ -128,6 +138,39 @@ Class contains methods that return structured class data.</Description>
128
138
]]> </Implementation >
129
139
</Method >
130
140
141
+ <Method name =" collectAggregation" >
142
+ <ClassMethod >1</ClassMethod >
143
+ <FormalSpec >oData:%ZEN.proxyObject,className:%String,type:%String</FormalSpec >
144
+ <ReturnType >%Status</ReturnType >
145
+ <Implementation ><![CDATA[
146
+ set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(type)
147
+ if (classDef '= "") {
148
+ set oAgg = oData.aggregation.%DispatchGetProperty(className)
149
+ if (oAgg = "") {
150
+ set oAgg = ##class(%ZEN.proxyObject).%New()
151
+ do oData.aggregation.%DispatchSetProperty(className, oAgg)
152
+ }
153
+ } else { quit $$$OK }
154
+
155
+ do oAgg.%DispatchSetProperty(type, "1..1")
156
+ do ..collectClass(oData, classDef)
157
+
158
+ quit $$$OK
159
+ ]]> </Implementation >
160
+ </Method >
161
+
162
+ <Method name =" collectClass" >
163
+ <ClassMethod >1</ClassMethod >
164
+ <FormalSpec >oData:%ZEN.proxyObject,cdef:%Dictionary.ClassDefinition</FormalSpec >
165
+ <ReturnType >%Status</ReturnType >
166
+ <Implementation ><![CDATA[
167
+ if (oData.classes.%DispatchGetProperty(cdef.Name) '= "") { quit $$$OK }
168
+ do oData.classes.%DispatchSetProperty(cdef.Name, "IDLE")
169
+ do oData.classes.%DispatchSetProperty(cdef.Name, ..getClassData(oData, cdef))
170
+ do ..collectInheritance(oData, cdef)
171
+ ]]> </Implementation >
172
+ </Method >
173
+
131
174
<Method name =" getClassView" >
132
175
<ClassMethod >1</ClassMethod >
133
176
<FormalSpec >baseClassDefinition:%Dictionary.ClassDefinition</FormalSpec >
@@ -136,9 +179,8 @@ Class contains methods that return structured class data.</Description>
136
179
set oData = ##class(%ZEN.proxyObject).%New()
137
180
set oData.classes = ##class(%ZEN.proxyObject).%New()
138
181
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
139
- do oData.classes.%DispatchSetProperty(baseClassDefinition.Name, ..getClassData(baseClassDefinition))
140
-
141
- do ..collectInheritance(oData, baseClassDefinition)
182
+ set oData.aggregation = ##class(%ZEN.proxyObject).%New()
183
+ do ..collectClass(oData, baseClassDefinition)
142
184
143
185
quit oData
144
186
]]> </Implementation >
@@ -152,6 +194,7 @@ Class contains methods that return structured class data.</Description>
152
194
set oData = ##class(%ZEN.proxyObject).%New()
153
195
set oData.classes = ##class(%ZEN.proxyObject).%New()
154
196
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
197
+ set oData.aggregation = ##class(%ZEN.proxyObject).%New()
155
198
156
199
set classes = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
157
200
do classes.Execute()
@@ -161,7 +204,7 @@ Class contains methods that return structured class data.</Description>
161
204
set packageName = $LISTTOSTRING($LIST($LISTFROMSTRING(className, "."), 1, listLen), ".")
162
205
if (packageName = rootPackageName) {
163
206
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
164
- do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(classDef))
207
+ do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(oData, classDef))
165
208
do ..collectInheritance(oData, classDef)
166
209
}
167
210
}
@@ -172,7 +215,7 @@ Class contains methods that return structured class data.</Description>
172
215
</Class >
173
216
174
217
175
- <Project name =" UMLExplorer" LastModified =" 2015-04-25 15:46:50.605954 " >
218
+ <Project name =" UMLExplorer" LastModified =" 2015-04-26 00:42:57.542208 " >
176
219
<Items >
177
220
<ProjectItem name =" UMLExplorer.ClassView" type =" CLS" />
178
221
<ProjectItem name =" UMLExplorer.Router" type =" CLS" />
0 commit comments