mirror of
https://github.com/XITRIX/NXKit.git
synced 2026-05-30 11:46:52 +00:00
18 lines
345 B
C++
18 lines
345 B
C++
#pragma once
|
|
|
|
namespace NXKit {
|
|
|
|
template<typename T>
|
|
struct OptionSet {
|
|
public:
|
|
OptionSet(): OptionSet(0) {}
|
|
OptionSet(int initValue): _value(initValue) {}
|
|
void include(T value) { _value |= value; }
|
|
void exclude(T value) { _value &= ~value; }
|
|
bool contains(T value) { return _value & value; }
|
|
private:
|
|
int _value;
|
|
};
|
|
|
|
}
|