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

The in memory form of one node's manifest file. More...

#include <NodeManifest.h>

Public Member Functions

const NodeTypegetNodeType () const
 Returns the node type this manifest describes, with no constructor or folder filled in yet.
 
const NodeImplementationgetImplementation () const
 

Static Public Member Functions

static NodeManifest loadFromString (const std::string &yaml)
 Returns the manifest described by a yaml document.
 
static NodeManifest loadFromFile (const std::filesystem::path &path)
 Returns the manifest described by a node.yaml file.
 

Detailed Description

The in memory form of one node's manifest file.

A node folder holds a node.yaml declaring the label, tags, input and output counts, parameters, and implementation of the node. This class is that file read into memory.

Example

const NodeManifest manifest = NodeManifest::loadFromFile("nodes/sweep/node.yaml");
manifest.getNodeType().getLabel(); // "Sweep"
manifest.getImplementation().constructor; // "sweep"
The in memory form of one node's manifest file.
Definition NodeManifest.h:43
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
const std::string & getLabel() const
Returns the human readable type label shown in the UI (eg. "Copy To Points")
Definition NodeType.h:82
Note
Nothing here touches the surrounding folder, which is what lets tests build a node from a string. Scanning directories and resolving the icon and the library against them is the loader's job.

Member Function Documentation

◆ loadFromFile()

NodeManifest enzo::nt::NodeManifest::loadFromFile ( const std::filesystem::path & path)
static

Returns the manifest described by a node.yaml file.

Note
Throws std::runtime_error when the file is missing or malformed.

◆ loadFromString()

NodeManifest enzo::nt::NodeManifest::loadFromString ( const std::string & yaml)
static

Returns the manifest described by a yaml document.

Note
Throws std::runtime_error when the document is malformed.

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