59 lines
757 B
JavaScript
59 lines
757 B
JavaScript
|
/**
|
||
|
* Interface for array holders.
|
||
|
*/
|
||
|
module.exports = new Class
|
||
|
({
|
||
|
Properties:
|
||
|
{
|
||
|
list:
|
||
|
{
|
||
|
type: Array
|
||
|
,set: function (x)
|
||
|
{
|
||
|
this._list = x;
|
||
|
}
|
||
|
,get: function ()
|
||
|
{
|
||
|
return this._list;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
,_list: []
|
||
|
|
||
|
,appendChild: function (child)
|
||
|
{
|
||
|
this._list.push (child);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Adds an element to the list.
|
||
|
*
|
||
|
* @param {SqlObject} element The element to add
|
||
|
*/
|
||
|
,push: function (element)
|
||
|
{
|
||
|
this._list.push (element);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Removes an element from the list.
|
||
|
*
|
||
|
* @param {Number} i The element index
|
||
|
*/
|
||
|
,splice: function (i)
|
||
|
{
|
||
|
this._list.splice (i);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Adds an element to the list.
|
||
|
*
|
||
|
* @param {Number} i The element index
|
||
|
*/
|
||
|
,get: function (i)
|
||
|
{
|
||
|
return this._list[i];
|
||
|
}
|
||
|
});
|