.. index:: pair: class; FunctionalNodeBase .. _doxid-class_functional_node_base: class FunctionalNodeBase ======================== .. toctree:: :hidden: Overview ~~~~~~~~ Non-abstract, non-templated base class for the :ref:`FunctionalNode ` class. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class FunctionalNodeBase: public :ref:`ComputationalNode` { public: // construction :target:`FunctionalNodeBase`(const std::string& id); // methods 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); }; // direct descendants template class :ref:`FunctionalNode, std::tuple>`; 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 ); .. _details-class_functional_node_base: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Non-abstract, non-templated base class for the :ref:`FunctionalNode ` class. Its existence is necessary for storing and manipulating functional nodes in the creation of Computaional Graph edges Methods ------- .. index:: pair: function; getInputById .. _doxid-class_functional_node_base_1a8f5e1195de684247ae0c8c0e8c08c093: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Port`* getInputById(const std::string&) Returns an :ref:`InputPort ` by id. .. index:: pair: function; getOutputById .. _doxid-class_functional_node_base_1a5033577ad0b588268328308f43f418c0: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Port`* getOutputById(const std::string&) Returns an :ref:`OutputPort ` by id. .. index:: pair: function; configure .. _doxid-class_functional_node_base_1a1ef6dcdfcbd6bd973c7ab46d7d653f6c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void configure() Configures the node making it ready to execute 'compute'. .. index:: pair: function; compute .. _doxid-class_functional_node_base_1ae225abeb81c72101047b49a02e74e120: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void compute() Requests the node to execute its computation. .. index:: pair: function; registerF2FEdge .. _doxid-class_functional_node_base_1a3bdfb4e643bde972b440530d428cbcde: .. ref-code-block:: cpp :class: doxyrest-title-code-block void registerF2FEdge(const std::string& i_port, const std::string& address) Request the registration of an edge between an output port in another functional node an i_port input port in this node. Creating edges between FNs requires that all FNs has been created. Thus the edges are only created from 'graphLoadedCB' callback, which is called externally when all nodes have been created. A :ref:`ComputationalGraphManager ` is used to access other nodes, so this function assumes that a :ref:`ComputationalGraphManager ` has been instantiated and it is been used to store and manage graph nodes, this is the usual case.