Toponaming: Bring in composite shapes for findSubshapesWithSharedVertex ( searchSubShape )
This commit is contained in:
@@ -113,7 +113,7 @@ class Flags {
|
||||
Enum i;
|
||||
|
||||
public:
|
||||
constexpr inline Flags(Enum f) : i(f) {}
|
||||
constexpr inline Flags(Enum f = Enum()) : i(f) {}
|
||||
constexpr bool testFlag(Enum f) const {
|
||||
using u = typename std::underlying_type<Enum>::type;
|
||||
return (i & f) == f && (static_cast<u>(f) != 0 || i == f);
|
||||
@@ -125,6 +125,48 @@ public:
|
||||
using u = typename std::underlying_type<Enum>::type;
|
||||
return static_cast<u>(i) == static_cast<u>(f.i);
|
||||
}
|
||||
constexpr Enum getFlags() const {
|
||||
return i;
|
||||
}
|
||||
constexpr Flags<Enum> &operator|=(const Flags<Enum> &other) {
|
||||
i |= other.i;
|
||||
return *this;
|
||||
}
|
||||
constexpr Flags<Enum> &operator|=(const Enum &f) {
|
||||
i |= f;
|
||||
return *this;
|
||||
}
|
||||
constexpr Flags<Enum> operator|(const Flags<Enum> &other) const {
|
||||
return i | other.i;
|
||||
}
|
||||
constexpr Flags<Enum> operator|(const Enum &f) const {
|
||||
return i | f;
|
||||
}
|
||||
constexpr Flags<Enum> &operator&=(const Flags<Enum> &other) {
|
||||
i &= other.i;
|
||||
return *this;
|
||||
}
|
||||
constexpr Flags<Enum> &operator&=(const Enum &f) {
|
||||
i &= f;
|
||||
return *this;
|
||||
}
|
||||
constexpr Flags<Enum> operator&(const Flags<Enum> &other) const {
|
||||
return i & other.i;
|
||||
}
|
||||
constexpr Flags<Enum> operator&(const Enum &f) const {
|
||||
return i & f;
|
||||
}
|
||||
constexpr Flags<Enum> operator~() const {
|
||||
return ~i;
|
||||
}
|
||||
|
||||
constexpr bool operator!() const {
|
||||
return !i;
|
||||
}
|
||||
|
||||
explicit operator bool() const {
|
||||
return toUnderlyingType() != 0;
|
||||
}
|
||||
typename std::underlying_type<Enum>::type toUnderlyingType() const {
|
||||
return static_cast<typename std::underlying_type<Enum>::type>(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user