9 #ifndef __PDG_ATTRIBUTE_SPLIT_H__
10 #define __PDG_ATTRIBUTE_SPLIT_H__
33 template <
typename Value>
51 template <
typename Attribute>
58 bool save_missing =
true)
60 bool conflict =
false;
61 for (
auto&& work_item : work_items)
63 auto&&
ref = work_item->attributes().refRO<
Attribute>(attrib_name);
64 if (!
ref || !
ref->valid(0))
69 missing_items.
append(work_item);
73 typename Attribute::Data
value =
ref->value(0);
74 auto&& iter = split.
find(value);
75 if (iter == split.
end())
77 unique_values.append(value);
78 split[
value].append(work_item);
82 iter->second.append(work_item);
92 static bool splitWorkItems(
93 StringSplitMap&
split,
99 bool save_missing =
true,
100 bool partial_match =
false);
GLsizei const GLfloat * value
static bool splitWorkItems(SplitMap< typename Attribute::Data > &split, PDG_WorkItemArray &missing_items, typename Attribute::Array &unique_values, const PDG_WorkItemArray &work_items, const UT_StringHolder &attrib_name, bool save_missing=true)
UT::ArraySet< std::pair< Key, T >, MULTI, MAX_LOAD_FACTOR_256, Clearer, MapKeyHash< Hash, Key, T >, MapKeyEqual< KeyEqual, Key, T > >::end iterator end()
Returns a non-const end iterator for the set.
iterator find(const Key &key)
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER class IMF_EXPORT_TEMPLATE_TYPE Array
void OIIO_UTIL_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)