Loading...
Searching...
No Matches
SdfPathExpression::PathPattern Class Reference

Objects of this class represent SdfPath matching patterns, consisting of an SdfPath prefix followed by a sequence of components, which may contain wildcards and optional embedded predicate expressions (see SdfPredicateExpression). More...

#include <pathExpression.h>

Classes

struct  Component
 A component represents a pattern matching component past the initial SdfPath prefix. More...
 

Public Member Functions

SDF_API PathPattern ()
 Construct the empty pattern whose bool-conversion operator returns false.
 
SDF_API void AppendChild (std::string const &text, SdfPredicateExpression &&predExpr)
 Append a prim child component to this pattern, with optional predicate expression predExpr.
 
SDF_API void AppendChild (std::string const &text, SdfPredicateExpression const &predExpr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SDF_API void AppendChild (std::string const &text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SDF_API void AppendProperty (std::string const &text, SdfPredicateExpression &&predExpr)
 Append a prim property component to this pattern, with optional predicate expression predExpr.
 
SDF_API void AppendProperty (std::string const &text, SdfPredicateExpression const &predExpr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SDF_API void AppendProperty (std::string const &text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SdfPath const & GetPrefix () const &
 Return this pattern's non-speculative prefix (leading path components with no wildcards and no predicates).
 
SdfPath GetPrefix () &&
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SDF_API void SetPrefix (SdfPath &&p)
 Set this pattern's non-speculative prefix (leading path components with no wildcards and no predicates).
 
void SetPrefix (SdfPath const &p)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
SDF_API std::string GetText () const
 Return the string representation of this pattern.
 
std::vector< Component > const & GetComponents () const &
 
std::vector< ComponentGetComponents () &&
 
std::vector< SdfPredicateExpression > const & GetPredicateExprs () const &
 
std::vector< SdfPredicateExpressionGetPredicateExprs () &&
 
bool IsProperty () const
 
 operator bool () const
 Return true if this pattern is not empty, false if it is.
 

Friends

template<class HashState >
void TfHashAppend (HashState &h, PathPattern const &pat)
 
bool operator== (PathPattern const &l, PathPattern const &r)
 
bool operator!= (PathPattern const &l, PathPattern const &r)
 
void swap (PathPattern &l, PathPattern &r)
 

Detailed Description

Objects of this class represent SdfPath matching patterns, consisting of an SdfPath prefix followed by a sequence of components, which may contain wildcards and optional embedded predicate expressions (see SdfPredicateExpression).

Definition at line 80 of file pathExpression.h.

Constructor & Destructor Documentation

◆ PathPattern()

SDF_API PathPattern ( )

Construct the empty pattern whose bool-conversion operator returns false.

Member Function Documentation

◆ AppendChild() [1/3]

SDF_API void AppendChild ( std::string const &  text)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ AppendChild() [2/3]

SDF_API void AppendChild ( std::string const &  text,
SdfPredicateExpression &&  predExpr 
)

Append a prim child component to this pattern, with optional predicate expression predExpr.

If this pattern does not yet contain any wildcards or components with predicate expressions, and the input text does not contain wildcards, and predExpr is empty, then append a child component to this pattern's prefix path (see GetPrefix()). Otherwise append this component to the sequence of components.

◆ AppendChild() [3/3]

SDF_API void AppendChild ( std::string const &  text,
SdfPredicateExpression const &  predExpr 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ AppendProperty() [1/3]

SDF_API void AppendProperty ( std::string const &  text)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ AppendProperty() [2/3]

SDF_API void AppendProperty ( std::string const &  text,
SdfPredicateExpression &&  predExpr 
)

Append a prim property component to this pattern, with optional predicate expression predExpr.

If this pattern does not yet contain any wildcards or components with predicate expressions, and the input text does not contain wildcards, and predExpr is empty, then append a property component to this pattern's prefix path (see GetPrefix()). Otherwise append this component to the sequence of components.

◆ AppendProperty() [3/3]

SDF_API void AppendProperty ( std::string const &  text,
SdfPredicateExpression const &  predExpr 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ GetComponents() [1/2]

std::vector< Component > GetComponents ( ) &&
inline

Definition at line 189 of file pathExpression.h.

◆ GetComponents() [2/2]

std::vector< Component > const & GetComponents ( ) const &
inline

Definition at line 185 of file pathExpression.h.

◆ GetPredicateExprs() [1/2]

std::vector< SdfPredicateExpression > GetPredicateExprs ( ) &&
inline

Definition at line 199 of file pathExpression.h.

◆ GetPredicateExprs() [2/2]

std::vector< SdfPredicateExpression > const & GetPredicateExprs ( ) const &
inline

Definition at line 194 of file pathExpression.h.

◆ GetPrefix() [1/2]

SdfPath GetPrefix ( ) &&
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 167 of file pathExpression.h.

◆ GetPrefix() [2/2]

SdfPath const & GetPrefix ( ) const &
inline

Return this pattern's non-speculative prefix (leading path components with no wildcards and no predicates).

Definition at line 162 of file pathExpression.h.

◆ GetText()

SDF_API std::string GetText ( ) const

Return the string representation of this pattern.

◆ IsProperty()

bool IsProperty ( ) const
inline

Definition at line 203 of file pathExpression.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true if this pattern is not empty, false if it is.

Definition at line 208 of file pathExpression.h.

◆ SetPrefix() [1/2]

SDF_API void SetPrefix ( SdfPath &&  p)

Set this pattern's non-speculative prefix (leading path components with no wildcards and no predicates).

◆ SetPrefix() [2/2]

void SetPrefix ( SdfPath const &  p)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 177 of file pathExpression.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( PathPattern const &  l,
PathPattern const &  r 
)
friend

Definition at line 228 of file pathExpression.h.

◆ operator==

bool operator== ( PathPattern const &  l,
PathPattern const &  r 
)
friend

Definition at line 220 of file pathExpression.h.

◆ swap

void swap ( PathPattern l,
PathPattern r 
)
friend

Definition at line 232 of file pathExpression.h.

◆ TfHashAppend

void TfHashAppend ( HashState &  h,
PathPattern const &  pat 
)
friend

Definition at line 214 of file pathExpression.h.


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