![]() |
|
Abstract syntax tree for an SdfVariableExpression. More...
#include <variableExpressionAST.h>
Public Member Functions | |
| SDF_API | SdfVariableExpressionAST () |
| Construct an invalid AST. | |
| SDF_API | SdfVariableExpressionAST (const std::string &expr) |
Construct the AST for the variable expression expr. | |
| SDF_API | SdfVariableExpressionAST (const SdfVariableExpression &expr) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Equivalent to SdfVariableExpressionAST(expr.GetString());. | |
| SDF_API | SdfVariableExpressionAST (const SdfVariableExpressionAST &rhs) |
Copy constructor. Performs a deep copy of the AST in rhs. | |
| SDF_API SdfVariableExpressionAST & | operator= (const SdfVariableExpressionAST &rhs) |
Assignment. Performs a deep copy of the AST in rhs. | |
| SdfVariableExpressionAST (SdfVariableExpressionAST &&rhs)=default | |
| SdfVariableExpressionAST & | operator= (SdfVariableExpressionAST &&rhs)=default |
| SDF_API | operator bool () const |
| Return true if this is a valid AST, false otherwise. | |
| SDF_API const std::vector< std::string > & | GetErrors () const |
| Return list of errors encountered when parsing the expression passed to the constructor. | |
| SDF_API SdfVariableExpressionASTNodes::Node * | GetRoot () |
Return the root node of the syntax tree corresponding to the outermost expression if this is a valid AST or nullptr otherwise. | |
| SDF_API const SdfVariableExpressionASTNodes::Node * | GetRoot () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| SDF_API SdfVariableExpression | GetExpression () const |
| Return the expression represented by this AST if this is a valid AST or a default constructed SdfVariableExpression otherwise. | |
Abstract syntax tree for an SdfVariableExpression.
Provides read-only inspection of the structure of a variable expression.
Definition at line 255 of file variableExpressionAST.h.
| SDF_API SdfVariableExpressionAST | ( | ) |
Construct an invalid AST.
|
explicit |
Construct the AST for the variable expression expr.
Creates an invalid AST if expr cannot be parsed.
|
explicit |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Equivalent to SdfVariableExpressionAST(expr.GetString());.
| SDF_API SdfVariableExpressionAST | ( | const SdfVariableExpressionAST & | rhs | ) |
Copy constructor. Performs a deep copy of the AST in rhs.
| SDF_API const std::vector< std::string > & GetErrors | ( | ) | const |
Return list of errors encountered when parsing the expression passed to the constructor.
| SDF_API SdfVariableExpression GetExpression | ( | ) | const |
Return the expression represented by this AST if this is a valid AST or a default constructed SdfVariableExpression otherwise.
The expression string may be formatted differently than what was in the original expression passed to the constructor.
The returned SdfVariableExpression may be an invalid expression that cannot be evaluated, e.g. if the expression contains an unrecognized function name. However, calling GetString on the returned SdfVariableExpression will still return the expression string for inspection.
| SDF_API SdfVariableExpressionASTNodes::Node * GetRoot | ( | ) |
Return the root node of the syntax tree corresponding to the outermost expression if this is a valid AST or nullptr otherwise.
The returned pointer is valid for the lifetime of its associated SdfVariableExpressionAST.
| SDF_API const SdfVariableExpressionASTNodes::Node * GetRoot | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
explicit |
Return true if this is a valid AST, false otherwise.
| SDF_API SdfVariableExpressionAST & operator= | ( | const SdfVariableExpressionAST & | rhs | ) |
Assignment. Performs a deep copy of the AST in rhs.