public Node()
	{
		Neighbors = new List<Node>();
		Type = NodeTypeEnum.Normal;
		MoveableDirections = new HashSet<Direction>();

	}
Exemplo n.º 2
0
 public Node(string name, NodeTypeEnum nodeType, Node parent = null, string correlationKey = null)
 {
     Value          = name;
     NodeType       = nodeType;
     Parent         = parent;
     CorrelationKey = correlationKey ?? Guid.NewGuid().ToString();
 }
Exemplo n.º 3
0
 public PentagoNode(PentagoBoard currentState, PentagoNode parent)
     : base(parent.Depth + 1)
 {
     this.currentState = currentState;
     this.currentTurn  = parent.NextTurn();
     this.Parent       = parent;
     this.maxDepth     = parent.maxDepth;
     this.nodeType     = (parent.nodeType == NodeTypeEnum.MAX) ? NodeTypeEnum.MIN : NodeTypeEnum.MAX;
     //System.Diagnostics.Debug.WriteLine(Depth+" "+currentTurn.State);
 }
Exemplo n.º 4
0
 /// <summary>
 /// constructor for root node
 /// </summary>
 /// <param name="currentState">current board</param>
 /// <param name="currentTurn">current turn(who is moving now)</param>
 public PentagoNodeEx(PentagoBoard currentState, Status currentTurn, int maxDepth)
     : base(0)
 {
     this.CurrentState = currentState;
     this.currentTurn  = currentTurn;
     this.currentTurn  = this.NextTurn();
     this.Parent       = null;
     this.maxDepth     = maxDepth;
     this.nodeType     = NodeTypeEnum.MAX;
     System.Diagnostics.Debug.WriteLine(Depth);
 }
Exemplo n.º 5
0
 private TreeNode GetParentNodeByType(TreeNode oNode, NodeTypeEnum eType)
 {
     if (oNode.Type == eType)
     {
         return(oNode);
     }
     else
     {
         return(this.GetParentNodeByType(((TreeNode)oNode.Parent), eType));
     }
 }
Exemplo n.º 6
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type = type;
     if (NodeTypeEnum.END != Type)
         Children = new ArrayList();
     this.Parent = parent;
     if(parent != null)
         parent.AddChild(this);
     this.Axis = axis;
 }
Exemplo n.º 7
0
        //查询函数,返回节点列表中指定类型的所有节点
        public List <IfCoreNode> GetNodesOfType(NodeTypeEnum type)
        {
            List <IfCoreNode> ResultList = new List <IfCoreNode>();

            //遍历节点列表
            foreach (IfCoreNode curNode in NodeList)
            {
                if (curNode.Type.Type == type)
                {//将符合type要求的节点加入返回结果列表
                    ResultList.Add(curNode);
                }
            }
            return(ResultList);
        }
Exemplo n.º 8
0
        internal IEnumerable <TransitionInstanceEntity> GetTransitonInstance(string appName, int appInstanceID, Guid processGUID,
                                                                             NodeTypeEnum toActivityType)
        {
            var sql      = "SELECT * FROM WfTransitionInstance WHERE AppName=@appName AND AppInstanceID=@appInstanceID AND ProcessGUID=@processGUID AND ToActivityType=@toActivityType ORDER BY CreatedDateTime DESC";
            var nodeList = TransitionInstanceRepository.Query <TransitionInstanceEntity>(sql,
                                                                                         new
            {
                appName        = appName,
                appInstanceID  = appInstanceID,
                processGUID    = processGUID,
                toActivityType = toActivityType
            });

            return(nodeList);
        }
Exemplo n.º 9
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type       = type;
     if (NodeTypeEnum.END != Type)
     {
         Children = new ArrayList();
     }
     this.Parent = parent;
     if (parent != null)
     {
         parent.AddChild(this);
     }
     this.Axis = axis;
 }
Exemplo n.º 10
0
 public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
 {
     this.IsKinectJoint = isKinectJoint;
     this.JointIndex = index;
     Name = isKinectJoint ? index.ToString() : name;
     this.BaseAxis = axis;
     this.Type = type;
     if(Type != NodeTypeEnum.END)
         Children = new ArrayList();
     if (null != parent)
     {
         this.Parent = parent;
         parent.AddChild(this);
     }
 }
Exemplo n.º 11
0
 public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
 {
     this.IsKinectJoint = isKinectJoint;
     this.JointIndex    = index;
     Name          = isKinectJoint ? index.ToString() : name;
     this.BaseAxis = axis;
     this.Type     = type;
     if (Type != NodeTypeEnum.END)
     {
         Children = new ArrayList();
     }
     if (null != parent)
     {
         this.Parent = parent;
         parent.AddChild(this);
     }
 }
Exemplo n.º 12
0
 public static List <INode> Get(NodeTypeEnum @enum)
 {
     return(servers.Where(m => m.Node.NodeType == @enum).Select(m => m.Node).ToList());
 }
Exemplo n.º 13
0
 //连边类型构造函数
 public NodeType(string sTypeName)
 {
     intType = NameToType(sTypeName);
 }
Exemplo n.º 14
0
 //连边类型构造函数
 public NodeType(NodeTypeEnum iType)
 {
     intType = iType;
 }
Exemplo n.º 15
0
 public void SetConditionNodeType(NodeTypeEnum value)
 {
     this.ConditionNodeType = (int)value;
 }
Exemplo n.º 16
0
 /// <summary>
 /// Formula node
 /// </summary>
 protected BaseFormulaNode(NodeTypeEnum typeKey)
 {
     TypeKey = typeKey;
 }
Exemplo n.º 17
0
 public TreeNode GetParentNodeByType(NodeTypeEnum eType)
 {
     return(this.GetParentNodeByType(this, eType));
 }
Exemplo n.º 18
0
 public PropertyNode(string name, NodeTypeEnum nodeType, string correlationKey = null, Node parent = null) : base(name, nodeType, parent, correlationKey)
 {
 }
Exemplo n.º 19
0
 public BaseNode(string Name, NodeTypeEnum NodeType)
 {
     _name = Name;
     _nodeType = NodeType;
     _childNodes = new ArrayList();
 }
Exemplo n.º 20
0
 public BaseNode(string Name, NodeTypeEnum NodeType)
 {
     _name       = Name;
     _nodeType   = NodeType;
     _childNodes = new ArrayList();
 }
Exemplo n.º 21
0
 public NodeProperty(int nodeId, NodeTypeEnum nodeType)
 {
     NodeId   = nodeId;
     NodeType = nodeType;
 }
Exemplo n.º 22
0
 public ValueNode(string value, NodeTypeEnum nodeType, Node parent = null) :
     base(value, nodeType, parent, null)
 {
 }