PageRenderTime 28ms CodeModel.GetById 13ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/tags/jsdoc_toolkit-2.0.1/jsdoc-toolkit/templates/jsdoc/class.tmpl

http://jsdoc-toolkit.googlecode.com/
Go Template | 487 lines | 450 code | 37 blank | 0 comment | 0 complexity | 833e1f1afb71970e5e40aa39460d8074 MD5 | raw file
  1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4	<head>
  5		<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
  6		<meta name="generator" content="JsDoc Toolkit" />
  7		{! Link.base = "../"; /* all generated links will be relative to this */ !}
  8		<title>JsDoc Reference - {+data.alias+}</title>
  9
 10		<style type="text/css">
 11			{+include("static/default.css")+}
 12		</style>
 13	</head>
 14
 15	<body>
 16<!-- ============================== header ================================= -->	
 17		<!-- begin static/header.html -->
 18		{+include("static/header.html")+}
 19		<!-- end static/header.html -->
 20
 21<!-- ============================== classes index ============================ -->
 22		<div id="index">
 23			<!-- begin publish.classesIndex -->
 24			{+publish.classesIndex+}
 25			<!-- end publish.classesIndex -->
 26		</div>
 27		
 28		<div id="content">
 29<!-- ============================== class title ============================ -->
 30			<h1 class="classTitle">
 31				{!
 32					var classType = "";
 33					
 34					if (data.isBuiltin()) {
 35						classType += "Built-In ";
 36					}
 37					
 38					if (data.isNamespace) {
 39						if (data.is('FUNCTION')) {
 40							classType += "Function ";
 41						}
 42						classType += "Namespace ";
 43					}
 44					else {
 45						classType += "Class ";
 46					}
 47				!}
 48				{+classType+}{+data.alias+}
 49			</h1>
 50
 51<!-- ============================== class summary ========================== -->			
 52			<p class="description">
 53				<if test="data.augments.length"><br />Extends
 54					{+
 55						data.augments
 56						.sort()
 57						.map(
 58							function($) { return new Link().toSymbol($); }
 59						)
 60						.join(", ")
 61					+}.<br />
 62				</if>
 63			
 64				{+resolveLinks(data.classDesc)+}
 65				
 66				<if test="!data.isBuiltin()">{# isn't defined in any file #}
 67					<br /><i>Defined in: </i> {+new Link().toSrc(data.srcFile)+}.
 68				</if>
 69			</p>
 70
 71<!-- ============================== constructor summary ==================== -->			
 72			<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
 73			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class {+data.alias+}.">
 74				<caption>{+classType+}Summary</caption>
 75				<thead>
 76					<tr>
 77						<th scope="col">Constructor Attributes</th>
 78						<th scope="col">Constructor Name and Description</th>
 79					</tr>
 80				</thead>
 81				<tbody>
 82					<tr>
 83						<td class="attributes">{!
 84							if (data.isPrivate) output += "&lt;private&gt; ";
 85							if (data.isInner) output += "&lt;inner&gt; ";
 86						!}&nbsp;</td>
 87						<td class="nameDescription" {!if (data.comment.getTag("hilited").length){output += 'style="color: red"'}!}>
 88							<div class="fixedFont">
 89								<b>{+ new Link().toSymbol(data.alias).inner('constructor')+}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if>
 90							</div>
 91							<div class="description">{+resolveLinks(summarize(data.desc))+}</div>
 92						</td>
 93					</tr>
 94				</tbody>
 95			</table>
 96			</if>
 97
 98<!-- ============================== properties summary ===================== -->
 99			<if test="data.properties.length">
100				{! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
101				<if test="ownProperties.length">
102				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class {+data.alias+}.">
103					<caption>Field Summary</caption>
104					<thead>
105						<tr>
106							<th scope="col">Field Attributes</th>
107							<th scope="col">Field Name and Description</th>
108						</tr>
109					</thead>
110					<tbody>
111					<for each="member" in="ownProperties">
112						<tr>
113							<td class="attributes">{!
114								if (member.isPrivate) output += "&lt;private&gt; ";
115								if (member.isInner) output += "&lt;inner&gt; ";
116								if (member.isStatic) output += "&lt;static&gt; ";
117								if (member.isConstant) output += "&lt;constant&gt; ";
118							!}&nbsp;</td>
119							<td class="nameDescription">
120								<div class="fixedFont">
121								<if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>
122								</div>
123								<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
124							</td>
125						</tr>
126					</for>
127					</tbody>
128				</table>
129				</if>
130				
131				<if test="data.inheritsFrom.length">
132				<dl class="inheritsList">
133				{!
134					var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias});
135					
136					var contributers = [];
137					borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
138					for (var i = 0, l = contributers.length; i < l; i++) {
139						output +=
140							"<dt>Fields borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
141							+
142							"<dd>" +
143							borrowedMembers
144							.filter(
145								function($) { return $.memberOf == contributers[i] }
146							)
147							.sort(makeSortby("name"))
148							.map(
149								function($) { return new Link().toSymbol($.alias).withText($.name) }
150							)
151							.join(", ")
152							+
153							"</dd>";
154					}
155				!}
156				</dl>
157				</if>
158			</if>
159
160<!-- ============================== methods summary ======================== -->
161			<if test="data.methods.length">
162				{! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias  && !$.isNamespace}).sort(makeSortby("name")); !}
163				<if test="ownMethods.length">
164				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}.">
165					<caption>Method Summary</caption>
166					<thead>
167						<tr>
168							<th scope="col">Method Attributes</th>
169							<th scope="col">Method Name and Description</th>
170						</tr>
171					</thead>
172					<tbody>
173					<for each="member" in="ownMethods">
174						<tr>
175							<td class="attributes">{!
176								if (member.isPrivate) output += "&lt;private&gt; ";
177								if (member.isInner) output += "&lt;inner&gt; ";
178								if (member.isStatic) output += "&lt;static&gt; ";
179							!}&nbsp;</td>
180							<td class="nameDescription">
181								<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
182								</div>
183								<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
184							</td>
185						</tr>
186					</for>
187					</tbody>
188				</table>
189				</if>
190				
191				<if test="data.inheritsFrom.length">
192				<dl class="inheritsList">
193				{!
194					var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias});
195					var contributers = [];
196					borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
197					for (var i = 0, l = contributers.length; i < l; i++) {
198						output +=
199							"<dt>Methods borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
200							+
201							"<dd>" +
202							borrowedMembers
203							.filter(
204								function($) { return $.memberOf == contributers[i] }
205							)
206							.sort(makeSortby("name"))
207							.map(
208								function($) { return new Link().toSymbol($.alias).withText($.name) }
209							)
210							.join(", ")
211							+
212							"</dd>";
213					}
214				
215				!}
216				</dl>
217				</if>
218			</if>
219
220<!-- ============================== constructor details ==================== -->		
221			<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
222			<div class="details"><a name="constructor"> </a>
223				<div class="sectionTitle">
224					{+classType+}Detail
225				</div>
226				
227				<div class="fixedFont">{!
228					if (data.isPrivate) output += "&lt;private&gt; ";
229					if (data.isInner) output += "&lt;inner&gt; ";
230				!}
231						<b>{+ data.alias +}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if>
232				</div>
233				
234				<div class="description">
235					{+resolveLinks(data.desc)+}
236					<if test="data.author"><br /><i>Author: </i>{+data.author+}.</if>
237				</div>
238				
239				<if test="data.example.length">
240				<for each="example" in="data.example">
241				<pre class="code">{+example+}</pre>
242				</for>
243				</if>
244				
245				
246					<if test="data.params.length">
247						<dl class="detailList">
248						<dt class="heading">Parameters:</dt>
249						<for each="item" in="data.params">
250							<dt>
251								{+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+} <b>{+item.name+}</b>
252								<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
253							</dt>
254								<dd>{+resolveLinks(item.desc)+}</dd>
255						</for>
256						</dl>
257					</if>
258					<if test="data.deprecated">
259						<dl class="detailList">
260						<dt class="heading">Deprecated:</dt>
261						<dt>
262							{+resolveLinks(data.deprecated)+}
263						</dt>
264						</dl>
265					</if>
266					<if test="data.since">
267						<dl class="detailList">
268						<dt class="heading">Since:</dt>
269							<dd>{+ data.since +}</dd>
270						</dl>
271					</if>
272					<if test="data.exceptions.length">
273						<dl class="detailList">
274						<dt class="heading">Throws:</dt>
275						<for each="item" in="data.exceptions">
276							<dt>
277								{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
278							</dt>
279								<dd>{+resolveLinks(item.desc)+}</dd>
280						</for>
281						</dl>
282					</if>
283					<if test="data.returns.length">
284						<dl class="detailList">
285						<dt class="heading">Returns:</dt>
286						<for each="item" in="data.returns">
287								<dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
288						</for>
289						</dl>
290					</if>
291					<if test="data.requires.length">
292						<dl class="detailList">
293						<dt class="heading">Requires:</dt>
294						<for each="item" in="data.requires">
295							<dd>{+ resolveLinks(item) +}</dd>
296						</for>
297						</dl>
298					</if>
299					<if test="data.see.length">
300						<dl class="detailList">
301						<dt class="heading">See:</dt>
302						<for each="item" in="data.see">
303							<dd>{+ new Link().toSymbol(item) +}</dd>
304						</for>
305						</dl>
306					</if>
307
308			</div>
309			</if>
310
311<!-- ============================== field details ========================== -->		
312			<if test="defined(ownProperties) && ownProperties.length">
313				<div class="sectionTitle">
314					Field Detail
315				</div>
316				<for each="member" in="ownProperties">
317					<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
318					<div class="fixedFont">{!
319						if (member.isPrivate) output += "&lt;private&gt; ";
320						if (member.isInner) output += "&lt;inner&gt; ";
321						if (member.isStatic) output += "&lt;static&gt; ";
322						if (member.isConstant) output += "&lt;constant&gt; ";
323					!}
324					
325					<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
326					<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>
327					
328					</div>
329					<div class="description">
330						{+resolveLinks(member.desc)+}
331						<if test="member.srcFile != data.srcFile">
332							<br />
333							<i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
334						</if>
335						<if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
336					</div>
337					
338					<if test="member.example.length">
339					<for each="example" in="member.example">
340					<pre class="code">{+example+}</pre>
341					</for>
342					</if>
343
344						<if test="member.deprecated">
345							<dl class="detailList">
346							<dt class="heading">Deprecated:</dt>
347							<dt>
348								{+ member.deprecated +}
349							</dt>
350							</dl>
351						</if>
352						<if test="member.since">
353							<dl class="detailList">
354							<dt class="heading">Since:</dt>
355								<dd>{+ member.since +}</dd>
356							</dl>
357						</if>
358						<if test="member.see.length">
359							<dl class="detailList">
360							<dt class="heading">See:</dt>
361							<for each="item" in="member.see">
362							<dd>{+ new Link().toSymbol(item) +}</dd>
363							</for>
364							</dl>
365						</if>
366						<if test="member.defaultValue">
367							<dl class="detailList">
368							<dt class="heading">Default Value:</dt>
369							<dd>
370								{+resolveLinks(member.defaultValue)+}
371							</dd>
372							</dl>
373						</if>
374
375					<if test="!$member_last"><hr /></if>
376				</for>
377			</if>
378
379<!-- ============================== method details ========================= -->		
380			<if test="defined(ownMethods) && ownMethods.length">
381				<div class="sectionTitle">
382					Method Detail
383				</div>
384				<for each="member" in="ownMethods">
385					<a name="{+Link.symbolNameToLinkName(member)+}"> </a>
386					<div class="fixedFont">{!
387						if (member.isPrivate) output += "&lt;private&gt; ";
388						if (member.isInner) output += "&lt;inner&gt; ";
389						if (member.isStatic) output += "&lt;static&gt; ";
390					!}
391					
392					<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
393					<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+}
394					
395					</div>
396					<div class="description">
397						{+resolveLinks(member.desc)+}
398						<if test="member.srcFile != data.srcFile">
399							<br />
400							<i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
401						</if>
402						<if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
403					</div>
404					
405					<if test="member.example.length">
406					<for each="example" in="member.example">
407					<pre class="code">{+example+}</pre>
408					</for>
409					</if>
410					
411						<if test="member.params.length">
412							<dl class="detailList">
413							<dt class="heading">Parameters:</dt>
414							<for each="item" in="member.params">
415								<dt>
416									{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
417									<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
418								</dt>
419								<dd>{+resolveLinks(item.desc)+}</dd>
420							</for>
421							</dl>
422						</if>
423						<if test="member.deprecated">
424							<dl class="detailList">
425							<dt class="heading">Deprecated:</dt>
426							<dt>
427								{+member.deprecated+}
428							</dt>
429							</dl>
430						</if>
431						<if test="member.since">
432							<dl class="detailList">
433							<dt class="heading">Since:</dt>
434								<dd>{+ member.since +}</dd>
435							</dl>
436							</dl>
437						</if>
438						<if test="member.exceptions.length">
439							<dl class="detailList">
440							<dt class="heading">Throws:</dt>
441							<for each="item" in="member.exceptions">
442								<dt>
443									{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
444								</dt>
445								<dd>{+resolveLinks(item.desc)+}</dd>
446							</for>
447							</dl>
448						</if>
449						<if test="member.returns.length">
450							<dl class="detailList">
451							<dt class="heading">Returns:</dt>
452							<for each="item" in="member.returns">
453								<dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
454							</for>
455							</dl>
456						</if>
457						<if test="member.requires.length">
458							<dl class="detailList">
459							<dt class="heading">Requires:</dt>
460							<for each="item" in="member.requires">
461								<dd>{+ resolveLinks(item) +}</dd>
462							</for>
463							</dl>
464						</if>
465						<if test="member.see.length">
466							<dl class="detailList">
467							<dt class="heading">See:</dt>
468							<for each="item" in="member.see">
469								<dd>{+ new Link().toSymbol(item) +}</dd>
470							</for>
471							</dl>
472						</if>
473
474					<if test="!$member_last"><hr /></if>
475				</for>
476			</if>
477			
478			<hr />
479		</div>
480		
481<!-- ============================== footer ================================= -->
482		<div class="fineprint" style="clear:both">
483			<if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
484			Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
485		</div>
486	</body>
487</html>