7 #ifndef PXR_USD_SDF_PATH_PATTERN_H
8 #define PXR_USD_SDF_PATH_PATTERN_H
84 template <
class HashState>
100 std::string *reason =
nullptr)
const {
110 std::string *reason =
nullptr)
const;
120 SdfPathPattern &
AppendChild(std::string
const &text,
124 SdfPathPattern &
AppendChild(std::string
const &text,
128 SdfPathPattern &
AppendChild(std::string
const &text);
134 std::string *reason =
nullptr)
const {
144 std::string *reason =
nullptr)
const;
172 return std::move(_prefix);
226 return std::move(_components);
231 std::vector<SdfPredicateExpression>
const &
237 std::vector<SdfPredicateExpression>
239 return std::move(_predExprs);
249 explicit operator bool()
const {
255 std::vector<Component> &&components,
256 std::vector<SdfPredicateExpression> &&predExprs,
259 template <
class HashState>
261 h.Append(pat._prefix, pat._components,
262 pat._predExprs, pat._isProperty);
267 return std::tie(l._prefix, l._components,
268 l._predExprs, l._isProperty) ==
269 std::tie(r._prefix, r._components,
270 r._predExprs, r._isProperty);
278 friend void swap(SdfPathPattern &l, SdfPathPattern &
r) {
280 l._prefix, l._components, l._predExprs, l._isProperty);
282 r._prefix, r._components, r._predExprs, r._isProperty);
287 std::vector<Component> _components;
288 std::vector<SdfPredicateExpression> _predExprs;
295 #endif // PXR_USD_SDF_PATH_PATTERN_H
friend bool operator!=(SdfPathPattern const &l, SdfPathPattern const &r)
friend bool operator==(SdfPathPattern const &l, SdfPathPattern const &r)
SDF_API SdfPathPattern & AppendChild(std::string const &text, SdfPredicateExpression &&predExpr)
friend void swap(Component &l, Component &r)
SdfPath const & GetPrefix() const &
bool IsEmpty() const noexcept
Returns true if this is the empty path (SdfPath::EmptyPath()).
static SDF_API SdfPathPattern const & Everything()
Return the pattern "//" which matches all paths.
SDF_API SdfPathPattern & SetPrefix(SdfPath &&p)
friend void TfHashAppend(HashState &h, Component const &c)
friend bool operator==(Component const &l, Component const &r)
SDF_API bool HasLeadingStretch() const
SDF_API SdfPathPattern & RemoveTrailingStretch()
bool CanAppendChild(std::string const &text, std::string *reason=nullptr) const
std::vector< Component > GetComponents()&&
static SdfPathPattern Nothing()
Return a default constructed SdfPathPattern that matches nothing.
std::vector< SdfPredicateExpression > const & GetPredicateExprs() const &
std::vector< Component > const & GetComponents() const &
SdfPathPattern & SetPrefix(SdfPath const &p)
GLfloat GLfloat GLfloat GLfloat h
static SDF_API SdfPathPattern const & EveryDescendant()
friend void TfHashAppend(HashState &h, SdfPathPattern const &pat)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
SDF_API std::string GetText() const
Return the string representation of this pattern.
friend bool operator!=(Component const &l, Component const &r)
#define PXR_NAMESPACE_CLOSE_SCOPE
std::vector< SdfPredicateExpression > GetPredicateExprs()&&
friend void swap(SdfPathPattern &l, SdfPathPattern &r)
SDF_API SdfPathPattern & AppendStretchIfPossible()
SDF_API SdfPathPattern & AppendProperty(std::string const &text, SdfPredicateExpression &&predExpr)
SDF_API bool HasTrailingStretch() const
bool CanAppendProperty(std::string const &text, std::string *reason=nullptr) const
SDF_API SdfPathPattern & RemoveTrailingComponent()