UNPKG

dl

Version:

DreamLab Libs

44 lines (34 loc) 820 B
var Class = require("core").Class; /** * @class CdfContainer */ var CdfContainer = function(){ // kontener na modele // this._models = []; /** * @ignore */ this.initialize = function () { this._models = []; }; /** * Dodaje model do kolekcji */ this.add = function (model) { this._models.push(model); }; /** * Zwraca model o podanym index'ie */ this.get = function (index) { return this._models[index]; }; /** * Zwraca ilość posiadanych modeli w kolekcji */ this.getLength = function () { return this._models.length; }; }; CdfContainer = new Class(new CdfContainer()); exports.CdfContainer = CdfContainer;