var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
///<reference path="./ICondition" />
///<reference path="./IConditionContainer" />
var econda;
(function (econda) {
var condition;
(function (condition_1) {
/**
* Condition container class. Only for internal use.
* @class econda.condition.ConditionContainer
*/
var ConditionContainer = (function (_super) {
__extends(ConditionContainer, _super);
function ConditionContainer(cfg) {
_super.call(this);
this._conditions = [];
if (cfg instanceof ConditionContainer) {
return cfg;
}
this.initConfig(cfg);
}
ConditionContainer.prototype.areTrue = function () {
for (var n = 0, l = this._conditions.length; n < l; n++) {
if (this._conditions[n].isTrue() === false) {
return false;
}
}
return true;
};
ConditionContainer.prototype.add = function (condition) {
this.addArray('_conditions', condition);
return this;
};
ConditionContainer.prototype.clear = function () {
this._conditions = [];
return this;
};
return ConditionContainer;
}(econda.base.BaseClass));
condition_1.ConditionContainer = ConditionContainer;
})(condition = econda.condition || (econda.condition = {}));
})(econda || (econda = {}));