//>>built
define("dojox/grid/enhanced/plugins/filter/_ConditionExpr",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array"],function(b,d,f){var c=b("dojox.grid.enhanced.plugins.filter._ConditionExpr",null,{_name:"expr",applyRow:function(){throw Error("_ConditionExpr.applyRow: unimplemented interface");},toObject:function(){return{}},getName:function(){return this._name}}),g=b("dojox.grid.enhanced.plugins.filter._DataExpr",c,{_name:"data",constructor:function(a,b,c){this._convertArgs=c||{};if(d.isFunction(this._convertArgs.convert))this._convertData=
d.hitch(this._convertArgs.scope,this._convertArgs.convert);b?this._colArg=a:this._value=this._convertData(a,this._convertArgs)},getValue:function(){return this._value},applyRow:function(a,b){return"undefined"==typeof this._colArg?this:new (d.getObject(this.declaredClass))(this._convertData(b(a,this._colArg),this._convertArgs))},_convertData:function(a){return a},toObject:function(){return{op:this.getName(),data:void 0===this._colArg?this._value:this._colArg,isCol:void 0!==this._colArg}}}),e=b("dojox.grid.enhanced.plugins.filter._OperatorExpr",
c,{_name:"operator",constructor:function(){if(d.isArray(arguments[0]))this._operands=arguments[0];else{this._operands=[];for(var a=0;a<arguments.length;++a)this._operands.push(arguments[a])}},toObject:function(){return{op:this.getName(),data:f.map(this._operands,function(a){return a.toObject()})}}}),h=b("dojox.grid.enhanced.plugins.filter._UniOpExpr",e,{_name:"uniOperator",applyRow:function(a,b){if(!(this._operands[0]instanceof c))throw Error("_UniOpExpr: operand is not expression.");return this._calculate(this._operands[0],
a,b)},_calculate:function(){throw Error("_UniOpExpr._calculate: unimplemented interface");}}),b=b("dojox.grid.enhanced.plugins.filter._BiOpExpr",e,{_name:"biOperator",applyRow:function(a,b){if(this._operands[0]instanceof c){if(!(this._operands[1]instanceof c))throw Error("_BiOpExpr: right operand is not expression.");}else throw Error("_BiOpExpr: left operand is not expression.");return this._calculate(this._operands[0],this._operands[1],a,b)},_calculate:function(){throw Error("_BiOpExpr._calculate: unimplemented interface");
}});return{_ConditionExpr:c,_DataExpr:g,_OperatorExpr:e,_UniOpExpr:h,_BiOpExpr:b}});