PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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