Functions | |
| template<class N, class B> | |
| bool | Has (N number, B bits) |
| See if the "bits" are in "number". | |
| template<class N, class B> | |
| N | Add (N number, B bits) |
| Add the "bits" to "number". | |
| template<class N, class B> | |
| N | Remove (N number, B bits) |
| template<class N, class B> | |
| N | Toggle (N number, B bits) |
| Toggle the "bits" in "number". | |
| N dtUtil::Bits::Add | ( | N | number, | |
| B | bits | |||
| ) | [inline] |
Add the "bits" to "number".
| bool dtUtil::Bits::Has | ( | N | number, | |
| B | bits | |||
| ) | [inline] |
| N dtUtil::Bits::Remove | ( | N | number, | |
| B | bits | |||
| ) | [inline] |
| N dtUtil::Bits::Toggle | ( | N | number, | |
| B | bits | |||
| ) | [inline] |
Toggle the "bits" in "number".
unsigned int accum = 3; unsigned int newBits; newBits = Bits::Toggle(accum, 1); //newBits = 2 newBits = Bits::Toggle(accum, 1); //newBits = 3