Beispiel #1
0
 public void addFlag(StateType stateType)
 {
     if (StateTypeExtension.existsFlag(stateType))
     {
         binary = binary | stateType;
     }
 }
Beispiel #2
0
 public void removeFlag(StateType stateType)
 {
     if (StateTypeExtension.existsFlag(stateType))
     {
         binary = binary & (~stateType);
     }
 }
Beispiel #3
0
    //função não testa ST_Empty
    public bool hasSomeFlag(StateType flags)
    {
        if (StateTypeExtension.existsFlag(flags))
        {
            return((binary & flags) != 0 ? true : false);
        }

        return(false);
    }
Beispiel #4
0
 public bool hasFlag(StateType stateType)
 {
     if (stateType != StateType.ST_Empty)
     {
         if (StateTypeExtension.existsFlag(stateType))
         {
             return((binary & stateType) == stateType ? true : false);
         }
     }
     else
     {
         if (binary == stateType)
         {
             return(true);
         }
     }
     return(false);
 }