7template<
typename NodeType>
22 stream <<
"{" << std::endl;
28 if (has_declaration) {
30 stream <<
"}" << std::endl;
39 auto val = const_node->data();
40 stream <<
language_extension_.declaration(name, const_node->type()) <<
" = " << val <<
";" << std::endl;
Dispatchers for dataflow blocks and library nodes.
Definition language_extension.h:39
virtual ~LibraryNodeDispatcherBase()=default
LibraryNodeDispatcherBase(codegen::LanguageExtension &language_extension, const Function &function, const data_flow::DataFlowGraph &data_flow_graph, const NodeType &node)
Definition library_node_dispatcher_base.h:10
virtual void end_node(codegen::PrettyPrinter &stream, bool has_declaration)
End code generation for the node.
Definition library_node_dispatcher_base.h:27
const std::string & require_param_as_var_equivalent(codegen::PrettyPrinter &stream, const data_flow::AccessNode *node, const std::string &name)
Definition library_node_dispatcher_base.h:35
virtual bool begin_node(codegen::PrettyPrinter &stream)
Begin code generation for the node.
Definition library_node_dispatcher_base.h:21
Base class for library node code generation dispatchers.
Definition block_dispatcher.h:163
LibraryNodeDispatcher(LanguageExtension &language_extension, const Function &function, const data_flow::DataFlowGraph &data_flow_graph, const data_flow::LibraryNode &node)
Construct a library node dispatcher.
LanguageExtension & language_extension_
Language extension for code generation.
Definition block_dispatcher.h:165
int changeIndent(int delta)
Node representing access to a data container in the dataflow graph.
Definition access_node.h:84
const std::string & data() const
Get the name of the data container.
Node representing a constant literal value in the dataflow graph.
Definition access_node.h:205
Definition data_flow_graph.h:29
Definition argument_registry.h:10