private int GetStateIndex(HCOperState aState) { for (int i = 0; i < FStates.Count; i++) { if (FStates[i].State == aState) { return(i); } } return(-1); }
public void Exclude(HCOperState aState) { int vIndex = GetStateIndex(aState); if (vIndex >= 0) { if (FStates[vIndex].Count > 1) { FStates[vIndex].Count--; } else { DeleteState(vIndex); } } }
public void Include(HCOperState aState) { int vIndex = GetStateIndex(aState); if (vIndex >= 0) { FStates[vIndex].Count++; } else { HCStateDictionary vStateDic = new HCStateDictionary(); vStateDic.State = aState; vStateDic.Count = 1; FStates.Add(vStateDic); } }
public bool Contain(HCOperState aState) { return(GetStateIndex(aState) >= 0); }