24 #ifndef PXR_USD_SDF_VARIABLE_EXPRESSION
25 #define PXR_USD_SDF_VARIABLE_EXPRESSION
37 #include <unordered_set>
42 namespace Sdf_VariableExpressionImpl {
111 explicit operator bool()
const;
123 const std::vector<std::string>&
GetErrors()
const;
177 template <
class ResultType>
183 _FormatUnexpectedTypeError(r.
value,
VtValue(ResultType())));
192 _FormatUnexpectedTypeError(
const VtValue& got,
const VtValue& expected);
194 std::vector<std::string> _errors;
195 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
static SDF_API bool IsValidVariableType(const VtValue &value)
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.
Result EvaluateTyped(const VtDictionary &variables) const