Example #1
0
        public void Include(HCState 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);
            }
        }
Example #2
0
        public void Exclude(HCState aState)
        {
            int vIndex = GetStateIndex(aState);

            if (vIndex >= 0)
            {
                if (FStates[vIndex].Count > 1)
                {
                    FStates[vIndex].Count--;
                }
                else
                {
                    DeleteState(vIndex);
                }
            }
        }
Example #3
0
 public bool Contain(HCState aState)
 {
     return(GetStateIndex(aState) >= 0);
 }