3#include <Core/Containers/VariableSet.hpp>
4#include <Core/Utils/TypesUtils.hpp>
5#include <Dataflow/Core/Node.hpp>
8#include <nlohmann/json.hpp>
61 RA_NODE_PORT_IN( T, from );
62 RA_NODE_PORT_OUT( T, to );
72SingleDataSourceNode<T>::SingleDataSourceNode(
const std::string& instanceName,
74 Node( instanceName, typeName ) {
75 m_port_in_from->set_default_value( T {} );
76 m_port_out_to->set_data( &m_port_in_from->data() );
82 m_port_out_to->set_data( &m_port_in_from->data() );
88 m_port_in_from->set_default_value(
std::move( data ) );
89 m_port_out_to->set_data( &m_port_in_from->data() );
94 return &( m_port_in_from->data() );
100 std::string {
"Source<" } + Ra::Core::Utils::simplifiedDemangledType<T>() +
">";
101 return demangledTypeName;
Base abstract class for all the nodes added and used by the node system.
virtual bool fromJsonInternal(const nlohmann::json &data)
Internal json representation of the Node.
virtual void toJsonInternal(nlohmann::json &data) const
Internal json representation of the Node.
Base class for nodes that will give access to some input data to the graph. This class can be used to...
bool fromJsonInternal(const nlohmann::json &data) override
Internal json representation of the Node.
T * data() const
Get the delivered data.
void toJsonInternal(nlohmann::json &data) const override
Internal json representation of the Node.
void set_data(T data)
Set the data to be delivered by the node.
bool execute() override
Executes the node.
hepler function to manage enum as underlying types in VariableSet