HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdDataSourceLocatorSet Class Reference

#include <dataSourceLocator.h>

Classes

class  IntersectionIterator
 
class  IntersectionView
 

Public Types

using const_iterator = typename _Locators::const_iterator
 

Public Member Functions

 HdDataSourceLocatorSet ()
 The empty set. More...
 
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...
 
HdDataSourceLocatorSet & operator= (HdDataSourceLocatorSet &&rhs)=default
 Move assignment operator. More...
 
HdDataSourceLocatorSet & operator= (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 insert (HdDataSourceLocatorSet &&locatorSet)
 Changes this set to be the union of this set and the given set. More...
 
HD_API void append (const HdDataSourceLocator &locator)
 
bool operator== (const HdDataSourceLocatorSet &rhs) const
 
bool operator!= (const HdDataSourceLocatorSet &rhs) const
 
HD_API const_iterator begin () const
 
HD_API const_iterator end () const
 
HD_API bool Intersects (const HdDataSourceLocator &locator) const
 
HD_API bool Intersects (const HdDataSourceLocatorSet &locatorSet) const
 
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
 
HD_API HdDataSourceLocatorSet ReplacePrefix (const HdDataSourceLocator &oldPrefix, const HdDataSourceLocator &newPrefix) const
 
HD_API IntersectionView Intersection (const HdDataSourceLocator &locator) const
 

Static Public Member Functions

static HD_API const
HdDataSourceLocatorSet & 
UniversalSet ()
 The set containing everything. 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 250 of file dataSourceLocator.h.

Member Typedef Documentation

Constructor & Destructor Documentation

HdDataSourceLocatorSet::HdDataSourceLocatorSet ( )
inline

The empty set.

Definition at line 258 of file dataSourceLocator.h.

HD_API HdDataSourceLocatorSet::HdDataSourceLocatorSet ( const HdDataSourceLocator &  locator)
HD_API HdDataSourceLocatorSet::HdDataSourceLocatorSet ( const std::initializer_list< const HdDataSourceLocator > &  l)
HdDataSourceLocatorSet::HdDataSourceLocatorSet ( const HdDataSourceLocatorSet &  rhs)
default

Copy Ctor.

HdDataSourceLocatorSet::HdDataSourceLocatorSet ( HdDataSourceLocatorSet &&  rhs)
default

Move Ctor.

Member Function Documentation

HD_API void HdDataSourceLocatorSet::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.

HD_API const_iterator HdDataSourceLocatorSet::begin ( ) const

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

HD_API bool HdDataSourceLocatorSet::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.

HD_API const_iterator HdDataSourceLocatorSet::end ( ) const
HD_API void HdDataSourceLocatorSet::insert ( const HdDataSourceLocator &  locator)
HD_API void HdDataSourceLocatorSet::insert ( const HdDataSourceLocatorSet &  locatorSet)

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

HD_API void HdDataSourceLocatorSet::insert ( HdDataSourceLocatorSet &&  locatorSet)

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

HD_API IntersectionView HdDataSourceLocatorSet::Intersection ( const HdDataSourceLocator &  locator) const

Returns intersection with a locator as a range-like object so that it can be used in a for-loop.

Every element in the intersection has locator as a prefix.

Examples: Intersection of { primvars:color } with primvars is { primvars:color }. Intersection of { primvars:color } with primvars:color:interpolation is { primvars:color:interpolation }.

HD_API bool HdDataSourceLocatorSet::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.

HD_API bool HdDataSourceLocatorSet::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.

HD_API bool HdDataSourceLocatorSet::IsEmpty ( ) const

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

bool HdDataSourceLocatorSet::operator!= ( const HdDataSourceLocatorSet &  rhs) const
inline

Definition at line 305 of file dataSourceLocator.h.

HdDataSourceLocatorSet& HdDataSourceLocatorSet::operator= ( HdDataSourceLocatorSet &&  rhs)
default

Move assignment operator.

HdDataSourceLocatorSet& HdDataSourceLocatorSet::operator= ( const HdDataSourceLocatorSet &  rhs)
default

Copy assignment operator.

bool HdDataSourceLocatorSet::operator== ( const HdDataSourceLocatorSet &  rhs) const
inline

Definition at line 301 of file dataSourceLocator.h.

HD_API HdDataSourceLocatorSet HdDataSourceLocatorSet::ReplacePrefix ( const HdDataSourceLocator &  oldPrefix,
const HdDataSourceLocator &  newPrefix 
) const

Returns a lexicographically sorted locator set wherein locators in this set that have oldPrefix as a prefix use newPrefix instead. The returned set is closed under descendancy and may have equal or fewer data source locators as a result.

static HD_API const HdDataSourceLocatorSet& HdDataSourceLocatorSet::UniversalSet ( )
static

The set containing everything.


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