Zeldus

CountOperator

function
CountOperator()

Option name Type Description
childOperator Object a child operator

Count operator. TODO.

function CountOperator(childOperator){
		var self = this;
        Operator.call(this, childOperator);

getNextValueBlock

method
self.getNextValueBlock() ->Object

Get the next matching block from both left and right operators

self.getNextValueBlock = function(){
        	var block = null,
        		count = 0;

			if(this.childOperator != null){
				block = this.childOperator.getNextValueBlock();
				if(block == null)
					return null;
				
				do{
					count += block.getSize();
					block = this.childOperator.getNextValueBlock();
				}while(block != null);
			}
			return new BasicBlock(count, 0);
		};

getNextPositionBlock

method
self.getNextPositionBlock()

Get the next position block

self.getNextPositionBlock = function(){
			
		};
	}

	CountOperator.prototype = Object.create(Operator.prototype);
    CountOperator.prototype.constructor = CountOperator;

	return CountOperator;
});