public void addFlag(StateType stateType) { if (StateTypeExtension.existsFlag(stateType)) { binary = binary | stateType; } }
public void removeFlag(StateType stateType) { if (StateTypeExtension.existsFlag(stateType)) { binary = binary & (~stateType); } }
//função não testa ST_Empty public bool hasSomeFlag(StateType flags) { if (StateTypeExtension.existsFlag(flags)) { return((binary & flags) != 0 ? true : false); } return(false); }
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); }