HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pathNode.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_SDF_PATH_NODE_H
25 #define PXR_USD_SDF_PATH_NODE_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/usd/sdf/api.h"
29 #include "pxr/base/tf/token.h"
30 #include "pxr/base/tf/mallocTag.h"
31 
32 #include <hboost/noncopyable.hpp>
33 #include <hboost/intrusive_ptr.hpp>
34 
35 #include <tbb/atomic.h>
36 
38 
39 // Sdf_PathNode
40 //
41 // This class is the root of the path node hierarchy. It used to use ordinary
42 // C++ polymorphism, but it no longer does. This is primarily a space
43 // optimization: the set of node types is fixed, we already have an enum 'type'
44 // field, and we typically have lots (e.g. ~1e8) of these objects. Dropping the
45 // C++ polymorphism saves us the vtable pointer, and we can pack the '_nodeType'
46 // field in a much smaller space with other flags.
47 //
48 // We currently store PathNode objects in two prefix trees. The "prim like"
49 // path nodes (the root nodes '/' and '.', prim path nodes, and prim variant
50 // selection nodes are in one prefix tree, and the "property like" nodes are in
51 // another prefix tree (prim property nodes, target nodes, expression nodes,
52 // mapper arg nodes). We do this because there are far fewer unique property
53 // nodes (generally) than there are prim nodes. We allocate these in Sdf_Pools,
54 // so that the SdfPath class can store a handle to an element in each tree in 64
55 // bits total. (Sdf_Pool is designed so that we can refer to objects in memory
56 // using 32-bit indexes instead of 64-bit pointers). An SdfPath joins together
57 // these two elements to form a whole path. For example, the path
58 // '/Foo/Bar.attr' would store a prim-part handle to the '/Foo/Bar' node, and a
59 // property-part handle to 'attr'.
60 //
61 class Sdf_PathNode {
62  Sdf_PathNode(Sdf_PathNode const &) = delete;
63  Sdf_PathNode &operator=(Sdf_PathNode const &) = delete;
64 public:
65  // Node types identify what kind of path node a given instance is.
66  // There are restrictions on what type of children each node type
67  // can have,
68  enum NodeType {
69 
70  /********************************************************/
71  /******************************* Prim portion nodes *****/
72 
74  // Allowable child node types:
75  // PrimNode
76  // PrimPropertyNode (only for relative root)
77  // PrimVariantSelectionNode (only for relative root)
78 
80  // Allowable child node types:
81  // PrimNode
82  // PrimPropertyNode
83  // PrimVariantSelectionNode
84 
86  // Allowable child node types:
87  // PrimNode
88  // PrimPropertyNode
89  // PrimVariantSelectionNode
90  // (for variants that contain variant sets)
91 
92  /********************************************************/
93  /******************************* Property portion nodes */
94 
96  // Allowable child node types:
97  // TargetNode
98  // MapperNode
99  // ExpressionNode
100 
102  // Allowable child node types:
103  // RelationalAttributeNode (only if parent is PrimPropertyNode)
104 
106  // Allowable child node types:
107  // MapperArgNode
108 
110  // Allowable child node types:
111  // TargetNode
112  // MapperNode
113  // ExpressionNode
114 
116  // Allowable child node types:
117  // <none>
118 
120  // Allowable child node types:
121  // <none>
122 
123  NumNodeTypes ///< Internal sentinel value
124  };
125 
127  FindOrCreatePrim(Sdf_PathNode const *parent, const TfToken &name);
128 
130  FindOrCreatePrimProperty(Sdf_PathNode const *parent, const TfToken &name);
131 
134  const TfToken &variantSet,
135  const TfToken &variant);
136 
138  FindOrCreateTarget(Sdf_PathNode const *parent,
139  SdfPath const &targetPath);
140 
143  const TfToken &name);
144 
146  FindOrCreateMapper(Sdf_PathNode const *parent, SdfPath const &targetPath);
147 
149  FindOrCreateMapperArg(Sdf_PathNode const *parent, const TfToken &name);
150 
152  FindOrCreateExpression(Sdf_PathNode const *parent);
153 
154  static Sdf_PathNode const *GetAbsoluteRootNode();
155  static Sdf_PathNode const *GetRelativeRootNode();
156 
157  NodeType GetNodeType() const { return NodeType(_nodeType); }
158 
159  static std::pair<Sdf_PathNode const *, Sdf_PathNode const *>
161  Sdf_PathNode const *b,
162  bool stopAtRootPrim);
163 
164  // This method returns a node pointer
165  Sdf_PathNode const *GetParentNode() const { return _parent.get(); }
166 
167  size_t GetElementCount() const { return size_t(_elementCount); }
168  bool IsAbsolutePath() const { return _isAbsolute; }
169  bool IsAbsoluteRoot() const { return (_isAbsolute) & (!_elementCount); }
170  bool ContainsTargetPath() const { return _containsTargetPath; }
171  bool IsNamespaced() const {
172  return (_nodeType == PrimPropertyNode ||
173  _nodeType == RelationalAttributeNode) && _IsNamespacedImpl();
174  }
175 
177  return _containsPrimVariantSelection;
178  }
179 
180  // For PrimNode, PrimPropertyNode, RelationalAttributeNode, and
181  // MapperArgNode this is the name (with no "dot" for
182  // properties/relational attributes/mapper args). For others, it
183  // is EmptyToken.
184  inline const TfToken &GetName() const;
185 
186  // For TargetNode and MapperNode this is the target path.
187  // For others, it is InvalidPath.
188  inline const SdfPath &GetTargetPath() const;
189 
190  typedef std::pair<TfToken, TfToken> VariantSelectionType;
191  inline const VariantSelectionType& GetVariantSelection() const;
192 
193  // Returns the path element string (".name" for properties, "[path]" for
194  // targets, etc...)
195  inline TfToken GetElement() const;
196 
197  // Append this element's text (same as GetElement()) to \p str.
198  void AppendText(std::string *str) const;
199 
200  // Return the stringified path to this node as a TfToken.
201  SDF_API static const TfToken &
202  GetPathToken(Sdf_PathNode const *primPart, Sdf_PathNode const *propPart);
203 
204  // Lexicographic ordering for Compare().
205  struct LessThan {
206  template <class T>
207  inline bool operator()(T const &a, T const &b) const {
208  return a < b;
209  }
210  };
211 
212  // This operator only works properly when the rhs has the same parent
213  // as this node.
214  template <class Less>
215  inline bool Compare(const Sdf_PathNode &rhs) const;
216 
217  // Return the current ref-count.
218  // Meant for diagnostic use.
219  unsigned int GetCurrentRefCount() const { return _refCount; }
220 
221 protected:
222  Sdf_PathNode(Sdf_PathNode const *parent, NodeType nodeType)
223  : _parent(parent)
224  , _refCount(1)
225  , _elementCount(parent ? parent->_elementCount + 1 : 1)
226  , _nodeType(nodeType)
227  , _isAbsolute(parent && parent->IsAbsolutePath())
228  , _containsPrimVariantSelection(
229  nodeType == PrimVariantSelectionNode ||
230  (parent && parent->_containsPrimVariantSelection))
231  , _containsTargetPath(nodeType == TargetNode ||
232  nodeType == MapperNode ||
233  (parent && parent->_containsTargetPath))
234  , _hasToken(false)
235  {}
236 
237  // This constructor is used only to create the two special root nodes.
238  explicit Sdf_PathNode(bool isAbsolute);
239 
241  if (_hasToken)
243  }
244 
245  // Helper to downcast and destroy the dynamic type of this object -- this is
246  // required since this class hierarchy doesn't use normal C++ polymorphism
247  // for space reasons.
248  inline void _Destroy() const;
249 
250  // // Helper function for GetPathToken, which lazily creates its token
251  static TfToken _CreatePathToken(Sdf_PathNode const *primPart,
252  Sdf_PathNode const *propPart);
253 
254  // Helper for dtor, removes this path node's token from the token table.
255  SDF_API void _RemovePathTokenFromTable() const;
256 
257  struct _EqualElement {
258  template <class T>
259  inline bool operator()(T const &a, T const &b) const {
260  return a == b;
261  }
262  };
263 
265 
266  // Ref-counting ops manage _refCount.
267  friend void intrusive_ptr_add_ref(const Sdf_PathNode*);
268  friend void intrusive_ptr_release(const Sdf_PathNode*);
269 
270 private:
271  // Downcast helper, just sugar to static_cast this to Derived const *.
272  template <class Derived>
273  Derived const *_Downcast() const {
274  return static_cast<Derived const *>(this);
275  }
276 
277  // Helper to scan this node's name for the property namespace delimiter.
278  bool _IsNamespacedImpl() const;
279 
280  // Helper to return a const lvalue variant selection.
281  VariantSelectionType const &_GetEmptyVariantSelection() const;
282 
283  // Instance variables. PathNode's size is important to keep small. Please
284  // be mindful of that when making any changes here.
285  const Sdf_PathNodeConstRefPtr _parent;
286  mutable tbb::atomic<unsigned int> _refCount;
287 
288  const short _elementCount;
289  const unsigned char _nodeType;
290  const bool _isAbsolute:1;
291  const bool _containsPrimVariantSelection:1;
292  const bool _containsTargetPath:1;
293 
294  // This is racy -- we ensure that the token creation code carefully
295  // synchronizes so that if we read 'true' from this flag, it guarantees that
296  // there's a token for this path node in the token table. If we read
297  // 'false' it means there may or may not be, unless we're in the destructor,
298  // which must run exclusively, then reading 'false' guarantees there is no
299  // token in the table. We use this flag to do that optimization in the
300  // destructor so we can avoid looking in the table in the case where we
301  // haven't created a token.
302  mutable bool _hasToken:1;
303 };
304 
306 public:
307  using Sdf_PathNode::Sdf_PathNode;
308  SDF_API void operator delete (void *p);
309 };
310 
312 public:
313  using Sdf_PathNode::Sdf_PathNode;
314  SDF_API void operator delete (void *p);
315 };
316 
318 public:
319  typedef bool ComparisonType;
321 
322  static SDF_API Sdf_PathNode const *New(bool isAbsolute);
323 
324 private:
325  // This constructor is used only to create the two special root nodes.
326  Sdf_RootPathNode(bool isAbsolute) : Sdf_PrimPartPathNode(isAbsolute) {}
327 
328  ComparisonType _GetComparisonValue() const {
329  // Root nodes, there are only two, one absolute and one relative.
330  // (absolute < relative...)
331  return !IsAbsolutePath();
332  }
333 
334  friend class Sdf_PathNode;
335  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
336 };
337 
339 public:
342 
343 private:
344  Sdf_PrimPathNode(Sdf_PathNode const *parent,
345  const TfToken &name)
346  : Sdf_PrimPartPathNode(parent, nodeType)
347  , _name(name) {}
348 
350 
351  const ComparisonType &_GetComparisonValue() const { return _name; }
352 
353  friend class Sdf_PathNode;
355  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
356 
357  // Instance variables
358  TfToken _name;
359 };
360 
362 public:
365 
366 private:
368  const TfToken &name)
369  : Sdf_PropPartPathNode(parent, nodeType)
370  , _name(name) {}
371 
373 
374  friend class Sdf_PathNode;
376  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
377 
378  const ComparisonType &_GetComparisonValue() const { return _name; }
379 
380  // Instance variables
381  TfToken _name;
382 };
383 
385 public:
388 
389  const TfToken &_GetNameImpl() const;
390  void _AppendText(std::string *str) const;
391 
392 private:
394  const VariantSelectionType &variantSelection)
395  : Sdf_PrimPartPathNode(parent, nodeType)
396  , _variantSelection(new VariantSelectionType(variantSelection)) {}
397 
399 
400  const ComparisonType &_GetComparisonValue() const {
401  return *_variantSelection;
402  }
403 
404  friend class Sdf_PathNode;
406  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
407 
408  // Instance variables
409  std::unique_ptr<VariantSelectionType> _variantSelection;
410 };
411 
413 public:
416 
417  void _AppendText(std::string *str) const;
418 
419 private:
420  Sdf_TargetPathNode(Sdf_PathNode const *parent,
421  const SdfPath &targetPath)
422  : Sdf_PropPartPathNode(parent, nodeType)
423  , _targetPath(targetPath) {}
424 
426 
427  const ComparisonType& _GetComparisonValue() const { return _targetPath; }
428 
429  friend class Sdf_PathNode;
431  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
432 
433  // Instance variables
434  SdfPath _targetPath;
435 };
436 
438 public:
441 
442 private:
444  const TfToken &name)
445  : Sdf_PropPartPathNode(parent, nodeType)
446  , _name(name) {}
447 
449 
450  const ComparisonType& _GetComparisonValue() const { return _name; }
451 
452  friend class Sdf_PathNode;
454  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
455 
456  // Instance variables
457  TfToken _name;
458 };
459 
461 public:
464 
465  void _AppendText(std::string *str) const;
466 
467 private:
468  Sdf_MapperPathNode(Sdf_PathNode const *parent,
469  const SdfPath &targetPath)
470  : Sdf_PropPartPathNode(parent, nodeType)
471  , _targetPath(targetPath) {}
472 
474 
475  const ComparisonType& _GetComparisonValue() const { return _targetPath; }
476 
477  friend class Sdf_PathNode;
479  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
480 
481  // Instance variables
482  SdfPath _targetPath;
483 };
484 
486 public:
489 
490  void _AppendText(std::string *str) const;
491 
492 private:
493  Sdf_MapperArgPathNode(Sdf_PathNode const *parent,
494  const TfToken &name)
495  : Sdf_PropPartPathNode(parent, nodeType)
496  , _name(name) {}
497 
499 
500  const ComparisonType& _GetComparisonValue() const { return _name; }
501 
502  friend class Sdf_PathNode;
504  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
505 
506  // Instance variables
507  TfToken _name;
508 };
509 
511 public:
512  typedef void *ComparisonType;
514 
515  void _AppendText(std::string *str) const;
516 
517 private:
518  Sdf_ExpressionPathNode(Sdf_PathNode const *parent)
519  : Sdf_PropPartPathNode(parent, nodeType) {}
520 
522 
523  ComparisonType _GetComparisonValue() const { return nullptr; }
524 
525  friend class Sdf_PathNode;
527  template <int nodeType, class Comp> friend struct Sdf_PathNodeCompare;
528 
529  // Instance variables
530  // <none>
531 };
532 
533 template <int nodeType>
535 };
536 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::PrimNode> {
538 };
539 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::PrimPropertyNode> {
541 };
542 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::RelationalAttributeNode> {
544 };
545 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::MapperArgNode> {
547 };
548 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::TargetNode> {
550 };
551 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::MapperNode> {
553 };
554 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::PrimVariantSelectionNode> {
556 };
557 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::ExpressionNode> {
559 };
560 template <> struct Sdf_PathNodeTypeToType<Sdf_PathNode::RootNode> {
562 };
563 
564 template <int nodeType, class Comp>
566  inline bool operator()(const Sdf_PathNode &lhs,
567  const Sdf_PathNode &rhs) const {
569  return Comp()(static_cast<const Type&>(lhs)._GetComparisonValue(),
570  static_cast<const Type&>(rhs)._GetComparisonValue());
571  }
572 };
573 
574 template <class Comp>
575 inline bool
577 {
578  // Compare two nodes.
579  // We first compare types, then, if types match, we compare
580  // based on the type-specific content.
581  // Names are compared lexicographically.
582 
583  // Compare types. If node types are different use Comp() on them, otherwise
584  // continue to node-specific comparisons.
585 
586  NodeType nodeType = GetNodeType(), rhsNodeType = rhs.GetNodeType();
587  if (nodeType != rhsNodeType) {
588  return Comp()(nodeType, rhsNodeType);
589  }
590 
591  // Types are the same. Avoid virtual function calls for performance.
592  switch (nodeType) {
595  Comp>()(*this, rhs);
598  Comp>()(*this, rhs);
601  Comp>()(*this, rhs);
604  Comp>()(*this, rhs);
607  Comp>()(*this, rhs);
610  Comp>()(*this, rhs);
613  Comp>()(*this, rhs);
616  Comp>()(*this, rhs);
619  Comp>()(*this, rhs);
620  default:
621  TF_CODING_ERROR("Unhandled Sdf_PathNode::NodeType enumerant");
622  return false;
623  }
624 }
625 
626 inline void
628 {
629  // Note: This function deletes this object!
630  switch (_nodeType) {
631  case RootNode:
632  return delete _Downcast<Sdf_RootPathNode>();
633  case PrimNode:
634  return delete _Downcast<Sdf_PrimPathNode>();
635  case PrimPropertyNode:
636  return delete _Downcast<Sdf_PrimPropertyPathNode>();
638  return delete _Downcast<Sdf_PrimVariantSelectionNode>();
639  case TargetNode:
640  return delete _Downcast<Sdf_TargetPathNode>();
642  return delete _Downcast<Sdf_RelationalAttributePathNode>();
643  case MapperNode:
644  return delete _Downcast<Sdf_MapperPathNode>();
645  case MapperArgNode:
646  return delete _Downcast<Sdf_MapperArgPathNode>();
647  case ExpressionNode:
648  return delete _Downcast<Sdf_ExpressionPathNode>();
649  default:
650  return;
651  };
652 }
653 
654 inline const TfToken &
656 {
657  switch (_nodeType) {
658  default:
659  return SdfPathTokens->empty;
660  case RootNode:
661  return IsAbsolutePath() ?
662  SdfPathTokens->absoluteIndicator : SdfPathTokens->relativeRoot;
663  case PrimNode:
664  return _Downcast<Sdf_PrimPathNode>()->_name;
665  case PrimPropertyNode:
666  return _Downcast<Sdf_PrimPropertyPathNode>()->_name;
668  return _Downcast<Sdf_PrimVariantSelectionNode>()->_GetNameImpl();
670  return _Downcast<Sdf_RelationalAttributePathNode>()->_name;
671  case MapperArgNode:
672  return _Downcast<Sdf_MapperArgPathNode>()->_name;
673  case ExpressionNode:
674  return SdfPathTokens->expressionIndicator;
675  }
676 }
677 
678 inline const SdfPath &
680 {
681  switch (_nodeType) {
682  default:
683  return SdfPath::EmptyPath();
684  case TargetNode:
685  return _Downcast<Sdf_TargetPathNode>()->_targetPath;
686  case MapperNode:
687  return _Downcast<Sdf_MapperPathNode>()->_targetPath;
688  };
689 }
690 
693 {
694  if (ARCH_LIKELY(_nodeType == PrimVariantSelectionNode)) {
695  return *_Downcast<Sdf_PrimVariantSelectionNode>()->_variantSelection;
696  }
697  return _GetEmptyVariantSelection();
698 }
699 
700 inline TfToken
702 {
703  switch (_nodeType) {
704  case RootNode:
705  return TfToken();
706  case PrimNode:
707  return _Downcast<Sdf_PrimPathNode>()->_name;
708  default:
709  std::string str;
710  AppendText(&str);
711  return TfToken(str);
712  };
713 }
714 
715 /// Diagnostic output.
717 
718 inline void intrusive_ptr_add_ref(const PXR_NS::Sdf_PathNode* p) {
719  ++p->_refCount;
720 }
721 inline void intrusive_ptr_release(const PXR_NS::Sdf_PathNode* p) {
722  if (p->_refCount.fetch_and_decrement() == 1)
723  p->_Destroy();
724 }
725 
727 
728 #endif // PXR_USD_SDF_PATH_NODE_H
#define ARCH_LIKELY(x)
Definition: hints.h:46
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:478
unsigned int GetCurrentRefCount() const
Definition: pathNode.h:219
static Sdf_PathPropNodeHandle FindOrCreateTarget(Sdf_PathNode const *parent, SdfPath const &targetPath)
GLuint const GLchar * name
Definition: glew.h:1814
SdfPath ComparisonType
Definition: pathNode.h:414
static TfToken _CreatePathToken(Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
void _AppendText(std::string *str) const
static Sdf_PathNode const * GetAbsoluteRootNode()
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:9477
void _AppendText(std::string *str) const
static Sdf_PathPropNodeHandle FindOrCreateExpression(Sdf_PathNode const *parent)
bool ContainsPrimVariantSelection() const
Definition: pathNode.h:176
#define TF_CODING_ERROR
std::pair< TfToken, TfToken > VariantSelectionType
Definition: pathNode.h:190
void _Destroy() const
Definition: pathNode.h:627
void AppendText(std::string *str) const
TfToken ComparisonType
Definition: pathNode.h:487
static const NodeType nodeType
Definition: pathNode.h:320
static Sdf_PathPropNodeHandle FindOrCreateMapperArg(Sdf_PathNode const *parent, const TfToken &name)
Sdf_PathNode(Sdf_PathNode const *parent, NodeType nodeType)
Definition: pathNode.h:222
static Sdf_PathPropNodeHandle FindOrCreatePrimProperty(Sdf_PathNode const *parent, const TfToken &name)
static Sdf_PathPropNodeHandle FindOrCreateRelationalAttribute(Sdf_PathNode const *parent, const TfToken &name)
void _AppendText(std::string *str) const
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:354
NodeType GetNodeType() const
Definition: pathNode.h:157
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:526
static Sdf_PathPropNodeHandle FindOrCreateMapper(Sdf_PathNode const *parent, SdfPath const &targetPath)
static const NodeType nodeType
Definition: pathNode.h:415
static SDF_API const SdfPath & EmptyPath()
The empty path value, equivalent to SdfPath().
static std::pair< Sdf_PathNode const *, Sdf_PathNode const * > RemoveCommonSuffix(Sdf_PathNode const *a, Sdf_PathNode const *b, bool stopAtRootPrim)
bool operator()(const Sdf_PathNode &lhs, const Sdf_PathNode &rhs) const
Definition: pathNode.h:566
Definition: token.h:87
Internal sentinel value.
Definition: pathNode.h:123
static const NodeType nodeType
Definition: pathNode.h:364
static Sdf_PathPrimNodeHandle FindOrCreatePrim(Sdf_PathNode const *parent, const TfToken &name)
TfToken ComparisonType
Definition: pathNode.h:340
const SdfPath & GetTargetPath() const
Definition: pathNode.h:679
bool Compare(const Sdf_PathNode &rhs) const
Definition: pathNode.h:576
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:264
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:430
bool ComparisonType
Definition: pathNode.h:319
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:453
static const NodeType nodeType
Definition: pathNode.h:513
const VariantSelectionType & GetVariantSelection() const
Definition: pathNode.h:692
Definition: path.h:288
TfToken GetElement() const
Definition: pathNode.h:701
bool IsAbsoluteRoot() const
Definition: pathNode.h:169
static const NodeType nodeType
Definition: pathNode.h:463
static const NodeType nodeType
Definition: pathNode.h:387
static Sdf_PathNode const * GetRelativeRootNode()
hboost::intrusive_ptr< const Sdf_PathNode > Sdf_PathNodeConstRefPtr
Definition: path.h:49
GLdouble GLdouble GLdouble b
Definition: glew.h:9122
GLfloat GLfloat p
Definition: glew.h:16321
#define SDF_API
Definition: api.h:40
GLsizei const GLchar *const * string
Definition: glew.h:1844
SdfPath ComparisonType
Definition: pathNode.h:462
bool operator()(T const &a, T const &b) const
Definition: pathNode.h:207
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
const TfToken & GetName() const
Definition: pathNode.h:655
static Sdf_PathPrimNodeHandle FindOrCreatePrimVariantSelection(Sdf_PathNode const *parent, const TfToken &variantSet, const TfToken &variant)
friend void intrusive_ptr_add_ref(const Sdf_PathNode *)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
void intrusive_ptr_release(const PXR_NS::Sdf_PathNode *p)
Definition: pathNode.h:721
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:405
bool operator()(T const &a, T const &b) const
Definition: pathNode.h:259
bool IsNamespaced() const
Definition: pathNode.h:171
SDF_API void _RemovePathTokenFromTable() const
void _AppendText(std::string *str) const
SDF_API void Sdf_DumpPathStats()
Diagnostic output.
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:503
static SDF_API Sdf_PathNode const * New(bool isAbsolute)
void intrusive_ptr_add_ref(const PXR_NS::Sdf_PathNode *p)
Definition: pathNode.h:718
static const NodeType nodeType
Definition: pathNode.h:488
VariantSelectionType ComparisonType
Definition: pathNode.h:386
bool IsAbsolutePath() const
Definition: pathNode.h:168
static const NodeType nodeType
Definition: pathNode.h:341
friend void intrusive_ptr_release(const Sdf_PathNode *)
const TfToken & _GetNameImpl() const
static SDF_API const TfToken & GetPathToken(Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
bool ContainsTargetPath() const
Definition: pathNode.h:170
size_t GetElementCount() const
Definition: pathNode.h:167
friend struct Sdf_PathNodePrivateAccess
Definition: pathNode.h:375
Sdf_PathNode const * GetParentNode() const
Definition: pathNode.h:165
void _AppendText(std::string *str) const
static const NodeType nodeType
Definition: pathNode.h:440