flymis/WebRoot/dojojs/src/data/csv/Result.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.data.csv.Result");
dojo.require("dojo.data.Result");
dojo.require("dojo.lang.assert");
dojo.declare("dojo.data.csv.Result", dojo.data.Result, {
/* summary:
* dojo.data.csv.Result implements the dojo.data.Result API. This
* is a fairly general purpose Result object that could be used
* by any datastore implementation that can provide an array of items
* in response to a query.
*/
initializer:
function(/* array */ arrayOfItems, /* object */ dataStore) {
dojo.lang.assertType(arrayOfItems, Array);
this._arrayOfItems = arrayOfItems;
this._dataStore = dataStore;
this._cancel = false;
this._inProgress = false;
},
forEach:
function(/* function */ callbackFunction, /* object? */ callbackObject, /* object? */ optionalKeywordArgs) {
// summary: See dojo.data.Result.forEach()
dojo.lang.assertType(callbackFunction, Function);
dojo.lang.assertType(callbackObject, Object, {optional:true});
dojo.lang.assertType(optionalKeywordArgs, "pureobject", {optional:true});
this._inProgress = true;
for (var i in this._arrayOfItems) {
var item = this._arrayOfItems[i];
if (!this._cancel) {
callbackFunction.call(callbackObject, item, i, this);
}
}
this._inProgress = false;
this._cancel = false;
return true; // boolean
},
getLength:
function() {
// summary: See dojo.data.Result.getLength()
return this._arrayOfItems.length; // integer
},
inProgress:
function() {
// summary: See dojo.data.Result.inProgress()
return this._inProgress; // boolean
},
cancel:
function() {
// summary: See dojo.data.Result.cancel()
后面还有 21 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。