13 #ifndef __UT_StringSet_h__
14 #define __UT_StringSet_h__
26 #define UT_STRINGREF_WRAPPER(return_type, name, qualifier) \
27 inline return_type name(const UT_StringRef &key) qualifier \
29 return Parent::name(UTmakeUnsafeRef(key)); \
34 #define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier) \
35 inline std::pair<iterator_type, iterator_type> \
36 name(const UT_StringRef &key) qualifier \
38 return Parent::name(UTmakeUnsafeRef(key)); \
61 template <
typename InputIt>
68 {
return Parent::erase(pos); }
70 {
return Parent::erase(first, last); }
80 {
return count(ref) > 0; }
99 *
this = std::move(result);
117 {
return Parent::erase(pos); }
119 {
return Parent::erase(first, last); }
133 {
return count(ref) > 0; }
135 template <
typename S>
139 [
this](
const auto v) {
return contains(
v); });
152 *
this = std::move(result);
160 #undef UT_STRINGREF_WRAPPER
161 #undef UT_STRINGREF_WRAPPER_RANGE
Parent::key_type key_type
UT_StringSet(std::initializer_list< UT_StringHolder > init)
Constructs a set from an initializer list.
Parent::key_equal key_equal
bool containsAll(const S &src) const
Parent::size_type size_type
Parent::size_type size_type
UT_StringSet & operator-=(const UT_StringSet &src)
Base::const_iterator const_iterator
bool contains(const UT_StringRef &ref) const
**But if you need a result
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
iterator erase(const_iterator first, const_iterator last)
UT_StringSet & operator|=(const UT_StringSet &src)
Set-wise boolean operations.
Base::value_type value_type
UT_SortedStringSet & operator&=(const UT_SortedStringSet &src)
Base::const_iterator const_iterator
Parent::const_iterator const_iterator
#define UT_STRINGREF_WRAPPER(return_type, name, qualifier)
Parent::const_iterator const_iterator
Base::key_equal key_equal
iterator erase(const_iterator pos)
__hostdev__ uint64_t last(uint32_t i) const
Parent::value_type value_type
UT_StringSet & operator&=(const UT_StringSet &src)
UT_StringSet(InputIt first, InputIt last)
Constructs a set from an iterator range.
iterator erase(const_iterator first, const_iterator last)
UT_SortedStringSet & operator-=(const UT_SortedStringSet &src)
iterator erase(const_iterator pos)
#define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier)
bool contains(const UT_StringRef &ref) const
bool containsAll(const S &src) const
UT_SortedStringSet & operator|=(const UT_SortedStringSet &src)
Set-wise boolean operations.
Parent::iterator iterator
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
Parent::iterator iterator
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.