MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / add_outgoing_edge

Method add_outgoing_edge

python/flowgraph.py:313–329  ·  view source on GitHub ↗

``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)

Source from the content-addressed store, hash-verified

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)

Callers 3

prepend_parentMethod · 0.95
populate_nodesMethod · 0.45
process_treeFunction · 0.45

Calls 3

_to_core_structMethod · 0.95
is_valid_for_graphMethod · 0.80
EdgeStyleClass · 0.70

Tested by

no test coverage detected