mirror of
				https://scm.univ-tours.fr/22107988t/rappaurio-sae501_502.git
				synced 2025-11-04 01:15:21 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			1115 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			1115 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 | 
						||
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 | 
						||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 | 
						||
	<head>
 | 
						||
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 | 
						||
		<meta name="generator" content="JsDoc Toolkit" />
 | 
						||
		
 | 
						||
		<title>JsDoc Reference - CeL.data.code.reorganize</title>
 | 
						||
 | 
						||
		<style type="text/css">
 | 
						||
			/* default.css */
 | 
						||
body
 | 
						||
{
 | 
						||
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
 | 
						||
	width: 800px;
 | 
						||
}
 | 
						||
 | 
						||
.header
 | 
						||
{
 | 
						||
	clear: both;
 | 
						||
	background-color: #ccc;
 | 
						||
	padding: 8px;
 | 
						||
}
 | 
						||
 | 
						||
h1
 | 
						||
{
 | 
						||
	font-size: 150%;
 | 
						||
	font-weight: bold;
 | 
						||
	padding: 0;
 | 
						||
	margin: 1em 0 0 .3em;
 | 
						||
}
 | 
						||
 | 
						||
hr
 | 
						||
{
 | 
						||
	border: none 0;
 | 
						||
	border-top: 1px solid #7F8FB1;
 | 
						||
	height: 1px;
 | 
						||
}
 | 
						||
 | 
						||
pre.code
 | 
						||
{
 | 
						||
	display: block;
 | 
						||
	padding: 8px;
 | 
						||
	border: 1px dashed #ccc;
 | 
						||
}
 | 
						||
 | 
						||
#index
 | 
						||
{
 | 
						||
	margin-top: 24px;
 | 
						||
	float: left;
 | 
						||
	width: 160px;
 | 
						||
	position: absolute;
 | 
						||
	left: 8px;
 | 
						||
	background-color: #F3F3F3;
 | 
						||
	padding: 8px;
 | 
						||
}
 | 
						||
 | 
						||
#content
 | 
						||
{
 | 
						||
	margin-left: 190px;
 | 
						||
	width: 600px;
 | 
						||
}
 | 
						||
 | 
						||
.classList
 | 
						||
{
 | 
						||
	list-style-type: none;
 | 
						||
	padding: 0;
 | 
						||
	margin: 0 0 0 8px;
 | 
						||
	font-family: arial, sans-serif;
 | 
						||
	font-size: 1em;
 | 
						||
	overflow: auto;
 | 
						||
}
 | 
						||
 | 
						||
.classList li
 | 
						||
{
 | 
						||
	padding: 0;
 | 
						||
	margin: 0 0 8px 0;
 | 
						||
}
 | 
						||
 | 
						||
.summaryTable { width: 100%; }
 | 
						||
 | 
						||
h1.classTitle
 | 
						||
{
 | 
						||
	font-size:170%;
 | 
						||
	line-height:130%;
 | 
						||
}
 | 
						||
 | 
						||
h2 { font-size: 110%; }
 | 
						||
caption, div.sectionTitle
 | 
						||
{
 | 
						||
	background-color: #7F8FB1;
 | 
						||
	color: #fff;
 | 
						||
	font-size:130%;
 | 
						||
	text-align: left;
 | 
						||
	padding: 2px 6px 2px 6px;
 | 
						||
	border: 1px #7F8FB1 solid;
 | 
						||
}
 | 
						||
 | 
						||
div.sectionTitle { margin-bottom: 8px; }
 | 
						||
.summaryTable thead { display: none; }
 | 
						||
 | 
						||
.summaryTable td
 | 
						||
{
 | 
						||
	vertical-align: top;
 | 
						||
	padding: 4px;
 | 
						||
	border-bottom: 1px #7F8FB1 solid;
 | 
						||
	border-right: 1px #7F8FB1 solid;
 | 
						||
}
 | 
						||
 | 
						||
/*col#summaryAttributes {}*/
 | 
						||
.summaryTable td.attributes
 | 
						||
{
 | 
						||
	border-left: 1px #7F8FB1 solid;
 | 
						||
	width: 140px;
 | 
						||
	text-align: right;
 | 
						||
}
 | 
						||
 | 
						||
td.attributes, .fixedFont
 | 
						||
{
 | 
						||
	line-height: 15px;
 | 
						||
	color: #002EBE;
 | 
						||
	font-family: "Courier New",Courier,monospace;
 | 
						||
	font-size: 13px;
 | 
						||
}
 | 
						||
 | 
						||
