Esempio n. 1
0
 public override EvalStateNode NewState(
     Evaluator parentNode,
     EvalStateNodeNumber stateNodeNumber,
     long stateNodeId)
 {
     return(new EvalEveryStateNode(parentNode, this));
 }
Esempio n. 2
0
 public override EvalStateNode NewState(Evaluator parentNode, EvalStateNodeNumber stateNodeNumber, long stateNodeId)
 {
     if (Context.ConsumptionHandler != null)
     {
         return(new EvalFilterStateNodeConsumeImpl(parentNode, this));
     }
     return(new EvalFilterStateNode(parentNode, this));
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="parentNode">is the parent evaluator to call to indicate truth value</param>
 /// <param name="evalAuditNode">is the factory node associated to the state</param>
 /// <param name="stateNodeNumber">The state node number.</param>
 /// <param name="stateNodeId">The state node id.</param>
 public EvalAuditStateNode(Evaluator parentNode,
                           EvalAuditNode evalAuditNode,
                           EvalStateNodeNumber stateNodeNumber,
                           long stateNodeId)
     : base(parentNode)
 {
     _evalAuditNode = evalAuditNode;
     _childState    = evalAuditNode.ChildNode.NewState(this, stateNodeNumber, stateNodeId);
 }
Esempio n. 4
0
 public override EvalStateNode NewState(Evaluator parentNode, EvalStateNodeNumber stateNodeNumber, long stateNodeId)
 {
     if (_factoryNode.TimeDeltaComputation == null)
     {
         return(new EvalEveryDistinctStateNode(parentNode, this));
     }
     else
     {
         return(new EvalEveryDistinctStateExpireKeyNode(parentNode, this));
     }
 }
Esempio n. 5
0
        public override EvalStateNode NewState(Evaluator parentNode, EvalStateNodeNumber stateNodeNumber, long stateNodeId)
        {
            switch (_factoryNode.OpType)
            {
            case EvalFollowedByNodeOpType.NOMAX_PLAIN:
                return(new EvalFollowedByStateNode(parentNode, this));

            default:
                return(new EvalFollowedByWithMaxStateNodeManaged(parentNode, this));
            }
        }
Esempio n. 6
0
        public override bool Equals(Object otherObj)
        {
            if (!(otherObj is EvalStateNodeNumber))
            {
                return(false);
            }

            EvalStateNodeNumber other = (EvalStateNodeNumber)otherObj;

            int[] otherNum = other.StateNumber;
            if (otherNum.Length != _stateNumber.Length)
            {
                return(false);
            }
            for (int i = 0; i < _stateNumber.Length; i++)
            {
                if (otherNum[i] != _stateNumber[i])
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 7
0
 public override EvalStateNode NewState(Evaluator parentNode, EvalStateNodeNumber stateNodeNumber, long stateNodeId)
 {
     return(new EvalRootStateNode(_childNode));
 }
Esempio n. 8
0
 /// <summary>
 /// Create the evaluation state node containing the truth value state for each operator in an
 /// event expression.
 /// </summary>
 /// <param name="parentNode">the parent evaluator node that this node indicates a change in truth value to</param>
 /// <param name="stateNodeNumber">The state node number.</param>
 /// <param name="stateNodeId">the new state object's identifier</param>
 /// <returns>
 /// state node containing the truth value state for the operator
 /// </returns>
 public abstract EvalStateNode NewState(Evaluator parentNode,
                                        EvalStateNodeNumber stateNodeNumber,
                                        long stateNodeId);