|
Revision 13041, 0.9 kB
(checked in by robert, 14 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | #ifndef BITSET_H |
|---|
| 11 | #define BITSET_H |
|---|
| 12 | |
|---|
| 13 | #include <vector> |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | class BITSET |
|---|
| 17 | { |
|---|
| 18 | public: |
|---|
| 19 | BITSET() : m_numBytes(0) |
|---|
| 20 | {} |
|---|
| 21 | ~BITSET() |
|---|
| 22 | { |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | bool Init(int numberOfBits); |
|---|
| 26 | void ClearAll(); |
|---|
| 27 | void SetAll(); |
|---|
| 28 | |
|---|
| 29 | void Clear(int bitNumber); |
|---|
| 30 | void Set(int bitNumber); |
|---|
| 31 | |
|---|
| 32 | unsigned char IsSet(int bitNumber) const; |
|---|
| 33 | |
|---|
| 34 | protected: |
|---|
| 35 | int m_numBytes; |
|---|
| 36 | unsigned char * m_bits_aux; |
|---|
| 37 | std::vector<unsigned char> m_bits; |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | #endif |
|---|