#include
<oglplus/bitfield.hpp>
The Bitfield
template serves as a wrapper for OpenGL
bitfields. It allows to combine strongly-typed enumerated values into a
single bitfield value.
Library end-user applications rarely need to use this class directly. Instantiations of this template are used as types for parameters in functions taking bitfields based on strongly-type enumerations. When constructing a bitfield the application simply passes the enumerated value or a combination of enumerated values using the bitwise-or operator or initializer list.
template <typename Bits> class Bitfield { public: Bitfield(void);Bitfield(Bits _bit);
Bitfield(Bits _bit_a, Bits _bit_b);
#if !
OGLPLUS_NO_INITIALIZER_LISTS
Bitfield(const std::initializer_list<Bits>& bits);#endif template <typename Iter> Bitfield(Iter pos, Iter end);
friend Bitfield operator | (Bitfield bf, Bits b);
Bitfield& operator |= (Bits b);
bool Test(Bits b) const;
}; template <typename Bits> Bitfield<Bits> operator | (Bits b1, Bits b2);
Constructs an empty (zero) bitfield. |
|
Construct a bitfield from a single value of |
|
Construct a bitfield from a pair of |
|
Construct a bitfield from an initializer list of |
|
Construction from a pair of iterators through |
|
Bitwise-or operator for combining |
|
Bitwise-or operator for combining |
|
Tests if a specified bit is set. |