``add_outgoing_edge`` connects two flow graph nodes with an edge. :param BranchType edge_type: Type of edge to add :param FlowGraphNode target: Target node object :param EdgeStyle style: (optional) Styling for graph edge Branch Type must be set to UserDefinedBranch
(self, edge_type, target, style=None)
| 311 | core.BNSetFlowGraphNodeHighlight(self.handle, color._to_core_struct()) |
| 312 | |
| 313 | def add_outgoing_edge(self, edge_type, target, style=None): |
| 314 | """ |
| 315 | ``add_outgoing_edge`` connects two flow graph nodes with an edge. |
| 316 | |
| 317 | :param BranchType edge_type: Type of edge to add |
| 318 | :param FlowGraphNode target: Target node object |
| 319 | :param EdgeStyle style: (optional) Styling for graph edge Branch Type must be set to UserDefinedBranch |
| 320 | """ |
| 321 | if not target.is_valid_for_graph(self._graph): |
| 322 | raise ValueError("Target of edge has not been added to the owning graph") |
| 323 | |
| 324 | if style is None: |
| 325 | style = EdgeStyle() |
| 326 | elif not isinstance(style, EdgeStyle): |
| 327 | raise AttributeError("style must be of type EdgeStyle") |
| 328 | |
| 329 | core.BNAddFlowGraphNodeOutgoingEdge(self.handle, edge_type, target.handle, style._to_core_struct()) |
| 330 | |
| 331 | def is_valid_for_graph(self, graph): |
| 332 | return core.BNIsNodeValidForFlowGraph(graph.handle, self.handle) |
no test coverage detected