![]() |
Spicy
|
#include <node_ref.h>
Public Member Functions | |
NodeRef (Node &n) | |
NodeRef (const NodeRef &other)=default | |
NodeRef (NodeRef &&other)=default | |
NodeRef & | operator= (const NodeRef &other)=default |
NodeRef & | operator= (NodeRef &&other)=default |
uint64_t | rid () const |
std::string | renderedRid () const |
const Node * | operator-> () const |
Node & | operator* () const |
operator const Node & () const | |
operator bool () const | |
A reference to an AST Node
. A reference acts similarly to a pointer to a node, except that it tracks its life-time and catches (through exceptions) if the reference becomes invalid. Assigning to a node doesn't affect any references to it; they will now point to the new value.
|
inlineexplicit |
Returns true if the instance references a valid node.
|
inline |
Returns a direct C++ reference to the the referenced node. The node may be modified, and assigned to, through this reference.
Invalid | if the node does not exist anymore |
|
inline |
Returns a pointer to the the referenced node.
Invalid | if the node does not exist anymore |
|
inline |
Returns a string version of the referenced node's unique control ID, or 0 if the instance isn't referencing anything.
|
inline |
Returns the referenced node's unique control ID, or 0 if the instance isn't referencing anything.