24 #ifndef PXR_IMAGING_HD_DATASOURCELOCATOR_H
25 #define PXR_IMAGING_HD_DATASOURCELOCATOR_H
140 HdDataSourceLocator
Append(
const HdDataSourceLocator &locator)
const;
148 HdDataSourceLocator
Prepend(
const HdDataSourceLocator &locator)
const;
154 bool HasPrefix(
const HdDataSourceLocator &prefix)
const;
160 HdDataSourceLocator
GetCommonPrefix(
const HdDataSourceLocator &other)
const;
167 const HdDataSourceLocator &oldPrefix,
168 const HdDataSourceLocator &newPrefix)
const;
175 bool Intersects(
const HdDataSourceLocator &other)
const;
177 inline bool operator==(
const HdDataSourceLocator &rhs)
const {
178 return _tokens == rhs._tokens;
181 inline bool operator!=(
const HdDataSourceLocator &rhs)
const {
182 return _tokens != rhs._tokens;
187 bool operator<(
const HdDataSourceLocator &rhs)
const;
190 return _tokens.
empty();
199 template <
class HashState>
201 h.AppendContiguous(myObj._tokens.
data(), myObj._tokens.
size());
204 inline size_t Hash()
const;
208 _TokenVector _tokens;
256 const std::initializer_list<const HdDataSourceLocator> &l);
288 return _locators == rhs._locators;
292 return !(*
this == rhs);
341 class IntersectionIterator;
342 class IntersectionView;
391 , _iterator(iterator)
402 return std::addressof(**
this);
413 return _iterator == other._iterator;
418 return _iterator != other._iterator;
452 #endif // PXR_IMAGING_HD_DATASOURCELOCATOR_H
HD_API bool Intersects(const HdDataSourceLocator &other) const
const IntersectionIterator & end() const
friend void TfHashAppend(HashState &h, HdDataSourceLocator const &myObj)
HD_API const HdDataSourceLocator & operator*() const
bool operator==(const HdDataSourceLocator &rhs) const
HD_API HdDataSourceLocator Append(const TfToken &name) const
Appends name to this data source locator.
HD_API bool Intersects(const HdDataSourceLocator &locator) const
HdDataSourceLocatorSet()
The empty set.
HD_API HdDataSourceLocator ReplacePrefix(const HdDataSourceLocator &oldPrefix, const HdDataSourceLocator &newPrefix) const
std::forward_iterator_tag iterator_category
HD_API const TfToken & GetElement(size_t i) const
GLsizei const GLchar *const * string
std::ptrdiff_t difference_type
HD_API const TfToken & GetFirstElement() const
Returns the first element, or empty token if none.
HD_API std::string GetString(const char *delimiter="/") const
IntersectionIterator(const bool isFirst, const const_iterator &iterator, const const_iterator &end, const HdDataSourceLocator &locator)
typename _Locators::const_iterator const_iterator
HD_API bool IsEmpty() const
True if and only if this set contains no data source locator.
HD_API bool Contains(const HdDataSourceLocator &locator) const
bool operator!=(const HdDataSourceLocator &rhs) const
HD_API IntersectionView Intersection(const HdDataSourceLocator &locator) const
HD_API void append(const HdDataSourceLocator &locator)
HdDataSourceLocatorSet & operator=(HdDataSourceLocatorSet &&rhs)=default
Move assignment operator.
HD_API const TfToken & GetLastElement() const
Returns the last element, or empty token if none.
HD_API HdDataSourceLocator RemoveLastElement() const
bool operator==(const IntersectionIterator &other) const noexcept
HD_API HdDataSourceLocatorSet ReplacePrefix(const HdDataSourceLocator &oldPrefix, const HdDataSourceLocator &newPrefix) const
HD_API std::ostream & operator<<(std::ostream &out, const HdDataSourceLocator &self)
HD_API HdDataSourceLocator Prepend(const TfToken &name) const
Prepends name to this data source locator.
HD_API IntersectionIterator & operator++()
IntersectionView(const IntersectionIterator &begin, const IntersectionIterator &end)
static HD_API const HdDataSourceLocatorSet & UniversalSet()
The set containing everything.
const HdDataSourceLocator * operator->() const
GLuint const GLchar * name
HD_API bool HasPrefix(const HdDataSourceLocator &prefix) const
HD_API const_iterator begin() const
GLfloat GLfloat GLfloat GLfloat h
HD_API bool operator<(const HdDataSourceLocator &rhs) const
Lexicographic order. If y has x as prefix, x < y.
HD_API void insert(const HdDataSourceLocator &locator)
HD_API const_iterator end() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HD_API HdDataSourceLocator ReplaceLastElement(const TfToken &name) const
bool operator!=(const IntersectionIterator &other) const noexcept
SIM_API const UT_StringHolder position
#define PXR_NAMESPACE_CLOSE_SCOPE
HdDataSourceLocator * iterator
HD_API HdDataSourceLocator RemoveFirstElement() const
bool operator!=(const HdDataSourceLocatorSet &rhs) const
static HD_API const HdDataSourceLocator & EmptyLocator()
bool operator==(const HdDataSourceLocatorSet &rhs) const
HD_API HdDataSourceLocator()
const HdDataSourceLocator * const_iterator
HD_API HdDataSourceLocator GetCommonPrefix(const HdDataSourceLocator &other) const
const IntersectionIterator & begin() const
HD_API size_t GetElementCount() const
Returns the number of elements (tokens) in this data source.