.summaryTable td.nameDescription
 | 
						||
{
 | 
						||
	text-align: left;
 | 
						||
	font-size: 13px;
 | 
						||
	line-height: 15px;
 | 
						||
}
 | 
						||
 | 
						||
.summaryTable td.nameDescription, .description
 | 
						||
{
 | 
						||
	line-height: 15px;
 | 
						||
	padding: 4px;
 | 
						||
	padding-left: 4px;
 | 
						||
}
 | 
						||
 | 
						||
.summaryTable { margin-bottom: 8px; }
 | 
						||
 | 
						||
ul.inheritsList
 | 
						||
{
 | 
						||
	list-style: square;
 | 
						||
	margin-left: 20px;
 | 
						||
	padding-left: 0;
 | 
						||
}
 | 
						||
 | 
						||
.detailList {
 | 
						||
	margin-left: 20px; 
 | 
						||
	line-height: 15px;
 | 
						||
}
 | 
						||
.detailList dt { margin-left: 20px; }
 | 
						||
 | 
						||
.detailList .heading
 | 
						||
{
 | 
						||
	font-weight: bold;
 | 
						||
	padding-bottom: 6px;
 | 
						||
	margin-left: 0;
 | 
						||
}
 | 
						||
 | 
						||
.light, td.attributes, .light a:link, .light a:visited
 | 
						||
{
 | 
						||
	color: #777;
 | 
						||
	font-style: italic;
 | 
						||
}
 | 
						||
 | 
						||
.fineprint
 | 
						||
{
 | 
						||
	text-align: right;
 | 
						||
	font-size: 10px;
 | 
						||
}
 | 
						||
		</style>
 | 
						||
	</head>
 | 
						||
 | 
						||
	<body>
 | 
						||
<!-- ============================== header ================================= -->	
 | 
						||
		<!-- begin static/header.html -->
 | 
						||
		<div id="header">
 | 
						||
</div>
 | 
						||
		<!-- end static/header.html -->
 | 
						||
 | 
						||
<!-- ============================== classes index ============================ -->
 | 
						||
		<div id="index">
 | 
						||
			<!-- begin publish.classesIndex -->
 | 
						||
			<div align="center"><a href="../index.html">Class Index</a>
 | 
						||
| <a href="../files.html">File Index</a></div>
 | 
						||
<hr />
 | 
						||
<h2>Classes</h2>
 | 
						||
<ul class="classList">
 | 
						||
	
 | 
						||
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.html">CeL</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.debug.html">CeL.application.debug</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.debug.log.html">CeL.application.debug.log</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.locale.html">CeL.application.locale</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.net.html">CeL.application.net</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.net.Ajax.html">CeL.application.net.Ajax</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.html">CeL.application.OS.Windows</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.file.html">CeL.application.OS.Windows.file</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.HTA.html">CeL.application.OS.Windows.HTA</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.job.html">CeL.application.OS.Windows.job</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.registry.html">CeL.application.OS.Windows.registry</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.OS.Windows.WMI.html">CeL.application.OS.Windows.WMI</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.application.storage.file.html">CeL.application.storage.file</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.html">CeL.data</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.check.html">CeL.data.check</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.code.API.html">CeL.data.code.API</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.code.compatibility.html">CeL.data.code.compatibility</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.code.reorganize.html">CeL.data.code.reorganize</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.CSV.html">CeL.data.CSV</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.math.html">CeL.data.math</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.math.Hamming.html">CeL.data.math.Hamming</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.math.polynomial.html">CeL.data.math.polynomial</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.math.quotient.html">CeL.data.math.quotient</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.native.html">CeL.data.native</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.data.XML.html">CeL.data.XML</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.env.html">CeL.env</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.interact.DOM.html">CeL.interact.DOM</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.interact.form.address.html">CeL.interact.form.address</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.interact.form.select_input.html">CeL.interact.form.select_input</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.interact.integrate.map.html">CeL.interact.integrate.map</a></li>
 | 
						||
	
 | 
						||
	<li><a href="../symbols/CeL.interact.integrate.SVG.html">CeL.interact.integrate.SVG</a></li>
 | 
						||
	
 | 
						||
</ul>
 | 
						||
<hr />
 | 
						||
			<!-- end publish.classesIndex -->
 | 
						||
		</div>
 | 
						||
		
 | 
						||
		<div id="content">
 | 
						||
<!-- ============================== class title ============================ -->
 | 
						||
			<h1 class="classTitle">
 | 
						||
				
 | 
						||
				Class CeL.data.code.reorganize
 | 
						||
			</h1>
 | 
						||
 | 
						||
