.. index:: pair: class; FunctionalNode, std::tuple> .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7: template class FunctionalNode, std::tuple> ====================================================================================== .. toctree:: :hidden: Overview ~~~~~~~~ Implementation of a functional node in the computational graph. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class FunctionalNode, std::tuple>: public :ref:`FunctionalNodeBase` { public: // methods template :ref:`InputPort`* :ref:`registerInput`(const std::string& id); :ref:`Port`* :ref:`getInputByIndex`(size_t idx); virtual :ref:`Port`* :ref:`getInputById`(const std::string& id); template :ref:`OutputPort`* :ref:`registerOutput`(const std::string& id); template :ref:`Port`* :ref:`getOutputByIndex`(); virtual :ref:`Port`* :ref:`getOutputById`(const std::string& id); template :ref:`Port`* :target:`getOutputByIdTuple`(const std::string& id); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // enums enum :ref:`NodeType`; // fields static const static std::map<:ref:`NodeType`, std::string> :ref:`nodeTypeStr` = {{:ref:`ComputationalNode::Input`, "Input"}, {ComputationalNode::Output, "Output"}, {ComputationalNode::Functional, "Functional"}}; // methods const std::string& :ref:`id`() const; :ref:`NodeType` :ref:`type`() const; virtual std::string :ref:`typeStr`() const; void :ref:`setVisited`(bool visited); bool :ref:`isVisited`() const; void :ref:`setDoCompute`(bool doCompute); virtual bool :ref:`doCompute`() const; static std::pair :ref:`parseNodeAddress`( const std::string& address, bool hasPort = true ); virtual :ref:`Port`* :ref:`getInputById`(const std::string&); virtual :ref:`Port`* :ref:`getOutputById`(const std::string&); virtual void :ref:`configure`(); virtual void :ref:`compute`(); void :ref:`registerF2FEdge`(const std::string& i_port, const std::string& address); .. _details-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Implementation of a functional node in the computational graph. It stores an std::function object, '_function' which is called in the node 'compute' method and which inputs and outputs can be connected to input and output ports respectively _function return value is bool, which is used to decide whether to send outputs or not Methods ------- .. index:: pair: function; registerInput .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1a9f981b908546fb816795931b70395687: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`InputPort`* registerInput(const std::string& id) Creates an :ref:`InputPort ` and connect it to an input specified by N. Returns the created port. .. index:: pair: function; getInputByIndex .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1ad7d7562762c78ab77a788a0a92c798a7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Port`* getInputByIndex(size_t idx) Returns an :ref:`InputPort ` by index. .. index:: pair: function; getInputById .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1ae591bb1fa93d26c920b4ed3a385d392e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Port`* getInputById(const std::string& id) Returns an :ref:`InputPort ` by id. .. index:: pair: function; registerOutput .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1a2ad5dd10c60a903a56986bcc52dca8ed: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`OutputPort`* registerOutput(const std::string& id) Creates an :ref:`OutputPort ` and connect it to an output specified by N. Returns the created port. .. index:: pair: function; getOutputByIndex .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1a3ed48bb6e11cf25d3ccd2b3e5df8084a: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`Port`* getOutputByIndex() Returns an :ref:`OutputPort ` by index. .. index:: pair: function; getOutputById .. _doxid-class_functional_node_3_01std_1_1tuple_3_01_i_n_p_u_t___t_y_p_e_s_8_8_8_01_4_00_01std_1_1tuple_3d00278c889f81afbd250c42d83dfd8e7_1af06a2d52615965042dcedcd471b1228c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Port`* getOutputById(const std::string& id) Returns an :ref:`OutputPort ` by id.