PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 0ms app.codeStats 1ms

/tags/jsdoc_toolkit-1.4.0/templates/sunny/class.tmpl

http://jsdoc-toolkit.googlecode.com/
Go Template | 412 lines | 377 code | 35 blank | 0 comment | 0 complexity | ab812244c2b817998bb45532dec90505 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		<for each="since" in="property.doc.getTag('since')">
266			<br><b>Since:</b> {+since+}<br/>
267		</for>
268	</ul>
269	<hr>
270</for>
271</if>
272<!-- ============ FIELD DETAIL END ========== -->
273
274<if test="!thisClass.isStatic">
275<!-- ========= CONSTRUCTOR DETAIL START ======== -->
276<a name="constructor_detail"> </a>
277<table border="1" cellpadding="3" cellspacing="0" width="100%">
278   <tr bgcolor="#CCCCFF" class="TableHeadingColor">
279      <td colspan=1>
280      <font size="+2"><b>Constructor Detail</b></font>
281      </td>
282   </tr>
283
284</table>
285
286<a name="{+thisClass.name+}"> </a>
287<h3>{+thisClass.alias+}</h3>
288<for each="cn" in="data">
289	<pre><b>{+cn.alias+}</b>({+cn.signature()+})</pre>
290	<ul>
291		<if test="cn.deprecated"><br/><b>Deprecated {+cn.deprecated.desc+}</b><br/></if>
292		{+cn.desc+}
293	</ul>
294	
295	<!-- PARAMETERS START -->
296	<if test="cn.params.length">
297	<ul>
298		<b>Parameters:</b>
299		<for each="param" in="cn.params">
300		<ul>
301			<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><if test="param.desc"> - {+param.desc+}</if> 
302		</ul>
303		</for>
304	</ul>
305	</if>
306	<!-- PARAMETERS END -->
307</for>
308<hr/>
309<!-- END ADDITIONAL ATTRIBUTES  -->
310<!-- ========= CONSTRUCTOR DETAIL END ======== -->
311</if>
312
313<!-- ============ METHOD DETAIL START ======= -->
314<if test="thisClass.methods.length">
315<a name="method_detail"> </a> 
316<table border="1" cellpadding="3" cellspacing="0" width="100%">
317	<tr bgcolor="#CCCCFF" class="TableHeadingColor">
318		<td colspan=1>
319			<font size="+2"> <b>Method Detail</b></font> 
320		</td>
321	</tr>
322</table>
323
324<for each="method" in="thisClass.methods">
325	<a name="{+method.name+}"> </a> <h3>{+method.name+}</h3>
326		<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> 
327	<ul>
328		<if test="method.deprecated"><br/><b>Deprecated {+method.deprecated.desc+}</b><br/></if>
329		{+method.desc+}
330		<for each="since" in="method.doc.getTag('since')">
331			<br><b>Since:</b> {+since+}<br/>
332		</for>
333	</ul>
334	<!-- METHOD PARAMETERS START -->
335	<if test="method.params.length"><ul>
336		<b>Parameters:</b><for each="param" in="method.params">
337		<ul>
338			<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><if test="param.desc"> - {+param.desc+}</if> 
339		</ul></for>
340	</ul></if>
341	<!-- METHOD PARAMETERS END -->
342	<!-- ADDITIONAL ATTRIBUTES START -->
343	<if test="method.returns.length"><ul>
344		<b>Returns:</b><for each="ret" in="method.returns">
345		<ul>
346			<code><if test="ret.type"><i>{+linkToType(ret.type)+}</i>&nbsp;</if></code>{+ret.desc+} 
347		</ul></for>
348	</ul></if>
349	<if test="method.exceptions.length"><ul>
350		<b>Throws:</b><for each="ex" in="method.exceptions">
351		<ul>
352			<code>{+linkToType(ex.type)+}</code> {+ex.desc+} 
353		</ul></for>
354	</ul></if>
355	<!-- ADDITIONAL ATTRIBUTES  END -->
356	<hr>
357</for>
358</if>
359<!-- ============ METHOD DETAIL END ========== -->
360
361<!-- ============ EVENT DETAIL START ======= -->
362<if test="thisClass.events">
363<if test="thisClass.events.length">
364<a name="method_detail"> </a> 
365<table border="1" cellpadding="3" cellspacing="0" width="100%">
366	<tr bgcolor="#CCCCFF" class="TableHeadingColor">
367		<td colspan=1>
368			<font size="+2"> <b>Event Detail</b></font> 
369		</td>
370	</tr>
371</table>
372
373<for each="event" in="thisClass.events">
374	<a name="{+event.name+}"> </a> <h3>{+event.name+}</h3>
375		<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> 
376	<ul>
377		<if test="event.deprecated"><br/><b>Deprecated {+event.deprecated.desc+}</b><br/></if>
378		{+event.desc+}
379		<for each="since" in="event.doc.getTag('since')">
380			<br><b>Since:</b> {+since+}<br/>
381		</for>
382	</ul>
383	<!-- EVENT PARAMETERS START -->
384	<if test="event.params.length"><ul>
385		<b>Parameters:</b><for each="param" in="event.params">
386		<ul>
387			<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><if test="param.desc"> - {+param.desc+}</if> 
388		</ul></for>
389	</ul></if>
390	<!-- EVENT PARAMETERS END -->
391	<!-- ADDITIONAL ATTRIBUTES START -->
392	<if test="event.returns.length"><ul>
393		<b>Returns:</b><for each="ret" in="event.returns">
394		<ul>
395			<code><if test="ret.type"><i>{+linkToType(ret.type)+}</i>&nbsp;</if></code>{+ret.desc+} 
396		</ul></for>
397	</ul></if>
398	<if test="event.exceptions.length"><ul>
399		<b>Throws:</b><for each="ex" in="event.exceptions">
400		<ul>
401			<code>{+linkToType(ex.type)+}</code> {+ex.desc+} 
402		</ul></for>
403	</ul></if>
404	<!-- ADDITIONAL ATTRIBUTES  END -->
405	<hr>
406</for>
407</if>
408</if>
409<!-- ============ EVENT DETAIL END ========== -->
410<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoctoolkit.org/" target="_parent">JsDoc Toolkit</a> {+JsDoc.VERSION+} on {+new Date()+}</div>
411</body>
412</html>