<!-- ============================== class summary ========================== -->			
 | 
						||
			<p class="description">
 | 
						||
				
 | 
						||
				
 | 
						||
			
 | 
						||
				程式碼重整重構相關之 functions。
 | 
						||
				
 | 
						||
				
 | 
						||
					<br /><i>Defined in: </i> <a href="../symbols/src/D__USB_cgi-bin_lib_JS_data_code_reorganize.origin.js.html">reorganize.origin.js</a>.
 | 
						||
				
 | 
						||
			</p>
 | 
						||
 | 
						||
<!-- ============================== constructor summary ==================== -->			
 | 
						||
			
 | 
						||
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class CeL.data.code.reorganize.">
 | 
						||
				<caption>Class Summary</caption>
 | 
						||
				<thead>
 | 
						||
					<tr>
 | 
						||
						<th scope="col">Constructor Attributes</th>
 | 
						||
						<th scope="col">Constructor Name and Description</th>
 | 
						||
					</tr>
 | 
						||
				</thead>
 | 
						||
				<tbody>
 | 
						||
					<tr>
 | 
						||
						<td class="attributes"> </td>
 | 
						||
						<td class="nameDescription" >
 | 
						||
							<div class="fixedFont">
 | 
						||
								<b><a href="../symbols/CeL.data.code.reorganize.html#constructor">CeL.data.code.reorganize</a></b>()
 | 
						||
							</div>
 | 
						||
							<div class="description">null module constructor</div>
 | 
						||
						</td>
 | 
						||
					</tr>
 | 
						||
				</tbody>
 | 
						||
			</table>
 | 
						||
			
 | 
						||
 | 
						||
<!-- ============================== properties summary ===================== -->
 | 
						||
			
 | 
						||
				
 | 
						||
				
 | 
						||
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class CeL.data.code.reorganize.">
 | 
						||
					<caption>Field Summary</caption>
 | 
						||
					<thead>
 | 
						||
						<tr>
 | 
						||
							<th scope="col">Field Attributes</th>
 | 
						||
							<th scope="col">Field Name and Description</th>
 | 
						||
						</tr>
 | 
						||
					</thead>
 | 
						||
					<tbody>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">
 | 
						||
								CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#._.generate_code.ddI">_.generate_code.ddI</a></b>
 | 
						||
								</div>
 | 
						||
								<div class="description">default direct input symbol</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">
 | 
						||
								CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#._.generate_code.dsp">_.generate_code.dsp</a></b>
 | 
						||
								</div>
 | 
						||
								<div class="description">default separator</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
					</tbody>
 | 
						||
				</table>
 | 
						||
				
 | 
						||
				
 | 
						||
				
 | 
						||
			
 | 
						||
 | 
						||
<!-- ============================== methods summary ======================== -->
 | 
						||
			
 | 
						||
				
 | 
						||
				
 | 
						||
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class CeL.data.code.reorganize.">
 | 
						||
					<caption>Method Summary</caption>
 | 
						||
					<thead>
 | 
						||
						<tr>
 | 
						||
							<th scope="col">Method Attributes</th>
 | 
						||
							<th scope="col">Method Name and Description</th>
 | 
						||
						</tr>
 | 
						||
					</thead>
 | 
						||
					<tbody>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.add_code">add_code</a></b>(file_name, Vlist, start_string, end_string)
 | 
						||
								</div>
 | 
						||
								<div class="description">將各 function 加入檔案中,可做成 HTML 亦可用之格式。</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.add_use">add_use</a></b>(code)
 | 
						||
								</div>
 | 
						||
								<div class="description">add libary use</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.destory_script">destory_script</a></b>(code, addFN)
 | 
						||
								</div>
 | 
						||
								<div class="description">script 終結者…</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.generate_code">generate_code</a></b>(Vlist, new_line, direct_input)
 | 
						||
								</div>
 | 
						||
								<div class="description">利用[*現有的環境*]及變數設定生成code,因此並不能完全重現所有設定,也無法判別函數間的相依關係。</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.get_all_functions">get_all_functions</a></b>(script_filename)
 | 
						||
								</div>
 | 
						||
								<div class="description">取得[script_filename].wsf中不包括自己([script_filename].js),其餘所有 .js 的code。</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.null_code">null_code</a></b>(length, type)
 | 
						||
								</div>
 | 
						||
								<div class="description">產生無用的垃圾碼</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.reduce_code">reduce_code</a></b>(code, mode)
 | 
						||
								</div>
 | 
						||
								<div class="description">精簡程式碼:去掉註解與\s\n。
 | 
						||
