@metacell/geppetto-meta-core
Version:
The core functionality of geppetto-meta to build and simulate neuroscience data and models.
41 lines (38 loc) • 777 B
JavaScript
/**
* Client class use to represent an array type.
*
* @module model/ArrayType
* @author Giovanni Idili
* @author Matteo Cantarelli
*/
import Type from './Type';
function ArrayType(options) {
Type.prototype.constructor.call(this, options);
this.type = options.type;
this.size = options.elements;
}
ArrayType.prototype = Object.create(Type.prototype);
ArrayType.prototype.constructor = ArrayType;
/**
* Get type for array type
*
* @command ArrayType.getType()
*
* @returns {Type} - type
*
*/
ArrayType.prototype.getType = function () {
return this.type;
};
/**
* Get array size
*
* @command ArrayType.getSize()
*
* @returns {int} - size of the array
*
*/
ArrayType.prototype.getSize = function () {
return this.size;
};
export default ArrayType;