| 110 | } |
| 111 | |
| 112 | void QProgStored::transformQControlFlow(AbstractControlFlowNode *p_controlflow) |
| 113 | { |
| 114 | if (nullptr == p_controlflow) |
| 115 | { |
| 116 | QCERR("pQControlFlow is null"); |
| 117 | throw invalid_argument("pQControlFlow is null"); |
| 118 | } |
| 119 | |
| 120 | ClassicalCondition p_classcical_condition = p_controlflow->getCExpr(); |
| 121 | auto expr = p_classcical_condition.getExprPtr().get(); |
| 122 | transformCExpr(expr); |
| 123 | |
| 124 | QNode *p_node = dynamic_cast<QNode *>(p_controlflow); |
| 125 | int node_type = p_node->getNodeType(); |
| 126 | |
| 127 | switch (node_type) |
| 128 | { |
| 129 | case NodeType::QIF_START_NODE: |
| 130 | transformQIfProg(p_controlflow); |
| 131 | break; |
| 132 | case NodeType::WHILE_START_NODE: |
| 133 | transformQWhileProg(p_controlflow); |
| 134 | break; |
| 135 | default: |
| 136 | QCERR("NodeType is error"); |
| 137 | throw invalid_argument("NodeType is error"); |
| 138 | break; |
| 139 | } |
| 140 | |
| 141 | return; |
| 142 | } |
| 143 | |
| 144 | |
| 145 | void QProgStored::transformQIfProg(AbstractControlFlowNode *p_controlFlow) |
nothing calls this directly
no test coverage detected