![]() |
|
Abstract syntax tree node representing a raw variable reference, i.e. More...
#include <variableExpressionAST.h>
Inheritance diagram for VariableNode:Public Member Functions | |
Variable Name | |
| const std::string & | GetName () const |
| void | SetName (const std::string &name) |
Fallback Value | |
| Node * | GetFallbackValue () |
| Returns the fallback value for this variable. | |
| const Node * | GetFallbackValue () 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 void | SetFallbackValue (const Node &node) |
| Sets the fallback value for this node. | |
| void | ClearFallbackValue () |
| Clears any set fallback value. | |
Public Member Functions inherited from Node | |
| SDF_API std::unique_ptr< Node > | Clone () const |
| SDF_API SdfVariableExpression | GetExpression () const |
| Return SdfVariableExpression for this node. | |
| SDF_API SdfVariableExpression::Builder | GetExpressionBuilder () const |
| Return SdfVariableExpression::Builder for this node. | |
| template<class T > | |
| T * | As () |
| template<class T > | |
| const T * | As () const |
Friends | |
| class | _NodeCreator |
Additional Inherited Members | |
Protected Member Functions inherited from Node |
Abstract syntax tree node representing a raw variable reference, i.e.
${FOO}. Variables may also have a fallback value. When evaluating a variable, if a fallback value is specified, it will be returned if the variable is not defined in the current context.
This does not include variable references within quoted strings, i.e. "FOO_${BAR}". See LiteralNode.
Definition at line 167 of file variableExpressionAST.h.
|
inline |
Clears any set fallback value.
Definition at line 193 of file variableExpressionAST.h.
|
inline |
Returns the fallback value for this variable.
If no fallback value is set, this value will be nullptr.
Definition at line 182 of file variableExpressionAST.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 185 of file variableExpressionAST.h.
|
inline |
Definition at line 173 of file variableExpressionAST.h.
| SDF_API void SetFallbackValue | ( | const Node & | node | ) |
Sets the fallback value for this node.
node must be a LiteralNode or a ListNode. If node is not one of the allowed types a coding error will be emitted and no changes will be made.
|
inline |
Definition at line 174 of file variableExpressionAST.h.
|
friend |
Definition at line 197 of file variableExpressionAST.h.