00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 ::REQUIRES 'fsobjects.cls'
00049
00050 ::REQUIRES 'nodes.cls'
00051
00052 ::REQUIRES 'htmlutil.cls'
00053
00054
00055
00056 ::CLASS htmlrexxclass PUBLIC
00057 ::ATTRIBUTE htmlout CLASS
00058
00059
00060
00061
00062 ::METHOD emit CLASS
00063 use arg htmlout, rdc
00064 self~htmlout = htmlout
00065
00066 tp = .head_html~new~text
00067 tp~queue('<title>'rdc~rexxname'</title>')
00068 tp~queue(.nodes~prodssheet)
00069 tp~queue('<link rel="stylesheet" href="tabs.css">')
00070
00071 tp~queue('</head>')
00072 tp~queue('<body>')
00073
00074
00075 .htmlutil~tabshead(tp, htmlout~topmenu, 'petclasses')
00076
00077 clause = rdc~document~featureclause(rdc~feature)
00078 src = rdc~document~getsource(clause)[1]
00079
00080 tp~queue('<h2><span class="keywordflow">'rdc~smallicon||self~dirxref(rdc, src)'</span></h2>')
00081
00082 blocko = self~htmlout~noprefix(rdc~document~getprevblock(rdc~feature))
00083 do i over blocko~text
00084 tp~queue(.classfinder~classnames(rdc~document, i)'<br/>')
00085 end
00086
00087 if rdc~document~requires~items > 0
00088 then do
00089 tp~queue('<h3>Requires</h3>')
00090 do i over rdc~document~requires
00091 comq = rdc~document~getanycomment(i)
00092 comment = ''
00093 if comq~text~items > 0
00094 then comment = .classfinder~classnames(rdc~document, comq~text[1])
00095
00096 tp~queue(i~rname comment'<br/>')
00097 end
00098 end
00099
00100 tp~queue('<span class="paramname">Definition at line ')
00101 tp~queue('<a class="el" href="'rdc~document~hsrcurl'#'rdc~hsrcanchor'">'rdc~startline'</a> of')
00102 tp~queue('<a class="el" href="'rdc~document~hsrcurl'">'rdc~document~relpath'</a></span><br/>')
00103
00104
00105
00106 self~featsumms(rdc, '', tp)
00107
00108
00109 self~getinheritance(rdc, tp)
00110
00111 if rdc~exposedvars~items > 0
00112 then do
00113 tp~queue('<h3>Exposed variables</h3>')
00114 do r over rdc~exposedvars
00115 mq = rdc~exposedvars[r]
00116 self~exposesumm(mq, rdc, r, tp)
00117 end
00118 end
00119
00120 if rdc~instrefs~items > 0
00121 then do
00122 tp~queue('<h3>Instantiated by</h3>')
00123 do r over rdc~instrefs
00124 tp~queue('<a href = "'r~rdatom~document~hsrcurl'#'r~rdatom~hsrcanchor'">',
00125 r~rdatom~document~filename'</a> line' r~rdatom~feature~startline'<br/>')
00126 end
00127 end
00128
00129 if rdc~subclassedby~items > 0
00130 then do
00131 tp~queue('<h3>Subclassed by</h3>')
00132 do r over rdc~subclassedby
00133 tp~queue('<a href="'r~hdocurl'">'r~feature~rname'</a> <br/>')
00134 end
00135 end
00136
00137 if rdc~inheritedby~items > 0
00138 then do
00139 tp~queue('<h3>Inherited by</h3>')
00140 do r over rdc~inheritedby
00141 tp~queue('<a href="'r~hdocurl'">'r~feature~rname'</a> <br/>')
00142 end
00143 end
00144
00145 if rdc~mixedinby~items > 0
00146 then do
00147 tp~queue('<h3>Mixed in by</h3>')
00148 do r over rdc~mixedinby
00149 tp~queue('<a href="'r~hdocurl'">'r~feature~rname'</a> <br/>')
00150 end
00151 end
00152
00153 tp~queue('<h3>Feature Detail</h3>')
00154
00155 do m over rdc~methods
00156
00157 if m~type = 'LABL'
00158 then iterate
00159
00160 clause = m~document~featureclause(m~feature)
00161 src = m~document~getsource(clause)[1]
00162
00163 tp~queue('<p><a name='m~hdocanchor'></a></p>')
00164 tp~queue('<div class="memitem">')
00165 tp~queue('<div class="memproto">')
00166 tp~queue('<table class="memname"><tbody><tr><td class="memname">')
00167 tp~queue('<span class="keywordflow">'m~smallicon src'</span>')
00168 tp~queue('</td></tr></tbody></table>')
00169 tp~queue('</div>')
00170
00171 bc = rdc~document~getanycomment(m~feature)
00172 do t over bc~text
00173 tp~queue(.classfinder~classnames(m~document, t)'</br>')
00174 end
00175
00176 if m~type = 'METH'
00177 then do
00178
00179 .htmlutil~callableexpand(self~htmlout, m, bc, tp)
00180 end
00181
00182 tp~queue('<div class="paramname">Definition at line')
00183 tp~queue('<a class="el" href="'rdc~document~hsrcurl'#'m~hsrcanchor'">'m~startline'</a> of')
00184 tp~queue('<a class="el" href="'rdc~document~hsrcurl'">'rdc~document~relpath'</a></div>')
00185
00186 if m~type = 'METH' | m~type = 'ATTR'
00187 then do
00188
00189 .htmlutil~referrableexpand(self~htmlout, m, tp)
00190 end
00191
00192 tp~queue('</div>')
00193 end
00194
00195 .htmlutil~trailer(self~htmlout, tp)
00196 tp~queue('</body></html>')
00197
00198
00199 towrite = self~htmlout~hdest||rdc~hdocurl
00200 .htmlutil~writepage(tp, towrite)
00201
00202
00203 ::METHOD dirxref CLASS PRIVATE
00204 use arg rdc, src
00205
00206 newsrc = ''
00207
00208 checkwords = .false
00209 do j = 1 to words(src)
00210 w = src~word(j)
00211 wt = w~translate
00212 select
00213 when wt = 'METACLASS' | wt = 'MIXINCLASS' | wt = 'SUBCLASS'
00214 then do
00215 newsrc = newsrc w
00216 j = j + 1
00217 w = src~word(j)
00218 xrdc = .classfinder~findclass(w~translate, rdc~document, rdc~document~reqfiles)
00219 if xrdc <> .nil
00220 then do
00221 newsrc = newsrc '<a href="'xrdc~hdocurl'">'w'</a>'
00222 end
00223 else newsrc = newsrc w
00224 end
00225
00226 when w~translate = 'INHERIT'
00227 then do
00228 newsrc = newsrc w
00229
00230 checkwords = .true
00231 end
00232
00233 when checkwords
00234 then do
00235 xrdc = .classfinder~findclass(w~translate, rdc~document, rdc~document~reqfiles)
00236 if xrdc <> .nil
00237 then do
00238 newsrc = newsrc '<a href="'xrdc~hdocurl'">'w'</a>'
00239 end
00240 else newsrc = newsrc w
00241 end
00242
00243 otherwise newsrc = newsrc w
00244 end
00245 end
00246
00247 return newsrc
00248
00249
00250
00251
00252 ::method getinheritance class private
00253 use arg rdc, tp
00254 if rdc~subclass <> ''
00255 then do
00256 self~getsuper(rdc~subclass, tp)
00257 end
00258
00259 if rdc~mixinclass <> ''
00260 then do
00261 self~getsuper(rdc~mixinclass, tp)
00262 end
00263
00264 mixins = rdc~inherit~space(1)~makearray(' ')
00265 do m over mixins
00266 self~getmixins(m, tp)
00267 end
00268
00269
00270
00271
00272 ::METHOD getsuper CLASS PRIVATE
00273 use arg supername, tp
00274
00275 rdc = self~htmlout~rexxliterate~globalix~classix~at(supername~translate)
00276 if rdc = .nil
00277 then do
00278 return
00279 end
00280
00281 classdoc = 'inherited from <a class="el" href="'rdc~hdocurl'">'rdc~rexxname'</a>'
00282 self~featsumms(rdc, classdoc, tp)
00283
00284 self~getinheritance(rdc, tp)
00285
00286 return
00287
00288
00289
00290
00291 ::METHOD getmixins CLASS PRIVATE
00292 use arg mixname, tp
00293
00294 rdc = self~htmlout~rexxliterate~globalix~classix~at(mixname~translate)
00295 if rdc = .nil
00296 then do
00297 return
00298 end
00299
00300 classdoc = 'mixed in from <a class="el" href="'rdc~hdocurl'">'rdc~rexxname'</a>'
00301 self~featsumms(rdc, classdoc, tp)
00302
00303 self~getinheritance(rdc, tp)
00304
00305 return
00306
00307
00308
00309
00310
00311 ::METHOD featsumms CLASS PRIVATE
00312 use arg rdc, tag, tp
00313
00314 self~featsumm(sortq(rdc~cpubmethods), rdc, 'Public Class Methods' tag, tp)
00315 self~featsumm(sortq(rdc~cpubattribs), rdc, 'Public Class Attributes' tag, tp)
00316 self~featsumm(sortq(rdc~pubmethods), rdc, 'Public Methods' tag, tp)
00317 self~featsumm(sortq(rdc~pubattribs), rdc, 'Public Attributes' tag, tp)
00318
00319 self~featsumm(sortq(rdc~cprimethods), rdc, 'Private Class Methods' tag, tp)
00320 self~featsumm(sortq(rdc~cpriattribs), rdc, 'Private Class Attributes' tag, tp)
00321 self~featsumm(sortq(rdc~primethods), rdc, 'Private Methods' tag, tp)
00322 self~featsumm(sortq(rdc~priattribs), rdc, 'Private Attributes' tag, tp)
00323
00324
00325
00326
00327
00328
00329 ::METHOD featsumm CLASS PRIVATE
00330 use arg rdfeatures, rdc, title, tp
00331
00332 if rdfeatures~items < 1
00333 then return
00334
00335 tp~queue('<table cellspacing="0" cellpadding="0" border="0">')
00336 tp~queue('<tbody>')
00337 tp~queue('<tr>')
00338 tp~queue('</td>')
00339 tp~queue('</tr>')
00340
00341 tp~queue('<tr>')
00342 tp~queue('<td colspan="2">')
00343 tp~queue('<br/><h3>'title'</h3>')
00344 tp~queue('</td>')
00345 tp~queue('</tr>')
00346
00347 do m over rdfeatures
00348
00349 bc = rdc~document~getanycomment(m~feature)
00350 if bc~text~items > 0
00351 then oneliner = .classfinder~classnames(m~document, bc~text[1])
00352 else oneliner = 'no comment'
00353
00354 if bc~returns~items > 0
00355 then returns = bc~returns[1]
00356 else returns = ' '
00357
00358 tp~queue('<tr>')
00359 tp~queue('<td class="memItemLeft" valign="top" nowrap="" align="right">')
00360 tp~queue(returns)
00361 tp~queue('</td>')
00362 tp~queue('<td class="memItemRight" valign="bottom">')
00363 tp~queue('<a class="e1" href="'rdc~hdocurl'#'m~hdocanchor'">'m~rexxname'</a>')
00364 if m~type = 'METH'
00365 then tp~queue('('self~commad(m~arglist)')')
00366 else tp~queue(' ')
00367 tp~queue('</td>')
00368 tp~queue('</tr>')
00369
00370 tp~queue('<tr>')
00371 tp~queue('<td class="mdescLeft"/>')
00372 tp~queue('<td class="mdescRight">')
00373 tp~queue(oneliner)
00374 tp~queue('</td>')
00375 tp~queue('</tr>')
00376 end
00377
00378 tp~queue('</tbody>')
00379 tp~queue('</table>')
00380
00381
00382
00383
00384
00385
00386 ::METHOD exposesumm CLASS PRIVATE
00387 use arg rdfeatures, rdc, exposedvar, tp
00388
00389 if rdfeatures~items < 1
00390 then return
00391
00392 tp~queue('<table cellspacing="0" cellpadding="0" border="0">')
00393 tp~queue('<tbody>')
00394 tp~queue('<tr>')
00395 tp~queue('<td colspan="2">')
00396 tp~queue('<span class="paramkey">'exposedvar'</span> <span class="paramname">exposed by</span>')
00397 tp~queue('</td>')
00398 tp~queue('</tr>')
00399
00400 do m over rdfeatures
00401
00402 bc = rdc~document~getanycomment(m~feature)
00403 if bc~text~items > 0
00404 then oneliner = .classfinder~classnames(m~document, bc~text[1])
00405 else oneliner = 'no comment'
00406
00407 returns = ' '
00408
00409 tp~queue('<tr>')
00410 tp~queue('<td class="memItemLeft" valign="top" nowrap="" align="right">')
00411 tp~queue(returns)
00412 tp~queue('</td>')
00413 tp~queue('<td class="memItemRight" valign="bottom">')
00414 tp~queue('<a class="e1" href="'rdc~hdocurl'#'m~hdocanchor'">'m~rexxname'</a>')
00415 if m~type = 'METH'
00416 then tp~queue('('self~commad(m~arglist)')')
00417 else tp~queue(' ')
00418 tp~queue('</td>')
00419 tp~queue('</tr>')
00420
00421 tp~queue('<tr>')
00422 tp~queue('<td class="mdescLeft"/>')
00423 tp~queue('<td class="mdescRight">')
00424 tp~queue(oneliner)
00425 tp~queue('</td>')
00426 tp~queue('</tr>')
00427 end
00428
00429 tp~queue('</tbody>')
00430 tp~queue('</table>')
00431
00432 ::METHOD commad CLASS PRIVATE
00433
00434 use arg args
00435
00436 if args~words < 2
00437 then return args
00438
00439 coms = ''
00440 do j = 1 to words(args)
00441 arg = args~word(j)
00442 if j <> words(args)
00443 then arg = arg','
00444 coms = coms arg
00445 end
00446 return coms~strip