24 #ifndef PXR_USD_PCP_NODE_H
25 #define PXR_USD_PCP_NODE_H
34 #include <hboost/iterator/iterator_facade.hpp>
35 #include <hboost/iterator/reverse_iterator.hpp>
87 return _nodeIdx == rhs._nodeIdx && _graph == rhs._graph;
93 return !(*
this == rhs);
105 return !(rhs < *
this);
117 return !(*
this < rhs);
166 const PcpPrimIndex_GraphRefPtr& subgraph,
const PcpArc&
arc,
322 : _graph(graph), _nodeIdx(idx)
325 size_t _GetNodeIndex()
const {
return _nodeIdx; }
327 inline size_t _GetParentIndex()
const;
328 inline size_t _GetOriginIndex()
const;
336 template <
typename HashState>
358 :
public hboost::iterator_facade<
359 PcpNodeRef_ChildrenIterator,
361 hboost::forward_traversal_tag,
379 bool equal(
const PcpNodeRef_ChildrenIterator& other)
const
383 return (_node == other._node && _index == other._index);
385 reference dereference()
const
387 return reference(_node._graph, _index);
406 :
public hboost::iterator_facade<
407 PcpNodeRef_ChildrenReverseIterator,
409 hboost::forward_traversal_tag,
431 bool equal(
const PcpNodeRef_ChildrenReverseIterator& other)
const
435 return (_node == other._node && _index == other._index);
437 reference dereference()
const
439 return reference(_node._graph, _index);
482 PcpNodeRef_ChildrenIterator
490 PcpNodeRef_ChildrenIterator
503 #endif // PXR_USD_PCP_NODE_H
PcpNodeRef::child_const_iterator IteratorType
PCP_API SdfPath GetPathAtIntroduction() const
Returns the path for this node's site when it was introduced.
PCP_API SdfPermission GetPermission() const
Get the site this node represents.
TfHashSet< PcpNodeRef, PcpNodeRef::Hash > PcpNodeRefHashSet
PCP_API void SetIsDueToAncestor(bool isDueToAncestor)
friend class PcpPrimIndex_Graph
PCP_API bool IsRootNode() const
Returns true if this node is the root node of the prim index graph.
bool operator<=(const PcpNodeRef &rhs) const
static IteratorType End(PcpNodeRef::child_const_range const &c)
friend class PcpNodeRef_PrivateChildrenConstReverseIterator
PCP_API PcpNodeRef InsertChild(const PcpLayerStackSite &site, const PcpArc &arc, PcpErrorBasePtr *error)
GLsizei const GLchar *const * path
PCP_API PcpNodeRef GetOriginRootNode() const
PCP_API void SetRestricted(bool restricted)
static IteratorType End(PcpNodeRef::child_const_range const &c)
friend class hboost::iterator_core_access
size_t PcpNodeRef::* UnspecifiedBoolType
Returns true if this is a valid node reference, false otherwise.
IMATH_HOSTDEVICE constexpr bool equal(T1 a, T2 b, T3 t) IMATH_NOEXCEPT
PcpNodeRef_ChildrenIterator child_const_iterator
static IteratorType Begin(PcpNodeRef::child_const_range const &c)
PCP_API int GetDepthBelowIntroduction() const
PCP_API bool operator<(const PcpNodeRef &rhs) const
PCP_API PcpNodeRef GetOriginNode() const
int PcpNode_GetNonVariantPathElementCount(const SdfPath &path)
PCP_API int GetSiblingNumAtOrigin() const
PCP_API void SetHasSymmetry(bool hasSymmetry)
std::shared_ptr< PcpErrorBase > PcpErrorBasePtr
std::shared_ptr< PcpErrorBase > PcpErrorBasePtr
TF_DECLARE_REF_PTRS(PcpPrimIndex_Graph)
PCP_API const PcpMapExpression & GetMapToRoot() const
PcpNodeRef_ChildrenIterator end(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.
PcpNodeRef_ChildrenReverseIterator child_const_reverse_iterator
PCP_API child_const_range GetChildrenRange() const
PCP_API PcpNodeRef GetParentNode() const
size_t operator()(const PcpNodeRef &rhs) const
PCP_API bool IsCulled() const
Get the site this node represents.
PCP_API bool IsDueToAncestor() const
Get the site this node represents.
bool operator!=(const PcpNodeRef &rhs) const
PCP_API const SdfPath & GetPath() const
Returns the path for the site this node represents.
bool operator>(const PcpNodeRef &rhs) const
PCP_API void SetInert(bool inert)
friend class hboost::iterator_core_access
PCP_API PcpLayerStackSite GetSite() const
Get the site this node represents.
friend class PcpNodeRef_PrivateChildrenConstIterator
PCP_API bool IsRestricted() const
Get the site this node represents.
PcpNodeRef::child_const_reverse_iterator IteratorType
constexpr size_t PCP_INVALID_INDEX
std::pair< child_const_iterator, child_const_iterator > child_const_range
PCP_API const PcpLayerStackRefPtr & GetLayerStack() const
Returns the layer stack for the site this node represents.
PCP_API PcpNodeRef GetRootNode() const
Walk up to the root node of this expression.
PCP_API bool CanContributeSpecs() const
Pcp_CompressedSdSite GetCompressedSdSite(size_t layerIndex) const
PCP_API const PcpMapExpression & GetMapToParent() const
PCP_API int GetNamespaceDepth() const
GLfloat GLfloat GLfloat GLfloat h
size_t hash_value(const PcpNodeRef &x)
std::vector< PcpNodeRef > PcpNodeRefVector
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
PcpPrimIndex_Graph * GetOwningGraph() const
Returns the graph that this node belongs to.
#define PXR_NAMESPACE_CLOSE_SCOPE
PCP_API bool HasSpecs() const
Get the site this node represents.
GA_API const UT_StringHolder arc
PCP_API void * GetUniqueIdentifier() const
Returns a value that uniquely identifies this node.
PCP_API bool IsInert() const
Get the site this node represents.
PCP_API PcpArcType GetArcType() const
Returns the type of arc connecting this node to its parent node.
PCP_API PcpNodeRef_ChildrenReverseIterator()
Constructs an invalid iterator.
static IteratorType Begin(PcpNodeRef::child_const_range const &c)
void TfHashAppend(HashState &h, const PcpNodeRef &x)
Typedefs and support functions.
PCP_API SdfPath GetIntroPath() const
PCP_API void SetCulled(bool culled)
PCP_API void SetHasSpecs(bool hasSpecs)
bool operator==(const PcpNodeRef &rhs) const
Returns true if this references the same node as rhs.
PCP_API PcpNodeRef_ChildrenIterator()
Constructs an invalid iterator.
PCP_API PcpNodeRef InsertChildSubgraph(const PcpPrimIndex_GraphRefPtr &subgraph, const PcpArc &arc, PcpErrorBasePtr *error)
bool operator>=(const PcpNodeRef &rhs) const
PCP_API void SetPermission(SdfPermission perm)
PCP_API bool HasSymmetry() const
Get the site this node represents.
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.