HdDataSourceLocatorSet Class Reference

Represents a set of data source locators closed under descendancy. More...

Public Types

using const_iterator = typename _Locators::const_iterator
 

Public Member Functions

HD_API HdDataSourceLocatorSet (const HdDataSourceLocator &locator)
 
HD_API HdDataSourceLocatorSet (const std::initializer_list< const HdDataSourceLocator > &l)
 
 HdDataSourceLocatorSet (const HdDataSourceLocatorSet &rhs)=default
 Copy Ctor. More...
 
 HdDataSourceLocatorSet (HdDataSourceLocatorSet &&rhs)=default
 Move Ctor. More...
 
HdDataSourceLocatorSetoperator= (HdDataSourceLocatorSet &&rhs)=default
 Move assignment operator. More...
 
HdDataSourceLocatorSetoperator= (const HdDataSourceLocatorSet &rhs)=default
 Copy assignment operator. More...
 
HD_API void insert (const HdDataSourceLocator &locator)
 
HD_API void insert (const HdDataSourceLocatorSet &locatorSet)
 Changes this set to be the union of this set and the given set. More...
 
HD_API void append (const HdDataSourceLocator &locator)
 append() is semantically equivalent to insert(), but works much faster if locator would be added to the end of the set, lexicographically. More...
 
bool operator== (const HdDataSourceLocatorSet &rhs) const
 
bool operator!= (const HdDataSourceLocatorSet &rhs) const
 
HD_API const_iterator begin () const
 Iterates through minimal, lexicographically sorted list of data source locators generating this set. More...
 
HD_API const_iterator end () const
 
HD_API bool Intersects (const HdDataSourceLocator &locator) const
 True if and only if locator or any of its descendants is in the set (closed under descendancy). More...
 
HD_API bool Intersects (const HdDataSourceLocatorSet &locatorSet) const
 True if and only if the two sets (closed under descendancy) intersect. More...
 
HD_API bool IsEmpty () const
 True if and only if this set contains no data source locator. More...
 
HD_API bool Contains (const HdDataSourceLocator &locator) const
 True if the set (closed under descendancy) contains the given locator. More...
 

Detailed Description

Represents a set of data source locators closed under descendancy.

That is, if a data source locator x is in the set (that is HdDataSourceLocatorSet::Contains returns true), then every data source locator y that has x as a prefix is implicitly also assumed to be in the set.

In particular, the data source locator set <x, y> generated by x and y is equivalent to (and will be simplified to) just <x> if x is a prefix of y.

Note that HdDataSourceLocatorSet{HdDataSourceLocator()} is the universal set containing every data source locator.

Definition at line 231 of file dataSourceLocator.h.

Constructor & Destructor Documentation

◆ HdDataSourceLocatorSet() [1/2]

Copy Ctor.

◆ HdDataSourceLocatorSet() [2/2]

Move Ctor.

Member Function Documentation

◆ append()

HD_API void append ( const HdDataSourceLocator locator)

append() is semantically equivalent to insert(), but works much faster if locator would be added to the end of the set, lexicographically.

◆ begin()

HD_API const_iterator begin ( ) const

Iterates through minimal, lexicographically sorted list of data source locators generating this set.

◆ Contains()

HD_API bool Contains ( const HdDataSourceLocator locator) const

True if the set (closed under descendancy) contains the given locator.

In other words, a prefix of the locator is a generator of the set in the sense of HdDataSourceLocator::HasPrefix.

◆ insert()

HD_API void insert ( const HdDataSourceLocatorSet locatorSet)

Changes this set to be the union of this set and the given set.

◆ Intersects() [1/2]

HD_API bool Intersects ( const HdDataSourceLocator locator) const

True if and only if locator or any of its descendants is in the set (closed under descendancy).

In other words, true if and only if there is a generator of this set that intersects the given locator in the sense of HdDataSourceLocator::Intersects.

◆ Intersects() [2/2]

HD_API bool Intersects ( const HdDataSourceLocatorSet locatorSet) const

True if and only if the two sets (closed under descendancy) intersect.

In other words, true if and only if there is a generator x in this set and a generator y in the given set such that x and y intersect in the sense of HdDataSourceLocator::Intersects. That is, one of the two sets contains a prefix of the other set.

◆ IsEmpty()

HD_API bool IsEmpty ( ) const

True if and only if this set contains no data source locator.

◆ operator=() [1/2]

HdDataSourceLocatorSet& operator= ( HdDataSourceLocatorSet &&  rhs)
default

Move assignment operator.

◆ operator=() [2/2]

HdDataSourceLocatorSet& operator= ( const HdDataSourceLocatorSet rhs)
default

Copy assignment operator.


The documentation for this class was generated from the following file: