7 #ifndef PXR_EXEC_VDF_CONNECTOR_MAP_H
8 #define PXR_EXEC_VDF_CONNECTOR_MAP_H
33 template <
typename Connector>
37 using _Pair = std::pair<TfToken, Connector*>;
121 return _vec == x._vec;
125 return _vec != x._vec;
137 template <
typename... Args>
138 std::pair<const_iterator, bool>
147 template <
typename Connector>
161 template <
typename Connector>
162 template <
typename... Args>
163 std::pair<typename VdfConnectorMap<Connector>::const_iterator,
bool>
170 _vec.emplace_back(k,
new Connector(std::forward<Args>(
args)...));
171 return {std::prev(
end()),
true};
174 template <
typename Connector>
178 for (
const auto &[_, connector] : _vec) {
std::pair< const_iterator, bool > try_emplace(const key_type &k, Args &&...args)
const_reverse_iterator rbegin() const
Returns a const_reverse_iterator pointing to the beginning of the map.
VdfConnectorMap(size_t n)
typename _Vector::const_reverse_iterator const_reverse_iterator
reverse_iterator rbegin()
void swap(VdfConnectorMap &x)
Swaps the contents of this map with x.
const_iterator find(const key_type &k) const
Finds the element with key k.
void reserve(size_type newCapacity)
#define PXR_NAMESPACE_OPEN_SCOPE
std::ptrdiff_t difference_type
bool operator!=(const VdfConnectorMap &x) const
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
size_type size() const
Returns the size of the map.
typename _Vector::const_iterator iterator
~VdfConnectorMap()
Destroys all connector instances owned by this map.
std::reverse_iterator< const_iterator > const_reverse_iterator
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.
friend void swap(VdfConnectorMap &lhs, VdfConnectorMap &rhs)
Swaps the contents of lhs and rhs.
typename _Vector::const_iterator const_iterator
typename _Vector::const_reverse_iterator reverse_iterator
#define PXR_NAMESPACE_CLOSE_SCOPE
**If you just want to fire and args
bool empty() const
Returns true if the map's size is 0.
const _Pair * const_iterator
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the map.
const_iterator end() const
Returns a const_iterator pointing to the end of the map.
bool operator==(const VdfConnectorMap &x) const
Test two maps for equality.
const _Pair & const_reference
VdfConnectorMap()=default
Creates an empty vector.
void swap(TfSmallVector &rhs)
const_reverse_iterator rend() const
Returns a const_reverse_iterator pointing to the end of the map.
typename _Vector::size_type size_type
typename _Vector::difference_type difference_type