24 #ifndef PXR_USD_SDF_PREDICATE_EXPRESSION_H
25 #define PXR_USD_SDF_PREDICATE_EXPRESSION_H
102 template <
class HashState>
135 template <
class HashState>
239 TfFunctionRef<
void (std::vector<std::pair<Op, int>>
const &)> logic,
254 explicit operator bool()
const {
271 template <
class HashState>
273 h.Append(expr._ops, expr._calls, expr._parseError);
279 return std::tie(l._ops, l._calls, l._parseError) ==
280 std::tie(r._ops, r._calls, r._parseError);
290 friend std::ostream &
300 std::vector<Op> _ops;
304 std::vector<FnCall> _calls;
313 #endif // PXR_USD_SDF_PREDICATE_EXPRESSION_H
friend bool operator!=(FnArg const &l, FnArg const &r)
no-arg call like 'active'
static FnArg Keyword(std::string const &name, VtValue const &val)
paren/comma & pos/kw args like 'foo(23, bar=baz)'
SDF_API void Walk(TfFunctionRef< void(Op, int)> logic, TfFunctionRef< void(FnCall const &)> call) const
SdfPredicateExpression & operator=(SdfPredicateExpression const &)=default
Copy assign from another expression.
GLsizei const GLchar *const * string
friend bool operator==(SdfPredicateExpression const &l, SdfPredicateExpression const &r)
friend void TfHashAppend(HashState &h, FnCall const &c)
static SDF_API SdfPredicateExpression MakeCall(FnCall &&call)
Produce a new expression containing just a the function call call.
friend void TfHashAppend(HashState &h, SdfPredicateExpression const &expr)
SdfPredicateExpression()=default
Construct the empty expression whose bool-operator returns false.
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
friend bool operator==(FnCall const &l, FnCall const &r)
friend void swap(FnCall &l, FnCall &r)
SDF_API std::string GetText() const
friend bool operator!=(SdfPredicateExpression const &l, SdfPredicateExpression const &r)
std::vector< FnArg > args
friend bool operator==(FnArg const &l, FnArg const &r)
GLuint const GLchar * name
static SDF_API SdfPredicateExpression MakeOp(Op op, SdfPredicateExpression &&left, SdfPredicateExpression &&right)
std::string GetParseError() const &&
friend bool operator!=(FnCall const &l, FnCall const &r)
GLfloat GLfloat GLfloat GLfloat h
SDF_API void WalkWithOpStack(TfFunctionRef< void(std::vector< std::pair< Op, int >> const &)> logic, TfFunctionRef< void(FnCall const &)> call) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
static SDF_API SdfPredicateExpression MakeNot(SdfPredicateExpression &&right)
Produce a new expression by prepending the 'not' operator onto right.
colon-separated pos args, like 'isa:Imageable'
#define PXR_NAMESPACE_CLOSE_SCOPE
friend void TfHashAppend(HashState &h, FnArg const &arg)
friend void swap(FnArg &l, FnArg &r)
static FnArg Positional(VtValue const &val)
SDF_API friend std::ostream & operator<<(std::ostream &, SdfPredicateExpression const &)
Op
Enumerant describing a subexpression operation.
std::string const & GetParseError() const &