//constructor for logic nodes public Node(ICalculationStrategy strategy) { CalculationStrategy = strategy; Parents = new List <NodeBase>(); Children = new List <NodeBase>(); State = new UnreadyState(this); _visitor = new NodeVisitor(); }
//constructor for input nodes public Node() { Parents = new List <NodeBase>(); Children = new List <NodeBase>(); State = new UnreadyState(this); _calledBy = new List <NodeBase>(); _visitor = new NodeVisitor(); }
public override void SetChildrenStates() { State = new UnreadyState(this); if (Parents.Count > 0) { Output = null; } foreach (NodeBase node in Children) { node.SetChildrenStates(); } }