|
Node::NodeID | node_id () |
| Return the type ID of the nodes in this NodeArray.
|
|
| NodeArray (std::string name, Node::NodeID id, std::shared_ptr< Node > base, const std::shared_ptr< Node > &size) |
| ArrayNode constructor.
|
|
void | SetParent (Graph *new_parent) override |
| Set the parent of this NodeArray base node and array nodes.
|
|
Node * | size () const |
| Return the size node.
|
|
void | SetSize (const std::shared_ptr< Node > &size) |
| Set the size node.
|
|
void | SetType (const std::shared_ptr< Type > &type) |
| Set the type of the base node and array nodes.
|
|
Type * | type () const |
| Return the type of the nodes in the NodeArray.
|
|
std::shared_ptr< Object > | Copy () const override |
| Deep-copy the NodeArray, but not the array nodes. Resets the size node to an integer literal of 0.
|
|
NodeArray * | CopyOnto (Graph *dst, const std::string &name, NodeMap *rebinding) |
| Copy the NodeArray onto a graph, but not the array nodes. Creates a new size node set to zero.
|
|
std::shared_ptr< Node > | Append (bool increment_size=true) |
| Append a node to this array, optionally incrementing the size node. Returns a pointer to that node.
|
|
std::vector< Node * > | nodes () const |
| Return all nodes of this NodeArray.
|
|
Node * | node (size_t i) const |
| Return element node i.
|
|
Node * | operator[] (size_t i) const |
| Return element node i.
|
|
size_t | num_nodes () const |
| Return the number of element nodes.
|
|
size_t | IndexOf (const Node &n) const |
| Return the index of a specific node.
|
|
std::string | ToString () const |
| Return a human-readable representation of this NodeArray.
|
|
std::shared_ptr< Node > | base () const |
| Return the base node of this NodeArray.
|
|
void | AppendReferences (std::vector< Object * > *out) const override |
| Append all objects that this object owns to the output.
|
|
| Object (std::string name, ID id) |
| Cerata object constructor. More...
|
|
ID | obj_id () const |
| Return the object ID of this object.
|
|
bool | IsNode () const |
| Return true if this object is a node.
|
|
bool | IsArray () const |
| Return true if this object is an array.
|
|
virtual std::optional< Graph * > | parent () const |
| Return the parent graph of this object, if any. Returns empty option otherwise.
|
|
| Named (std::string name) |
| Named constructor.
|
|
std::string | name () const |
| Return the name of the object.
|
|
void | SetName (std::string name) |
| Change the name of the object.
|
|
virtual | ~Named ()=default |
| Destructor.
|
|
An array of nodes.
Definition at line 31 of file array.h.