11 mContext{&mod.context()},
12 mName{std::move(
name)},
21 mDataInputs = std::move(newInputs);
26 mDataOutputs = std::move(newOutputs);
30 mExecInputs = std::move(newInputs);
34 mExecOutputs = std::move(newOutputs);
45 assert(
pure() &&
"Cannot have a nonpure converter node");
46 assert(
dataInputs().size() == 1 &&
"A converter node must have one data input");
47 assert(
dataOutputs().size() == 1 &&
"A converter node must have one data output");
ChiModule & module() const
Get the ChiModule this NodeType belongs to.
const std::vector< NamedDataType > & dataOutputs() const
Get the data outputs for the node.
void makeConverter()
Make this a converter node.
void setDescription(std::string newDesc)
Set the description of the node.
std::string name() const
Get the name of the NodeType in the ChiModule.
Basicaly a std::pair<std::string, DataType>, except it has nicer names.
void makePure()
Make this node pure For more info on what this means, see https://en.wikipedia.org/wiki/Pure_function...
std::string description() const
Get the description of the NodeType.
NodeInstance * nodeInstance() const
Get the node instance.
std::string fullName() const
Get the full name of the module.
NodeType(ChiModule &mod, std::string name={}, std::string description={})
Constructor.
An abstract class that represents a module of code in Chigraph Can be compiled to a llvm::Module...
void setExecOutputs(std::vector< std::string > newOutputs)
Set the exec outputs for the NodeType.
void setDataOutputs(std::vector< NamedDataType > newOutputs)
Set the data outputs for the NodeType.
void setExecInputs(std::vector< std::string > newInputs)
Set the exec inputs for the NodeType.
bool pure()
Get if this node is pure.
void setName(std::string newName)
Set the name of the type.
virtual ~NodeType()
Destructor.
Defines the NodeType class.
Defines the DataType class.
Defines the ChiModule class.
const std::vector< NamedDataType > & dataInputs() const
Get the data inputs for the node.
The namespace where chigraph lives.
std::string qualifiedName() const
Get the qualified name of the node type, like module.name():name()
void setDataInputs(std::vector< NamedDataType > newInputs)
Set the data inputs for the NodeType.