13 #ifndef __UT_ArrayStringMap_h__
14 #define __UT_ArrayStringMap_h__
25 #define UT_STRINGREF_WRAPPER(return_type, name, qualifier) \
26 SYS_FORCE_INLINE return_type name(const UT_StringRef &key) qualifier \
28 return Parent::name(UTmakeUnsafeRef(key)); \
33 #define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier) \
34 SYS_FORCE_INLINE std::pair<iterator_type, iterator_type> \
35 name(const UT_StringRef &key) qualifier \
37 return Parent::name(UTmakeUnsafeRef(key)); \
42 template <
typename ITEM_T>
59 #if 0 // The parent function isn't fully implemented yet.
79 auto&& iter =
find(key);
82 return std::make_pair(iter,
false);
86 auto&& iter =
find(key);
89 return std::make_pair(iter,
false);
93 auto&& iter =
find(key);
96 return std::make_pair(iter,
false);
100 auto&& iter =
find(key);
103 return std::make_pair(iter,
false);
105 std::pair<iterator, bool>
insert(
const char *key,
const ITEM_T &
val)
109 std::pair<iterator, bool>
insert(
const char *key, ITEM_T &&
val)
117 template<
typename ITEM_T>
119 :
public DefaultClearer<typename UT_ArrayStringMap<ITEM_T>::Parent>
123 #undef UT_STRINGREF_WRAPPER
124 #undef UT_STRINGREF_WRAPPER_RANGE
ITEM_T & at(const UT_StringHolder &key)
bool contains(const UT_StringHolder &key) const
std::pair< iterator, bool > insert(const UT_StringRef &key, const ITEM_T &val)
std::pair< iterator, bool > insert(const UT_StringRef &key, ITEM_T &&val)
std::pair< iterator, bool > insert(const char *key, ITEM_T &&val)
std::pair< const_iterator, const_iterator > equal_range(const UT_StringHolder &key) const
iterator end()
Returns a non-const end iterator for the set.
iterator find(const UT_StringHolder &key)
Parent::const_iterator const_iterator
typename set_type::size_type size_type
Parent::iterator iterator
size_type erase(const UT_StringHolder &key)
UT::ArrayMap< UT_StringHolder, ITEM_T > Parent
std::pair< iterator, bool > insert(const char *key, const ITEM_T &val)
__hostdev__ uint64_t last(uint32_t i) const
#define UT_STRINGREF_WRAPPER(return_type, name, qualifier)
typename set_type::iterator iterator
Inherit iterator and const_iterator.
std::pair< iterator, bool > insert(UT_StringRef &&key, const ITEM_T &val)
iterator erase(iterator pos)
std::pair< iterator, bool > insert(UT_StringRef &&key, ITEM_T &&val)
Parent::size_type size_type
typename set_type::const_iterator const_iterator
#define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier)