24 #ifndef PXR_USD_SDF_VARIABLE_EXPRESSION
25 #define PXR_USD_SDF_VARIABLE_EXPRESSION
32 #include "pxr/base/vt/array.h"
38 #include <unordered_set>
43 namespace Sdf_VariableExpressionImpl {
123 explicit operator bool()
const;
135 const std::vector<std::string>&
GetErrors()
const;
210 template <
class ResultType>
220 _FormatUnexpectedTypeError(r.
value,
VtValue(ResultType())));
229 _FormatUnexpectedTypeError(
const VtValue& got,
const VtValue& expected);
231 std::vector<std::string> _errors;
232 std::shared_ptr<Sdf_VariableExpressionImpl::Node> _expression;
SDF_API SdfVariableExpression()
Construct an object representing an invalid expression.
SDF_API Result Evaluate(const VtDictionary &variables) const
std::unordered_set< std::string > usedVariables
SDF_API ~SdfVariableExpression()
static SDF_API bool IsExpression(const std::string &s)
GLsizei const GLchar *const * string
bool IsEmpty() const
Returns true iff this value is empty.
SDF_API const std::vector< std::string > & GetErrors() const
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
static SDF_API bool IsValidVariableType(const VtValue &value)
Array concept. By default, types are not arrays.
std::vector< std::string > errors
Errors encountered while evaluating the expression.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
SDF_API const std::string & GetString() const
Returns the expression string used to construct this object.
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Result EvaluateTyped(const VtDictionary &variables) const