.. index:: pair: class; QPanda::OriginQIf .. _doxid-class_q_panda_1_1_origin_q_if: class QPanda::OriginQIf ======================= .. toctree:: :hidden: Overview ~~~~~~~~ Implementation class of :ref:`QIfProg ` :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class OriginQIf: public :ref:`QPanda::QNode`, public :ref:`QPanda::AbstractControlFlowNode` { public: // construction :target:`OriginQIf`( :ref:`ClassicalCondition` classical_condition, :ref:`QProg` true_node, :ref:`QProg` false_node ); :target:`OriginQIf`( :ref:`ClassicalCondition` classical_condition, :ref:`QProg` node ); // methods virtual :ref:`NodeType` :ref:`getNodeType`() const; virtual std::shared_ptr<:ref:`QNode`> :ref:`getTrueBranch`() const; virtual std::shared_ptr<:ref:`QNode`> :ref:`getFalseBranch`() const; virtual void :ref:`setTrueBranch`(:ref:`QProg` node); virtual void :ref:`setFalseBranch`(:ref:`QProg` node); virtual :ref:`ClassicalCondition` :ref:`getCExpr`(); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods virtual :ref:`NodeType` :ref:`getNodeType`() const = 0; virtual std::shared_ptr<:ref:`QNode`> :ref:`getTrueBranch`() const = 0; virtual std::shared_ptr<:ref:`QNode`> :ref:`getFalseBranch`() const = 0; virtual void :ref:`setTrueBranch`(:ref:`QProg` node) = 0; virtual void :ref:`setFalseBranch`(:ref:`QProg` node) = 0; virtual :ref:`ClassicalCondition` :ref:`getCExpr`() = 0; .. _details-class_q_panda_1_1_origin_q_if: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Implementation class of :ref:`QIfProg ` Methods ------- .. index:: pair: function; getNodeType .. _doxid-class_q_panda_1_1_origin_q_if_1a0def277a60bff14551d62168bdb07cb3: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`NodeType` getNodeType() const Get current node type. .. rubric:: Returns: NodeType current node type .. rubric:: See also: :ref:`NodeType ` .. index:: pair: function; getTrueBranch .. _doxid-class_q_panda_1_1_origin_q_if_1a64a8ab6d43191b0c696930223ced2d10: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual std::shared_ptr<:ref:`QNode`> getTrueBranch() const Get true branch. .. rubric:: Returns: std::shared_ptr .. index:: pair: function; getFalseBranch .. _doxid-class_q_panda_1_1_origin_q_if_1a3fbf457e5a515fe1ca3b64d5f053cfc5: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual std::shared_ptr<:ref:`QNode`> getFalseBranch() const Get false branch. .. rubric:: Returns: std::shared_ptr .. index:: pair: function; setTrueBranch .. _doxid-class_q_panda_1_1_origin_q_if_1ab7dfc8455963c10a02880adffe86c594: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setTrueBranch(:ref:`QProg` node) Set the True branch. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Node - True branch node .. index:: pair: function; setFalseBranch .. _doxid-class_q_panda_1_1_origin_q_if_1ae97db69862990127d18f018f6bd58052: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setFalseBranch(:ref:`QProg` node) Set the False Branch object. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Node - False branch node .. index:: pair: function; getCExpr .. _doxid-class_q_panda_1_1_origin_q_if_1a678f9b7b012367acc8e8d6e61c2ac14a: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ClassicalCondition` getCExpr() Get classical expr. .. rubric:: Returns: :ref:`ClassicalCondition ` ptr