Enzo
Loading...
Searching...
No Matches
NodeManifest.h
1#pragma once
2#include "Engine/Network/NodeType.h"
3#include <filesystem>
4#include <string>
5#include <vector>
6
7namespace enzo::nt {
8
17{
18 std::string kind;
19 std::string library;
20 std::string constructor;
21};
22
43{
44 public:
47 static NodeManifest loadFromString(const std::string& yaml);
48
51 static NodeManifest loadFromFile(const std::filesystem::path& path);
52
55 const NodeType& getNodeType() const { return nodeType_; }
56 const NodeImplementation& getImplementation() const { return implementation_; }
57
58 private:
59 NodeType nodeType_;
60 NodeImplementation implementation_;
61};
62
63} // namespace enzo::nt
The in memory form of one node's manifest file.
Definition NodeManifest.h:43
static NodeManifest loadFromString(const std::string &yaml)
Returns the manifest described by a yaml document.
Definition NodeManifest.cpp:283
static NodeManifest loadFromFile(const std::filesystem::path &path)
Returns the manifest described by a node.yaml file.
Definition NodeManifest.cpp:315
const NodeType & getNodeType() const
Returns the node type this manifest describes, with no constructor or folder filled in yet.
Definition NodeManifest.h:55
Where a node's behaviour comes from.
Definition NodeManifest.h:17
Everything every node of one kind shares.
Definition NodeType.h:39