use for JSON (JavaScript Object Notation)</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.reduce_code.reduce_space">reduce_code.reduce_space</a></b>(code)
 | 
						||
								</div>
 | 
						||
								<div class="description">精簡程式碼部分:去掉\n,;前後的空白等,應由 reduce_code() 呼叫。</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.reduce_script">reduce_script</a></b>(original_ScriptFileName, output_ScriptFileName, flag)
 | 
						||
								</div>
 | 
						||
								<div class="description">精簡整個檔的程式碼
 | 
						||
…and test程式是否有語法不全處(例如沒加';')</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
						<tr>
 | 
						||
							<td class="attributes"><static>  </td>
 | 
						||
							<td class="nameDescription">
 | 
						||
								<div class="fixedFont">CeL.data.code.reorganize.<b><a href="../symbols/CeL.data.code.reorganize.html#.rJS">rJS</a></b>(flag)
 | 
						||
								</div>
 | 
						||
								<div class="description">縮減 HTML 用 .js大小+自動判別。
 | 
						||
TODO:
 | 
						||
自動選擇 target 之模式(不一定是 .ori)</div>
 | 
						||
							</td>
 | 
						||
						</tr>
 | 
						||
					
 | 
						||
					</tbody>
 | 
						||
				</table>
 | 
						||
				
 | 
						||
				
 | 
						||
				
 | 
						||
			
 | 
						||
<!-- ============================== events summary ======================== -->
 | 
						||
			
 | 
						||
 | 
						||
<!-- ============================== constructor details ==================== -->		
 | 
						||
			
 | 
						||
			<div class="details"><a name="constructor"> </a>
 | 
						||
				<div class="sectionTitle">
 | 
						||
					Class Detail
 | 
						||
				</div>
 | 
						||
				
 | 
						||
				<div class="fixedFont">
 | 
						||
						<b>CeL.data.code.reorganize</b>()
 | 
						||
				</div>
 | 
						||
				
 | 
						||
				<div class="description">
 | 
						||
					null module constructor
 | 
						||
					
 | 
						||
				</div>
 | 
						||
				
 | 
						||
				
 | 
						||
				
 | 
						||
				
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
 | 
						||
			</div>
 | 
						||
			
 | 
						||
 | 
						||
<!-- ============================== field details ========================== -->		
 | 
						||
			
 | 
						||
				<div class="sectionTitle">
 | 
						||
					Field Detail
 | 
						||
				</div>
 | 
						||
				
 | 
						||
					<a name="._.generate_code.ddI"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					<span class="light">{String}</span>
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>_.generate_code.ddI</b>
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						default direct input symbol
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name="._.generate_code.dsp"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					<span class="light">{String}</span>
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>_.generate_code.dsp</b>
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						default separator
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					
 | 
						||
				
 | 
						||
			
 | 
						||
 | 
						||
<!-- ============================== method details ========================= -->		
 | 
						||
			
 | 
						||
				<div class="sectionTitle">
 | 
						||
					Method Detail
 | 
						||
				</div>
 | 
						||
				
 | 
						||
					<a name=".add_code"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>add_code</b>(file_name, Vlist, start_string, end_string)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						將各 function 加入檔案中,可做成 HTML 亦可用之格式。
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					<pre class="code">add_code('複製 -backup.js');</pre>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>file_name</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>file name (list)</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>Vlist</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>多加添的 function/various list</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>start_string</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>start string</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>end_string</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>ending string</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".add_use"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>add_use</b>(code)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						add libary use
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>code</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>script code</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".destory_script"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>destory_script</b>(code, addFN)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						script 終結者…
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>code</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>script code</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>addFN</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd>error no.</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".generate_code"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>generate_code</b>(Vlist, new_line, direct_input)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						利用[*現有的環境*]及變數設定生成code,因此並不能完全重現所有設定,也無法判別函數間的相依關係。
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{Array}</span> <b>Vlist</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>變數 list</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>new_line</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>new line</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>direct_input</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>直接輸入用辨識碼</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Requires:</dt>
 | 
						||
							
 | 
						||
								<dd>set_obj_value,dQuote</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".get_all_functions"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>get_all_functions</b>(script_filename)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						取得[script_filename].wsf中不包括自己([script_filename].js),其餘所有 .js 的code。
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<span class="light fixedFont">{String}</span> <b>script_filename</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>script filename</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Deprecated:</dt>
 | 
						||
							<dt>
 | 
						||
								若想在低版本中利用eval(get_all_functions(ScriptName))來補足,有時會出現奇怪的現象,還是別用好了。
 | 
						||
							</dt>
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Requires:</dt>
 | 
						||
							
 | 
						||
								<dd>ScriptName,simpleRead</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".null_code"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					<span class="light">{String}</span>
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>null_code</b>(length, type)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						產生無用的垃圾碼
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>length</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>\d || \d-\d</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>type</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd><span class="light fixedFont">{String}</span> 無用的垃圾碼</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">See:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".reduce_code"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					<span class="light">{String}</span>
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>reduce_code</b>(code, mode)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						精簡程式碼:去掉註解與\s\n。
 | 
						||
