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

#include <pathNode.h>

+ Inheritance diagram for Sdf_PathNode:

Classes

struct  _EqualElement
 
struct  LessThan
 

Public Types

enum  NodeType : uint8_t {
  RootNode, PrimNode, PrimVariantSelectionNode, PrimPropertyNode,
  TargetNode, MapperNode, RelationalAttributeNode, MapperArgNode,
  ExpressionNode, NumNodeTypes
}
 
typedef std::pair< TfToken,
TfToken
VariantSelectionType
 

Public Member Functions

NodeType GetNodeType () const
 
Sdf_PathNode const * GetParentNode () const
 
size_t GetElementCount () const
 
bool IsAbsolutePath () const
 
bool IsAbsoluteRoot () const
 
bool ContainsTargetPath () const
 
bool IsNamespaced () const
 
bool ContainsPrimVariantSelection () const
 
const TfTokenGetName () const
 
const SdfPathGetTargetPath () const
 
const VariantSelectionTypeGetVariantSelection () const
 
TfToken GetElement () const
 
template<class Less >
bool Compare (const Sdf_PathNode &rhs) const
 
uint32_t GetCurrentRefCount () const
 

Static Public Member Functions

static Sdf_PathPrimNodeHandle FindOrCreatePrim (Sdf_PathNode const *parent, const TfToken &name, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreatePrimProperty (Sdf_PathNode const *parent, const TfToken &name, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPrimNodeHandle FindOrCreatePrimVariantSelection (Sdf_PathNode const *parent, const TfToken &variantSet, const TfToken &variant, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreateTarget (Sdf_PathNode const *parent, SdfPath const &targetPath, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreateRelationalAttribute (Sdf_PathNode const *parent, const TfToken &name, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreateMapper (Sdf_PathNode const *parent, SdfPath const &targetPath, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreateMapperArg (Sdf_PathNode const *parent, const TfToken &name, TfFunctionRef< bool()> isValid)
 
static Sdf_PathPropNodeHandle FindOrCreateExpression (Sdf_PathNode const *parent, TfFunctionRef< bool()> isValid)
 
static Sdf_PathNode const * GetAbsoluteRootNode ()
 
static Sdf_PathNode const * GetRelativeRootNode ()
 
static std::pair< Sdf_PathNode
const *, Sdf_PathNode const * > 
RemoveCommonSuffix (Sdf_PathNode const *a, Sdf_PathNode const *b, bool stopAtRootPrim)
 
static SDF_API const TfTokenGetPathToken (Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
 
static SDF_API TfToken GetPathAsToken (Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
 
static char const * GetDebugText (Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
 

Static Public Attributes

static constexpr uint8_t IsAbsoluteFlag = 1 << 0
 
static constexpr uint8_t ContainsPrimVarSelFlag = 1 << 1
 
static constexpr uint8_t ContainsTargetPathFlag = 1 << 2
 
static constexpr uint32_t HasTokenBit = 1u << 31
 
static constexpr uint32_t RefCountMask = ~HasTokenBit
 

Protected Member Functions

 Sdf_PathNode (Sdf_PathNode const *parent, NodeType nodeType)
 
 Sdf_PathNode (bool isAbsolute)
 
 ~Sdf_PathNode ()
 
void _Destroy () const
 
TfToken _GetElementImpl () const
 
template<class Buffer >
void _WriteText (Buffer &out) const
 
SDF_API void _RemovePathTokenFromTable () const
 

Static Protected Member Functions

static TfToken _CreatePathToken (Sdf_PathNode const *primPart, Sdf_PathNode const *propPart)
 
template<class Buffer >
static void _WriteTextToBuffer (Sdf_PathNode const *primPart, Sdf_PathNode const *propPart, Buffer &out)
 
template<class Buffer >
static void _WriteTextToBuffer (SdfPath const &path, Buffer &out)
 

Friends

struct Sdf_PathNodePrivateAccess
 
void intrusive_ptr_add_ref (const Sdf_PathNode *)
 
void intrusive_ptr_release (const Sdf_PathNode *)
 

Detailed Description

Definition at line 59 of file pathNode.h.

Member Typedef Documentation

Definition at line 209 of file pathNode.h.

Member Enumeration Documentation

enum Sdf_PathNode::NodeType : uint8_t
Enumerator
RootNode 
PrimNode 
PrimVariantSelectionNode 
PrimPropertyNode 
TargetNode 
MapperNode 
RelationalAttributeNode 
MapperArgNode 
ExpressionNode 
NumNodeTypes 

Internal sentinel value.

Definition at line 74 of file pathNode.h.

Constructor & Destructor Documentation

Sdf_PathNode::Sdf_PathNode ( Sdf_PathNode const *  parent,
NodeType  nodeType 
)
inlineprotected

Definition at line 247 of file pathNode.h.

Sdf_PathNode::Sdf_PathNode ( bool  isAbsolute)
explicitprotected
Sdf_PathNode::~Sdf_PathNode ( )
inlineprotected

Definition at line 260 of file pathNode.h.

Member Function Documentation

static TfToken Sdf_PathNode::_CreatePathToken ( Sdf_PathNode const *  primPart,
Sdf_PathNode const *  propPart 
)
staticprotected
void Sdf_PathNode::_Destroy ( ) const
inlineprotected

Definition at line 670 of file pathNode.h.

TfToken Sdf_PathNode::_GetElementImpl ( ) const
protected
SDF_API void Sdf_PathNode::_RemovePathTokenFromTable ( ) const
protected
template<class Buffer >
void Sdf_PathNode::_WriteText ( Buffer &  out) const
protected
template<class Buffer >
static void Sdf_PathNode::_WriteTextToBuffer ( Sdf_PathNode const *  primPart,
Sdf_PathNode const *  propPart,
Buffer &  out 
)
staticprotected
template<class Buffer >
static void Sdf_PathNode::_WriteTextToBuffer ( SdfPath const &  path,
Buffer &  out 
)
staticprotected
template<class Comp >
bool Sdf_PathNode::Compare ( const Sdf_PathNode rhs) const
inline

Definition at line 619 of file pathNode.h.

bool Sdf_PathNode::ContainsPrimVariantSelection ( ) const
inline

Definition at line 195 of file pathNode.h.

bool Sdf_PathNode::ContainsTargetPath ( ) const
inline

Definition at line 185 of file pathNode.h.

static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreateExpression ( Sdf_PathNode const *  parent,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreateMapper ( Sdf_PathNode const *  parent,
SdfPath const &  targetPath,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreateMapperArg ( Sdf_PathNode const *  parent,
const TfToken name,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPrimNodeHandle Sdf_PathNode::FindOrCreatePrim ( Sdf_PathNode const *  parent,
const TfToken name,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreatePrimProperty ( Sdf_PathNode const *  parent,
const TfToken name,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPrimNodeHandle Sdf_PathNode::FindOrCreatePrimVariantSelection ( Sdf_PathNode const *  parent,
const TfToken variantSet,
const TfToken variant,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreateRelationalAttribute ( Sdf_PathNode const *  parent,
const TfToken name,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathPropNodeHandle Sdf_PathNode::FindOrCreateTarget ( Sdf_PathNode const *  parent,
SdfPath const &  targetPath,
TfFunctionRef< bool()>  isValid 
)
static
static Sdf_PathNode const* Sdf_PathNode::GetAbsoluteRootNode ( )
static
uint32_t Sdf_PathNode::GetCurrentRefCount ( ) const
inline

Definition at line 242 of file pathNode.h.

static char const* Sdf_PathNode::GetDebugText ( Sdf_PathNode const *  primPart,
Sdf_PathNode const *  propPart 
)
static
TfToken Sdf_PathNode::GetElement ( ) const
inline

Definition at line 744 of file pathNode.h.

size_t Sdf_PathNode::GetElementCount ( ) const
inline

Definition at line 182 of file pathNode.h.

const TfToken & Sdf_PathNode::GetName ( ) const
inline

Definition at line 698 of file pathNode.h.

NodeType Sdf_PathNode::GetNodeType ( ) const
inline

Definition at line 172 of file pathNode.h.

Sdf_PathNode const* Sdf_PathNode::GetParentNode ( ) const
inline

Definition at line 180 of file pathNode.h.

static SDF_API TfToken Sdf_PathNode::GetPathAsToken ( Sdf_PathNode const *  primPart,
Sdf_PathNode const *  propPart 
)
static
static SDF_API const TfToken& Sdf_PathNode::GetPathToken ( Sdf_PathNode const *  primPart,
Sdf_PathNode const *  propPart 
)
static
static Sdf_PathNode const* Sdf_PathNode::GetRelativeRootNode ( )
static
const SdfPath & Sdf_PathNode::GetTargetPath ( ) const
inline

Definition at line 722 of file pathNode.h.

const Sdf_PathNode::VariantSelectionType & Sdf_PathNode::GetVariantSelection ( ) const
inline

Definition at line 735 of file pathNode.h.

bool Sdf_PathNode::IsAbsolutePath ( ) const
inline

Definition at line 183 of file pathNode.h.

bool Sdf_PathNode::IsAbsoluteRoot ( ) const
inline

Definition at line 184 of file pathNode.h.

bool Sdf_PathNode::IsNamespaced ( ) const
inline

Definition at line 188 of file pathNode.h.

static std::pair<Sdf_PathNode const *, Sdf_PathNode const *> Sdf_PathNode::RemoveCommonSuffix ( Sdf_PathNode const *  a,
Sdf_PathNode const *  b,
bool  stopAtRootPrim 
)
static

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( const Sdf_PathNode )
friend
void intrusive_ptr_release ( const Sdf_PathNode )
friend
friend struct Sdf_PathNodePrivateAccess
friend

Definition at line 299 of file pathNode.h.

Member Data Documentation

constexpr uint8_t Sdf_PathNode::ContainsPrimVarSelFlag = 1 << 1
static

Definition at line 65 of file pathNode.h.

constexpr uint8_t Sdf_PathNode::ContainsTargetPathFlag = 1 << 2
static

Definition at line 66 of file pathNode.h.

constexpr uint32_t Sdf_PathNode::HasTokenBit = 1u << 31
static

Definition at line 68 of file pathNode.h.

constexpr uint8_t Sdf_PathNode::IsAbsoluteFlag = 1 << 0
static

Definition at line 64 of file pathNode.h.

constexpr uint32_t Sdf_PathNode::RefCountMask = ~HasTokenBit
static

Definition at line 69 of file pathNode.h.


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