2 #ifndef SYDEVS_SYSTEMS_PARAMETER_NODE_H_
3 #define SYDEVS_SYSTEMS_PARAMETER_NODE_H_
54 const T&
value()
const;
60 virtual void flow_event();
67 , parameter(
"parameter", external_interface())
76 , parameter(
"parameter", external_interface())
85 if (!val_)
throw std::logic_error(
"No value provided for parameter node (" + full_name() +
")");
86 return val_.dereference<T>();
100 parameter.assign(value());
port< flow, output, T > parameter
The flow output port on which the parameter value is provided.
Definition: parameter_node.h:52
const std::string & node_name() const
Returns the name of the node.
Definition: system_node.h:135
Definition: qualified_type.h:24
A class template for nodes which supply parameter values.
Definition: parameter_node.h:20
parameter_node(const std::string &node_name, const node_context &external_context)
Constructs a parameter_node.
Definition: parameter_node.h:65
static pointer copy(const T &X)
If T is a qualified type, returns a deep copy of X.
Definition: qualified_type.h:174
Definition: node_context.h:16
void set_value(const T &X)
Sets the parameter value to X.
Definition: parameter_node.h:91
A base class for indivisible nodes in which function behavior is procedurally encoded.
Definition: function_node.h:21
A class template for flow output ports.
Definition: port.h:183
const T & value() const
Returns the parameter value.
Definition: parameter_node.h:83
A data type which represents a pointer to anything.
Definition: pointer.h:27