/branches/version1.x/templates/sunny/class.tmpl

http://jsdoc-toolkit.googlecode.com/ · Go Template · 417 lines · 382 code · 35 blank · 0 comment · 0 complexity · c4c8ec3f6b56b73bd816f334c52c091b MD5 · raw file

  1. {!
  2. function byName(a, b) {
  3. if (a.name != undefined && b.name != undefined) {
  4. a = a.name.toLowerCase();
  5. b = b.name.toLowerCase();
  6. if (a < b) return -1;
  7. if (a > b) return 1;
  8. return 0;
  9. }
  10. }
  11. function summarize(desc) {
  12. if (typeof desc != "undefined")
  13. return desc.match(/([\w\W]+?\.)[^a-z0-9]/i)? RegExp.$1 : desc;
  14. }
  15. thisClass = data[0];
  16. if (thisClass.methods) thisClass.methods.sort(byName);
  17. if (thisClass.properties) thisClass.properties.sort(byName);
  18. if (thisClass.events) thisClass.events.sort(byName);
  19. !}
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  21. "http://www.w3.org/TR/html4/loose.dtd">
  22. <html>
  23. <head>
  24. <meta http-equiv="content-type" content="text/html; charset={+(JsDoc.opt.e||'utf-8')+}">
  25. <title>JsDoc: {+thisClass.alias+}</title>
  26. <style type="text/css">
  27. body { background-color: #FFFFFF; }
  28. .TableHeadingColor { background: #CCCCFF; }
  29. .TableSubHeadingColor { background: #EEEEFF; }
  30. .TableRowColor { background: #FFFFFF; }
  31. .FrameTitleFont
  32. {
  33. font-size: 10pts;
  34. font-family: Helvetica, Arial, san-serif;
  35. }
  36. .FrameHeadingFont
  37. {
  38. font-size: 10pts;
  39. font-family: Helvetica, Arial, san-serif;
  40. }
  41. .FrameItemFont
  42. {
  43. font-size: 10pts;
  44. font-family: Helvetica, Arial, san-serif;
  45. }
  46. .NavBar
  47. {
  48. font-family: Arial, Helvetica, sans-serif;
  49. background-color: #FFFFFF;
  50. }
  51. .jsdoc_ctime
  52. {
  53. font-family: Arial, Helvetica, sans-serif;
  54. font-size: 9pt;
  55. text-align: right;
  56. }
  57. .optional
  58. {
  59. font-variant: normal;
  60. color: #AAAFD1;
  61. font-size: 75%;
  62. font-style: italic;
  63. vertical-align: super;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <table style="width: 100%">
  69. <tr>
  70. <td class="NavBar" valign="top"><font size="-2">SUMMARY:&nbsp;<a href="#field_summary">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;<a href="#method_summary">METHOD</a></font></td>
  71. <td class="NavBar" valign="top"><font size="-2">DETAIL:&nbsp;<a href="#field_detail">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;<a href="#method_detail">METHOD</a></font></td>
  72. </tr>
  73. </table>
  74. <hr>
  75. <h2><if test="thisClass.isStatic">Static </if>Class {+thisClass.alias+}</h2>
  76. <if test="thisClass.augments && thisClass.augments.length">
  77. Extends<for each="augment" in="thisClass.augments"> <a href="{+augment+}.html">{+augment+}</a></for>.<br/>
  78. </if>
  79. <if test="thisClass.source"><i>Defined in <a href="{+thisClass.source+}">{+thisClass.filename+}</a></i></if>
  80. <if test="thisClass.deprecated"><br/><b>Deprecated {+thisClass.deprecated.desc+}</b><br/></if>
  81. <if test="thisClass.classDesc"><p>{+thisClass.classDesc+}</p></if>
  82. <if test="thisClass.doc">
  83. <for each="author" in="thisClass.doc.getTag('author')">
  84. <b>Author:</b> {+author+}<br/>
  85. </for>
  86. <for each="version" in="thisClass.doc.getTag('version')">
  87. <b>Version:</b> {+version+}<br/>
  88. </for>
  89. </if>
  90. <hr>
  91. <!-- =========== FIELD SUMMARY =========== -->
  92. <if test="thisClass.properties.length">
  93. <a name="field_summary"> </a>
  94. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  95. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  96. <td colspan=2>
  97. <font size="+2"> <b>Field Summary</b></font>
  98. </td>
  99. </tr>
  100. <for each="property" in="thisClass.properties">
  101. <tr bgcolor="white" class="TableRowColor">
  102. <td align="right" valign="top" width="1%">
  103. <font size="-1"><code><if test="property.isPrivate">&lt;private&gt;&nbsp;</if><if test="property.isStatic||!property.memberof">&lt;static&gt;&nbsp;</if>{+(property.type||"object")+}</code></font>
  104. </td>
  105. <td>
  106. <code><b><a href="#{+property.name+}">{+property.name+}</a></b></code>
  107. <br>
  108. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{+summarize(property.desc)+}
  109. </td>
  110. </tr>
  111. </for>
  112. </table>
  113. &nbsp;
  114. </if>
  115. <!-- =========== END FIELD SUMMARY =========== -->
  116. <if test="!thisClass.isStatic">
  117. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  118. <a name="constructor_summary"> </a>
  119. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  120. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  121. <td colspan=2><font size="+2"><b>Constructor Summary</b></font></td>
  122. </tr>
  123. <for each="cn" in="data">
  124. <tr bgcolor="white" class="TableRowColor">
  125. <td>
  126. <code>
  127. <b><a href="#{+cn.name+}">{+cn.alias+}</a></b>({+cn.signature()+})
  128. </code>
  129. <br>
  130. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  131. {+summarize(cn.desc)+}
  132. </td>
  133. </tr>
  134. </for>
  135. </table>
  136. &nbsp;
  137. <!-- ======== END CONSTRUCTOR SUMMARY ======== -->
  138. </if>
  139. <!-- ========== METHOD SUMMARY =========== -->
  140. <if test="thisClass.methods.length">
  141. <a name="method_summary"> </a>
  142. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  143. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  144. <td colspan=2>
  145. <font size="+2"> <b>Method Summary</b></font>
  146. </td>
  147. </tr>
  148. <for each="method" in="thisClass.methods">
  149. <tr bgcolor="white" class="TableRowColor">
  150. <td align="right" valign="top" width="1%">
  151. <font size="-1"><code><if test="method.isPrivate">&lt;private&gt;&nbsp;</if><if test="method.isStatic||!method.memberof">&lt;static&gt; </if><if test="method.returns.length">
  152. <for each="ret" in="method.returns">&nbsp;{+ret.type+}</for>
  153. </if></code></font>
  154. </td>
  155. <td>
  156. <code> <b> <a href="#{+method.name+}">{+method.name+}</a></b>({+method.signature()+}) </code>
  157. <br>
  158. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {+summarize(method.desc)+}
  159. </td>
  160. </tr>
  161. </for>
  162. </table>
  163. &nbsp;
  164. </if>
  165. <!-- ========== EVENT SUMMARY =========== -->
  166. <if test="thisClass.events">
  167. <if test="thisClass.events.length">
  168. <a name="event_summary"> </a>
  169. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  170. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  171. <td colspan=2>
  172. <font size="+2"> <b>Event Summary</b></font>
  173. </td>
  174. </tr>
  175. <for each="event" in="thisClass.events">
  176. <tr bgcolor="white" class="TableRowColor">
  177. <td align="right" valign="top" width="1%">
  178. <font size="-1"><code><if test="event.isPrivate">&lt;private&gt;&nbsp;</if>
  179. <if test="event.returns.length">
  180. <for each="ret" in="event.returns">&nbsp;{+ret.type+}</for>
  181. </if>
  182. <if test="event.returns.length==0">
  183. void
  184. </if></code></font>
  185. </td>
  186. <td>
  187. <code> <b> <a href="#{+event.name+}">{+event.name+}</a></b>({+event.signature()+}) </code>
  188. <br>
  189. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {+summarize(event.desc)+}
  190. </td>
  191. </tr>
  192. </for>
  193. </table>
  194. &nbsp;
  195. </if>
  196. </if>
  197. <!-- ========== INHERITED METHODS SUMMARY =========== -->
  198. <if test="thisClass.inherited">
  199. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  200. <for each="className" in="keys(thisClass.inherited)">
  201. <tr bgcolor="#EEEEFF" class="TableSubHeadingColor">
  202. <td>
  203. <b>Methods inherited from class <a href="{+className+}.html">{+className+}</a></b>
  204. </td>
  205. </tr>
  206. <for each="method" in="thisClass.inherited[className]">
  207. <tr bgcolor="#EEEEFF" class="TableSubHeadingColor">
  208. <td>
  209. <a href="{+method.memberof+}.html#{+method.name+}">{+method.name+}</a>({+method.signature()+})
  210. </td>
  211. </tr>
  212. </for>
  213. </for>
  214. </table>
  215. <br/>
  216. </if>
  217. <br/>
  218. <!-- ========== END INHERITED METHODS SUMMARY =========== -->
  219. <!-- ============ FIELD DETAIL START ========= -->
  220. <if test="thisClass.properties.length">
  221. <a name="field_detail"> </a>
  222. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  223. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  224. <td colspan=1>
  225. <font size="+2"> <b>Field Detail</b></font>
  226. </td>
  227. </tr>
  228. </table>
  229. <for each="property" in="thisClass.properties">
  230. <!-- One single method detail entry -->
  231. <a name="{+property.name+}">
  232. <!-- -->
  233. </a> <h3>{+property.name+}</h3>
  234. <pre><if test="property.isPrivate">&lt;private&gt;&nbsp;</if><if test="property.isStatic||!property.memberof">&lt;static&gt;&nbsp;</if>{+linkToType(property.type||"object")+} <b>{+property.name+}</b></pre>
  235. <ul>
  236. <if test="property.deprecated"><br/><b>Deprecated {+property.deprecated.desc+}</b><br/></if>
  237. {+property.desc+}
  238. <if test="property.doc">
  239. <for each="since" in="property.doc.getTag('since')">
  240. <br><b>Since:</b> {+since+}<br/>
  241. </for>
  242. </if>
  243. </ul>
  244. <hr>
  245. </for>
  246. </if>
  247. <!-- ============ FIELD DETAIL END ========== -->
  248. <if test="!thisClass.isStatic">
  249. <!-- ========= CONSTRUCTOR DETAIL START ======== -->
  250. <a name="constructor_detail"> </a>
  251. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  252. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  253. <td colspan=1>
  254. <font size="+2"><b>Constructor Detail</b></font>
  255. </td>
  256. </tr>
  257. </table>
  258. <a name="{+thisClass.name+}"> </a>
  259. <h3>{+thisClass.alias+}</h3>
  260. <for each="cn" in="data">
  261. <pre><b>{+cn.alias+}</b>({+cn.signature()+})</pre>
  262. <ul>
  263. <if test="cn.deprecated"><br/><b>Deprecated {+cn.deprecated.desc+}</b><br/></if>
  264. {+cn.desc+}
  265. </ul>
  266. <!-- PARAMETERS START -->
  267. <if test="cn.params.length">
  268. <ul>
  269. <b>Parameters:</b>
  270. <for each="param" in="cn.params">
  271. <ul>
  272. <code><if test="param.type"><i>{+linkToType(param.type)+}</i>&nbsp;</if>{+param.name+}</code><if test="param.isOptional"><a title="optional parameter" class="optional">?</a></if>
  273. <if test="param.defaultValue != ''"><span class="optional">= {+param.defaultValue+}</span></if><if test="param.desc"> - {+param.desc+}</if>
  274. </ul>
  275. </for>
  276. </ul>
  277. </if>
  278. <!-- PARAMETERS END -->
  279. </for>
  280. <hr/>
  281. <!-- END ADDITIONAL ATTRIBUTES -->
  282. <!-- ========= CONSTRUCTOR DETAIL END ======== -->
  283. </if>
  284. <!-- ============ METHOD DETAIL START ======= -->
  285. <if test="thisClass.methods.length">
  286. <a name="method_detail"> </a>
  287. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  288. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  289. <td colspan=1>
  290. <font size="+2"> <b>Method Detail</b></font>
  291. </td>
  292. </tr>
  293. </table>
  294. <for each="method" in="thisClass.methods">
  295. <a name="{+method.name+}"> </a> <h3>{+method.name+}</h3>
  296. <pre><if test="method.isPrivate">&lt;private&gt;&nbsp;</if><if test="method.isStatic||!method.memberof">&lt;static&gt;&nbsp;</if><if test="method.returns.length"><for each="ret" in="method.returns">{+linkToType(ret.type)+}&nbsp;</for></if><b>{+method.name+}</b>({+method.signature()+})</pre>
  297. <ul>
  298. <if test="method.deprecated"><br/><b>Deprecated {+method.deprecated.desc+}</b><br/></if>
  299. {+method.desc+}
  300. <for each="since" in="method.doc.getTag('since')">
  301. <br><b>Since:</b> {+since+}<br/>
  302. </for>
  303. </ul>
  304. <!-- METHOD PARAMETERS START -->
  305. <if test="method.params.length"><ul>
  306. <b>Parameters:</b><for each="param" in="method.params">
  307. <ul>
  308. <code><if test="param.type"><i>{+linkToType(param.type)+}</i>&nbsp;</if>{+param.name+}</code><if test="param.isOptional"><a title="optional parameter" class="optional">?</a></if>
  309. <if test="param.defaultValue != ''"><span class="optional">= {+param.defaultValue+}</span></if><if test="param.desc"> - {+param.desc+}</if>
  310. </ul></for>
  311. </ul></if>
  312. <!-- METHOD PARAMETERS END -->
  313. <!-- ADDITIONAL ATTRIBUTES START -->
  314. <if test="method.returns.length"><ul>
  315. <b>Returns:</b><for each="ret" in="method.returns">
  316. <ul>
  317. <code><if test="ret.type"><i>{+linkToType(ret.type)+}</i>&nbsp;</if></code>{+ret.desc+}
  318. </ul></for>
  319. </ul></if>
  320. <if test="method.exceptions.length"><ul>
  321. <b>Throws:</b><for each="ex" in="method.exceptions">
  322. <ul>
  323. <code>{+linkToType(ex.type)+}</code> {+ex.desc+}
  324. </ul></for>
  325. </ul></if>
  326. <!-- ADDITIONAL ATTRIBUTES END -->
  327. <hr>
  328. </for>
  329. </if>
  330. <!-- ============ METHOD DETAIL END ========== -->
  331. <!-- ============ EVENT DETAIL START ======= -->
  332. <if test="thisClass.events">
  333. <if test="thisClass.events.length">
  334. <a name="method_detail"> </a>
  335. <table border="1" cellpadding="3" cellspacing="0" width="100%">
  336. <tr bgcolor="#CCCCFF" class="TableHeadingColor">
  337. <td colspan=1>
  338. <font size="+2"> <b>Event Detail</b></font>
  339. </td>
  340. </tr>
  341. </table>
  342. <for each="event" in="thisClass.events">
  343. <a name="{+event.name+}"> </a> <h3>{+event.name+}</h3>
  344. <pre><if test="event.isPrivate">&lt;private&gt;&nbsp;</if><if test="event.isStatic||!event.memberof">&lt;static&gt;&nbsp;</if><if test="event.returns.length"><for each="ret" in="event.returns">{+linkToType(ret.type)+}&nbsp;</for></if><b>{+event.name+}</b>({+event.signature()+})</pre>
  345. <ul>
  346. <if test="event.deprecated"><br/><b>Deprecated {+event.deprecated.desc+}</b><br/></if>
  347. {+event.desc+}
  348. <for each="since" in="event.doc.getTag('since')">
  349. <br><b>Since:</b> {+since+}<br/>
  350. </for>
  351. </ul>
  352. <!-- EVENT PARAMETERS START -->
  353. <if test="event.params.length"><ul>
  354. <b>Parameters:</b><for each="param" in="event.params">
  355. <ul>
  356. <code><if test="param.type"><i>{+linkToType(param.type)+}</i>&nbsp;</if>{+param.name+}</code><if test="param.isOptional"><a title="optional parameter" class="optional">?</a></if>
  357. <if test="param.defaultValue != ''"><span class="optional">= {+param.defaultValue+}</span></if><if test="param.desc"> - {+param.desc+}</if>
  358. </ul></for>
  359. </ul></if>
  360. <!-- EVENT PARAMETERS END -->
  361. <!-- ADDITIONAL ATTRIBUTES START -->
  362. <if test="event.returns.length"><ul>
  363. <b>Returns:</b><for each="ret" in="event.returns">
  364. <ul>
  365. <code><if test="ret.type"><i>{+linkToType(ret.type)+}</i>&nbsp;</if></code>{+ret.desc+}
  366. </ul></for>
  367. </ul></if>
  368. <if test="event.exceptions.length"><ul>
  369. <b>Throws:</b><for each="ex" in="event.exceptions">
  370. <ul>
  371. <code>{+linkToType(ex.type)+}</code> {+ex.desc+}
  372. </ul></for>
  373. </ul></if>
  374. <!-- ADDITIONAL ATTRIBUTES END -->
  375. <hr>
  376. </for>
  377. </if>
  378. </if>
  379. <!-- ============ EVENT DETAIL END ========== -->
  380. <div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoctoolkit.org/" target="_parent">JsDoc Toolkit</a> {+JsDoc.VERSION+} on {+new Date()+}</div>
  381. </body>
  382. </html>