30 Flags::Flags(
const bool &
b) : flags(), outOfRangeFlag(b) {}
34 for (
unsigned int i = 0;
i <
flags.size(); ++
i) {
45 throw std::invalid_argument(
"Could not parse input string " +
46 std::string(_flags) +
". Expected 0 or 1.");
54 Flags::operator bool(
void)
const {
56 for (
unsigned int i = 0;
i <
flags.size(); ++
i)
106 for (
unsigned int i = 0;
i < f2.
flags.size(); ++
i)
117 for (
unsigned int i = 0;
i < f2.
flags.size(); ++
i)
127 for (
auto f : fl.
flags) os << (
f ?
'1' :
'0');
134 while (is.get(c).good()) {
137 fl.
flags.push_back(
false);
140 fl.
flags.push_back(
true);
145 throw std::invalid_argument(
"Could not parse input character " +
146 std::string(1, c) +
". Expected 0 or 1.");
Flags operator!(void) const
Flags(const bool &b=false)
SOT_CORE_EXPORT friend std::istream & operator>>(std::istream &is, Flags &fl)
SOT_CORE_EXPORT friend Flags operator|(const Flags &f1, const Flags &f2)
void set(const unsigned int &i)
std::vector< bool > flags
SOT_CORE_EXPORT friend Flags operator &(const Flags &f1, const Flags &f2)
Flags & operator|=(const Flags &f2)
bool operator()(const int &i) const
SOT_CORE_EXPORT friend std::ostream & operator<<(std::ostream &os, const Flags &fl)
Flags & operator &=(const Flags &f2)
void unset(const unsigned int &i)