The in memory form of one node's manifest file.
More...
#include <NodeManifest.h>
|
|
const NodeType & | getNodeType () const |
| | Returns the node type this manifest describes, with no constructor or folder filled in yet.
|
| |
|
const NodeImplementation & | getImplementation () const |
| |
| const std::map< std::string, std::vector< std::string > > & | getParameterValues () const |
| | Returns the parameter values an alias sets, as written in the manifest.
|
| |
| NodeAlias | getNodeAlias (const NodeType &aliasedType) const |
| | Returns the alias this manifest describes.
|
| |
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
manifest.getNodeType().getLabel();
std::get<CppImplementation>(manifest.getImplementation()).constructor;
The in memory form of one node's manifest file.
Definition NodeManifest.h:50
static NodeManifest loadFromFile(const std::filesystem::path &path)
Returns the manifest described by a node.yaml file.
Definition NodeManifest.cpp:471
- 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.
◆ getNodeAlias()
Returns the alias this manifest describes.
- Exceptions
-
| std::runtime_error | when a value does not fit a parameter of the aliased type. |
- Parameters
-
| aliasedType | The node type the alias stands in for, whose parameters give each value its type. |
◆ getParameterValues()
| const std::map< std::string, std::vector< std::string > > & enzo::nt::NodeManifest::getParameterValues |
( |
| ) |
const |
|
inline |
Returns the parameter values an alias sets, as written in the manifest.
offset: [0, 1, 0] gives {"offset", {"0", "1", "0"}}.
◆ loadFromFile()
| NodeManifest enzo::nt::NodeManifest::loadFromFile |
( |
const std::filesystem::path & | path | ) |
|
|
static |
Returns the manifest described by a node.yaml file.
- Exceptions
-
| 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.
- Exceptions
-
| std::runtime_error | when the document is malformed. |
The documentation for this class was generated from the following files: