Enzo
Loading...
Searching...
No Matches
enzo::nt::NodeSnapshot Class Reference

Everything one node carries, held apart from the network so it can be rebuilt. More...

#include <NodeSnapshot.h>

Public Member Functions

void restore (NodeId nodeId) const
 Rebuilds the node under the given id with the path, position, and parameters it had.
 
const Path & getPath () const
 Returns the path the node sat at, whose leaf is the node name.
 

Static Public Member Functions

static NodeSnapshot capture (Node &node)
 Returns a snapshot of the node as it stands.
 

Friends

class cereal::access
 

Detailed Description

Everything one node carries, held apart from the network so it can be rebuilt.

A node's type, where it sits, and the full state of its parameters, taken at one moment. Undo captures a snapshot before a node goes away and rebuilds the node from it later, and a saved file is a list of these plus the wiring between them.

Note
Node links and the nodes living in a child scope are not part of a snapshot. Wiring belongs to the graph, and children are nodes in their own right, each snapshotted on their own.

Member Function Documentation

◆ restore()

void enzo::nt::NodeSnapshot::restore ( nt::NodeId nodeId) const

Rebuilds the node under the given id with the path, position, and parameters it had.

Note
The scope the path sits in has to exist already, so a node holding other nodes is restored before the nodes living inside it.

The documentation for this class was generated from the following files: