Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
TBitSet.h
Go to the documentation of this file.
1#pragma once
2#include <climits>
3#include <misc/gen/TSet.h>
4
5namespace sf
6{
7
13template<size_t _size>
15{
16 public:
21
25 bool has(int bit);
26
30 void set(int bit);
31
35 void reset(int bit);
36
40 void clear();
41
45 bool isClear();
46
47 private:
51 int _mask[_size / sizeof(int) + 1]{};
52};
53
54}// namespace sf
55
56// Include all inlined functions and template implementations.
57#include <misc/gen/TBitSet.hpp>
Template for creating large memory inexpensive bitmasks or bit sets.
Definition TBitSet.h:15
void clear()
Clears all bits.
bool has(int bit)
Tests if a bit has been Set.
void reset(int bit)
Resets a single bit.
void set(int bit)
Sets a single bit.
TBitSet()
Default constructor.
bool isClear()
Returns true if one of the bits has been Set.
Definition Application.h:10