//>>built
define("dojox/grid/enhanced/plugins/filter/_ConditionExpr",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array"],function(c,e,h){var d=c("dojox.grid.enhanced.plugins.filter._ConditionExpr",null,{_name:"expr",applyRow:function(a,b){throw Error("_ConditionExpr.applyRow: unimplemented interface");},toObject:function(){return{}},getName:function(){return this._name}}),k=c("dojox.grid.enhanced.plugins.filter._DataExpr",d,{_name:"data",constructor:function(a,b,f){this._convertArgs=f||{};e.isFunction(this._convertArgs.convert)&&
(this._convertData=e.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 (e.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}}}),
g=c("dojox.grid.enhanced.plugins.filter._OperatorExpr",d,{_name:"operator",constructor:function(){if(e.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:h.map(this._operands,function(a){return a.toObject()})}}}),l=c("dojox.grid.enhanced.plugins.filter._UniOpExpr",g,{_name:"uniOperator",applyRow:function(a,b){if(!(this._operands[0]instanceof d))throw Error("_UniOpExpr: operand is not expression.");
return this._calculate(this._operands[0],a,b)},_calculate:function(a,b,f){throw Error("_UniOpExpr._calculate: unimplemented interface");}});c=c("dojox.grid.enhanced.plugins.filter._BiOpExpr",g,{_name:"biOperator",applyRow:function(a,b){if(!(this._operands[0]instanceof d))throw Error("_BiOpExpr: left operand is not expression.");if(!(this._operands[1]instanceof d))throw Error("_BiOpExpr: right operand is not expression.");return this._calculate(this._operands[0],this._operands[1],a,b)},_calculate:function(a,
b,f,m){throw Error("_BiOpExpr._calculate: unimplemented interface");}});return{_ConditionExpr:d,_DataExpr:k,_OperatorExpr:g,_UniOpExpr:l,_BiOpExpr:c}});