()
| 17 | |
| 18 | |
| 19 | def tutorial_condition(): |
| 20 | b0, b1, b2 = MyNode1("conditionNodeB0"), MyNode2("conditionNodeB1"), MyNode1("conditionNodeB2") |
| 21 | b_condition = MyCondition([b0, b1, b2]) |
| 22 | |
| 23 | d0, d1, d2 = MyNode1("conditionNodeD0"), MyNode1("conditionNodeD1"), MyNode1("conditionNodeD2") |
| 24 | d_condition = MyParamCondition([d0, d1, d2]) |
| 25 | |
| 26 | pipeline = GPipeline() |
| 27 | a, c = MyWriteParamNode(), MyReadParamNode() |
| 28 | |
| 29 | pipeline.registerGElement(a, set(), "writeNodeA") |
| 30 | pipeline.registerGElement(b_condition, {a}, "conditionB") |
| 31 | pipeline.registerGElement(c, {b_condition}, "readNodeC") |
| 32 | pipeline.registerGElement(d_condition, {c}, "conditionD") |
| 33 | |
| 34 | pipeline.init() |
| 35 | for i in range(0, 3): |
| 36 | status = pipeline.run() |
| 37 | print("==== tutorial_condition: loop : {0}, and run status = {1}".format(i + 1, status.getCode())) |
| 38 | |
| 39 | pipeline.destroy() |
| 40 | |
| 41 | |
| 42 | if __name__ == '__main__': |
no test coverage detected