| 61 | |
| 62 | |
| 63 | class EdgeStyle: |
| 64 | def __init__(self, style: Optional[EdgePenStyle] = None, width: Optional[int] = None, theme_color: Optional[ThemeColor] = None): |
| 65 | self.style = style if style is not None else EdgePenStyle.SolidLine |
| 66 | self.width = width if width is not None else 0 |
| 67 | self.color = theme_color if theme_color is not None else ThemeColor.AddressColor |
| 68 | |
| 69 | def _to_core_struct(self) -> core.BNEdgeStyle: |
| 70 | result = core.BNEdgeStyle() |
| 71 | result.style = int(self.style) |
| 72 | result.width = self.width |
| 73 | result.color = self.color |
| 74 | return result |
| 75 | |
| 76 | @staticmethod |
| 77 | def from_core_struct(edge_style): |
| 78 | return EdgeStyle(edge_style.style, edge_style.width, edge_style.color) |
| 79 | |
| 80 | def __eq__(self, other): |
| 81 | return (self.style, self.width, self.color) == (other.style, other.width, other.color) |
| 82 | |
| 83 | def __hash__(self): |
| 84 | return hash((self.style, self.width, self.color)) |
| 85 | |
| 86 | |
| 87 | class FlowGraphNode: |
no outgoing calls
no test coverage detected