Files
2025-02-24 23:03:13 +01:00

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;
};
}