2#include "Engine/Core/Path.h"
4#include "Engine/Serializer/ParameterSerializable.h"
5#include <cereal/cereal.hpp>
6#include <cereal/types/vector.hpp>
39 friend class cereal::access;
41 template <
class Archive>
void save(Archive& archive)
const
44 cereal::make_nvp(
"typeName", typeName_),
45 cereal::make_nvp(
"path", path_.
getString()),
46 cereal::make_nvp(
"posX", position_.x()),
47 cereal::make_nvp(
"posY", position_.y()),
48 cereal::make_nvp(
"parameters", parameters_)
52 template <
class Archive>
void load(Archive& archive)
58 cereal::make_nvp(
"typeName", typeName_),
59 cereal::make_nvp(
"path", path),
60 cereal::make_nvp(
"posX", posX),
61 cereal::make_nvp(
"posY", posY),
62 cereal::make_nvp(
"parameters", parameters_)
65 position_ = {posX, posY};
68 std::string typeName_;
70 Vector2 position_ = {0.f, 0.f};
71 std::vector<ParameterSerializable> parameters_;
Basic attribute, parameter, and node types for Enzo.
uint64_t NodeId
The unique ID assigned to each node in the network.
Definition Types.h:306
A default path class for creation and manipulation of tree-based paths.
Definition Path.h:14
const std::string & getString() const
Return the path of the Path as an std::string.
Definition Path.cpp:161
Everything one node carries, held apart from the network so it can be rebuilt.
Definition NodeSnapshot.h:25
const Path & getPath() const
Returns the path the node sat at, whose leaf is the node name.
Definition NodeSnapshot.h:36
void restore(NodeId nodeId) const
Rebuilds the node under the given id with the path, position, and parameters it had.
Definition NodeSnapshot.cpp:22
static NodeSnapshot capture(Node &node)
Returns a snapshot of the node as it stands.
Definition NodeSnapshot.cpp:8
The unique runtime representation of a node.
Definition Node.h:18