use for JSON (JavaScript Object Notation)
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
					<pre class="code">CeL.use('code.reorganize');
 | 
						||
CeL.reduce_code('a + v  = ddd;');</pre>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>code</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>欲精簡之程式碼</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>mode</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>mode=1:''中unicode轉\uHHHH</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd><span class="light fixedFont">{String}</span> 精簡後之程式碼</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Requires:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">See:</dt>
 | 
						||
							
 | 
						||
								<dd></dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".reduce_code.reduce_space"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					<span class="light">{String}</span>
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>reduce_code.reduce_space</b>(code)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						精簡程式碼部分:去掉\n,;前後的空白等,應由 reduce_code() 呼叫。
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>code</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>輸入欲精簡之程式碼</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Returns:</dt>
 | 
						||
							
 | 
						||
								<dd><span class="light fixedFont">{String}</span> 精簡後之程式碼</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">See:</dt>
 | 
						||
							
 | 
						||
								<dd>http://dean.edwards.name/packer/</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".reduce_script"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>reduce_script</b>(original_ScriptFileName, output_ScriptFileName, flag)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						精簡整個檔的程式碼
 | 
						||
…and test程式是否有語法不全處(例如沒加';')
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>original_ScriptFileName</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>origin javascript file name</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>output_ScriptFileName</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>target javascript file name</dd>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>flag</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>flag={doTest:bool,doReport:bool,outEnc:(enc),copyOnFailed:bool,startFrom:// | '',addBefore:'',runBefore:function}
 | 
						||
	startFrom 若為 // 則應為 startAfter!!</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Deprecated:</dt>
 | 
						||
							<dt>
 | 
						||
								use <a href="http://closure-compiler.appspot.com/" accessdate="2009/12/3 12:13">Closure Compiler Service</a>
 | 
						||
							</dt>
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Requires:</dt>
 | 
						||
							
 | 
						||
								<dd>autodetectEncode,simpleRead,simpleWrite,reduce_code,is_file</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					<hr />
 | 
						||
				
 | 
						||
					<a name=".rJS"> </a>
 | 
						||
					<div class="fixedFont"><static> 
 | 
						||
					
 | 
						||
					
 | 
						||
					<span class="light">CeL.data.code.reorganize.</span><b>rJS</b>(flag)
 | 
						||
					
 | 
						||
					</div>
 | 
						||
					<div class="description">
 | 
						||
						縮減 HTML 用 .js大小+自動判別。
 | 
						||
TODO:
 | 
						||
自動選擇 target 之模式(不一定是 .ori)
 | 
						||
						
 | 
						||
						
 | 
						||
					</div>
 | 
						||
					
 | 
						||
					
 | 
						||
					
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Parameters:</dt>
 | 
						||
							
 | 
						||
								<dt>
 | 
						||
									<b>flag</b>
 | 
						||
									
 | 
						||
								</dt>
 | 
						||
								<dd>flag</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Since:</dt>
 | 
						||
								<dd>2008/7/31 17:40:40</dd>
 | 
						||
							</dl>
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
						
 | 
						||
							<dl class="detailList">
 | 
						||
							<dt class="heading">Requires:</dt>
 | 
						||
							
 | 
						||
								<dd>reduce_script</dd>
 | 
						||
							
 | 
						||
							</dl>
 | 
						||
						
 | 
						||
						
 | 
						||
 | 
						||
					
 | 
						||
				
 | 
						||
			
 | 
						||
			
 | 
						||
<!-- ============================== event details ========================= -->		
 | 
						||
			
 | 
						||
			
 | 
						||
			<hr />
 | 
						||
		</div>
 | 
						||
 | 
						||
		
 | 
						||
<!-- ============================== footer ================================= -->
 | 
						||
		<div class="fineprint" style="clear:both">
 | 
						||
			
 | 
						||
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sat Aug 20 2011 15:07:30 GMT+0800 (CST)
 | 
						||
		</div>
 | 
						||
	</body>
 | 
						||
</html>
 |