16 #ifndef SURGSIM_DEVICES_MULTIAXIS_BITSETBUFFER_H 17 #define SURGSIM_DEVICES_MULTIAXIS_BITSETBUFFER_H 61 m_bytes.fill(~static_cast<value_type>(0));
88 bool test(
size_t pos)
const 122 static_assert(ELEMENT_BITS == 8,
"An unsigned char is not 8 bits?!");
125 static const size_t NUM_BYTES = (NUM_BITS + ELEMENT_BITS - 1) / ELEMENT_BITS;
133 #endif // SURGSIM_DEVICES_MULTIAXIS_BITSETBUFFER_H Definition: CompoundShapeToGraphics.cpp:29
unsigned char value_type
Definition: BitSetBuffer.h:119
void * getPointer()
Get a pointer to the buffer's storage.
Definition: BitSetBuffer.h:95
BitSetBuffer(const BitSetBuffer &other)
Create a bit buffer by copying another buffer.
Definition: BitSetBuffer.h:46
const void * getPointer() const
Get a pointer to the buffer's storage.
Definition: BitSetBuffer.h:101
static const size_t ELEMENT_BITS
Definition: BitSetBuffer.h:121
static const size_t NUM_BITS
Definition: BitSetBuffer.h:124
bool test(size_t pos) const
Get the specified bit in the buffer.
Definition: BitSetBuffer.h:88
void reset()
Reset all bits in the buffer to off.
Definition: BitSetBuffer.h:73
static size_t size()
Get the number of bits in the bit set.
Definition: BitSetBuffer.h:107
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77
BitSetBuffer()
Create a bit buffer with all bits set to zero.
Definition: BitSetBuffer.h:40
void reset(size_t pos)
Reset the specified bit in the buffer to off.
Definition: BitSetBuffer.h:80
A bit set corresponding to a contiguous memory buffer.
Definition: BitSetBuffer.h:36
static const size_t ELEMENT_BYTES
Definition: BitSetBuffer.h:120
std::array< value_type, NUM_BYTES > m_bytes
Definition: BitSetBuffer.h:127
The header that provides the assertion API.
BitSetBuffer & operator=(const BitSetBuffer &other)
Copy bit buffer contents from another buffer.
Definition: BitSetBuffer.h:52
static const size_t NUM_BYTES
Definition: BitSetBuffer.h:125
static size_t sizeBytes()
Get the number of bytes in the bit set.
Definition: BitSetBuffer.h:113