IDAPython 8.4
Loading...
Searching...
No Matches
mutable_graph_t Class Reference

Proxy of C++ mutable_graph_t class.

Inheritance diagram for mutable_graph_t:
abstract_graph_t gdl_graph_t

Public Member Functions

 __init__ (self, *args, **kwargs)
 init(self) -> abstract_graph_t
 
"int" size (self, *args)
 size(self) -> int Get the total number of nodes (including group nodes, and including hidden nodes.)
 
"int" node_qty (self, *args)
 node_qty(self) -> int Get the number of visible nodes (the list can be retrieved using gdl.hpp's node_iterator)
 
"bool" empty (self, *args)
 empty(self) -> bool Is the graph (visually) empty?
 
"bool" exists (self, *args)
 exists(self, node) -> bool Is the node visible?
 
"int" get_node_representative (self, *args)
 get_node_representative(self, node) -> int Get the node that currently visually represents 'node'.
 
"int" get_node_group (self, *args)
 get_node_group(self, node) -> int
 
"void" set_node_group (self, *args)
 set_node_group(self, node, group)
 
"bool" is_deleted_node (self, *args)
 is_deleted_node(self, node) -> bool
 
"void" set_deleted_node (self, *args)
 set_deleted_node(self, node)
 
"bool" is_subgraph_node (self, *args)
 is_subgraph_node(self, node) -> bool
 
"bool" is_dot_node (self, *args)
 is_dot_node(self, node) -> bool
 
"bool" is_group_node (self, *args)
 is_group_node(self, node) -> bool
 
"bool" is_displayable_node (self, *args)
 is_displayable_node(self, node) -> bool
 
"bool" is_simple_node (self, *args)
 is_simple_node(self, node) -> bool
 
"bool" is_collapsed_node (self, *args)
 is_collapsed_node(self, node) -> bool
 
"bool" is_uncollapsed_node (self, *args)
 is_uncollapsed_node(self, node) -> bool
 
"bool" is_visible_node (self, *args)
 is_visible_node(self, node) -> bool Is the node currently visible?
 
"int" get_first_subgraph_node (self, *args)
 get_first_subgraph_node(self, group) -> int
 
"int" get_next_subgraph_node (self, *args)
 get_next_subgraph_node(self, group, current) -> int
 
"int" create_group (self, *args)
 create_group(self, nodes) -> int Create a new group node, that will contain all the nodes in 'nodes'.
 
"bool" delete_group (self, *args)
 delete_group(self, group) -> bool Delete a group node.
 
"bool" change_group_visibility (self, *args)
 change_group_visibility(self, group, expand) -> bool Expand/collapse a group node
 
"int" nsucc (self, *args)
 nsucc(self, b) -> int
 
"int" npred (self, *args)
 npred(self, b) -> int
 
"int" succ (self, *args)
 succ(self, b, i) -> int
 
"int" pred (self, *args)
 pred(self, b, i) -> int
 
"intvec_t const &" succset (self, *args)
 succset(self, b) -> intvec_t const &
 
"intvec_t const &" predset (self, *args)
 predset(self, b) -> intvec_t const &
 
"void" reset (self, *args)
 reset(self)
 
"bool" redo_layout (self, *args)
 redo_layout(self) -> bool Recompute the layout, according to the value of 'current_layout'.
 
"void" resize (self, *args)
 resize(self, n) Resize the graph to 'n' nodes
 
"int" add_node (self, *args)
 add_node(self, r) -> int Add a node, possibly with a specific geometry
 
"ssize_t" del_node (self, *args)
 del_node(self, n) -> ssize_t Delete a node
 
"bool" add_edge (self, *args)
 add_edge(self, i, j, ei) -> bool
 
"bool" del_edge (self, *args)
 del_edge(self, i, j) -> bool
 
"bool" replace_edge (self, *args)
 replace_edge(self, i, j, x, y) -> bool
 
"bool" refresh (self, *args)
 refresh(self) -> bool Refresh the graph
 
"bool" set_nrect (self, *args)
 set_nrect(self, n, r) -> bool
 
"bool" set_edge (self, *args)
 set_edge(self, e, ei) -> bool
 
"bool" create_digraph_layout (self, *args)
 create_digraph_layout(self) -> bool
 
"void" del_custom_layout (self, *args)
 del_custom_layout(self)
 
"bool" get_custom_layout (self, *args)
 get_custom_layout(self) -> bool
 
"void" set_custom_layout (self, *args)
 set_custom_layout(self)
 
"bool" get_graph_groups (self, *args)
 get_graph_groups(self) -> bool
 
"void" set_graph_groups (self, *args)
 set_graph_groups(self)
 
"ea_t" calc_group_ea (self, *args)
 calc_group_ea(self, arg2) -> ea_t
 
"bool" is_user_graph (self, *args)
 is_user_graph(self) -> bool
 
- Public Member Functions inherited from abstract_graph_t
"bool" create_tree_layout (self, *args)
 create_tree_layout(self) -> bool
 
"bool" create_circle_layout (self, *args)
 create_circle_layout(self, p, radius) -> bool
 
"void" set_callback (self, *args)
 set_callback(self, _callback, _ud)
 
"ssize_t" grcall (self, *args)
 grcall(self, code) -> ssize_t
 
"edge_info_t *" get_edge (self, *args)
 get_edge(self, e) -> edge_info_t
 
"rect_t" nrect (self, *args)
 nrect(self, n) -> rect_t
 
 __disown__ (self)
 
- Public Member Functions inherited from gdl_graph_t
"char *" get_node_label (self, *args)
 get_node_label(self, n) -> char *
 
"void" print_graph_attributes (self, *args)
 print_graph_attributes(self, fp)
 
"bool" print_node (self, *args)
 print_node(self, fp, n) -> bool
 
"bool" print_edge (self, *args)
 print_edge(self, fp, i, j) -> bool
 
"void" print_node_attributes (self, *args)
 print_node_attributes(self, fp, n)
 
"int" entry (self, *args)
 entry(self) -> int
 
"int" exit (self, *args)
 exit(self) -> int
 
"bgcolor_t" get_node_color (self, *args)
 get_node_color(self, n) -> bgcolor_t
 
"bgcolor_t" get_edge_color (self, *args)
 get_edge_color(self, i, j) -> bgcolor_t
 
"size_t" nedge (self, *args)
 nedge(self, node, ispred) -> size_t
 
"int" edge (self, *args)
 edge(self, node, i, ispred) -> int
 
"int" front (self, *args)
 front(self) -> int
 
"node_iterator" begin (self, *args)
 begin(self) -> node_iterator
 
"node_iterator" end (self, *args)
 end(self) -> node_iterator
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 gid = property(_ida_graph.mutable_graph_t_gid_get, _ida_graph.mutable_graph_t_gid_set, doc=)
 
 belongs = property(_ida_graph.mutable_graph_t_belongs_get, _ida_graph.mutable_graph_t_belongs_set, doc=)
 
 node_flags = property(_ida_graph.mutable_graph_t_node_flags_get, _ida_graph.mutable_graph_t_node_flags_set, doc=)
 
 org_succs = property(_ida_graph.mutable_graph_t_org_succs_get, _ida_graph.mutable_graph_t_org_succs_set, doc=)
 
 org_preds = property(_ida_graph.mutable_graph_t_org_preds_get, _ida_graph.mutable_graph_t_org_preds_set, doc=)
 
 succs = property(_ida_graph.mutable_graph_t_succs_get, _ida_graph.mutable_graph_t_succs_set, doc=)
 
 preds = property(_ida_graph.mutable_graph_t_preds_get, _ida_graph.mutable_graph_t_preds_set, doc=)
 
 nodes = property(_ida_graph.mutable_graph_t_nodes_get, _ida_graph.mutable_graph_t_nodes_set, doc=)
 
 edges = property(_ida_graph.mutable_graph_t_edges_get, _ida_graph.mutable_graph_t_edges_set, doc=)
 
- Properties inherited from abstract_graph_t
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 title = property(_ida_graph.abstract_graph_t_title_get, _ida_graph.abstract_graph_t_title_set, doc=)
 
 rect_edges_made = property(_ida_graph.abstract_graph_t_rect_edges_made_get, _ida_graph.abstract_graph_t_rect_edges_made_set, doc=)
 
 current_layout = property(_ida_graph.abstract_graph_t_current_layout_get, _ida_graph.abstract_graph_t_current_layout_set, doc=)
 
 circle_center = property(_ida_graph.abstract_graph_t_circle_center_get, _ida_graph.abstract_graph_t_circle_center_set, doc=!)
 
 circle_radius = property(_ida_graph.abstract_graph_t_circle_radius_get, _ida_graph.abstract_graph_t_circle_radius_set, doc=)
 
 callback_ud = property(_ida_graph.abstract_graph_t_callback_ud_get, _ida_graph.abstract_graph_t_callback_ud_set, doc=)
 
- Properties inherited from gdl_graph_t
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )
Parameters
selfPyObject *

Reimplemented from abstract_graph_t.

Member Function Documentation

◆ add_edge()

"bool" add_edge ( self,
* args )
Parameters
iint
jint
eiedge_info_t const *

◆ add_node()

"int" add_node ( self,
* args )
Parameters
r(C++: const rect_t *) the node geometry (can be nullptr)
Returns
: the new node

◆ calc_group_ea()

"ea_t" calc_group_ea ( self,
* args )
Parameters
arg2intvec_t const &

◆ change_group_visibility()

"bool" change_group_visibility ( self,
* args )
Parameters
group(C++: int) the group node
expand(C++: bool) whether to expand or collapse
Returns
: success

◆ create_digraph_layout()

"bool" create_digraph_layout ( self,
* args )

◆ create_group()

"int" create_group ( self,
* args )
Parameters
nodes(C++: const intvec_t &) the nodes that will be part of the group
Returns
: the group node, or -1 in case of error

◆ del_custom_layout()

"void" del_custom_layout ( self,
* args )

◆ del_edge()

"bool" del_edge ( self,
* args )
Parameters
iint
jint

◆ del_node()

"ssize_t" del_node ( self,
* args )
Parameters
n(C++: int) the node to delete
Returns
: the number of deleted edges

◆ delete_group()

"bool" delete_group ( self,
* args )

This deletes the group node only; it does not delete nodes that are part of the group.

Parameters
group(C++: int) the group node
Returns
: success

◆ empty()

"bool" empty ( self,
* args )
Returns
: true if there are no visible nodes

Reimplemented from gdl_graph_t.

◆ exists()

"bool" exists ( self,
* args )
Parameters
node(C++: int) the node number
Returns
: success

Reimplemented from gdl_graph_t.

◆ get_custom_layout()

"bool" get_custom_layout ( self,
* args )

◆ get_first_subgraph_node()

"int" get_first_subgraph_node ( self,
* args )
Parameters
groupint

◆ get_graph_groups()

"bool" get_graph_groups ( self,
* args )

◆ get_next_subgraph_node()

"int" get_next_subgraph_node ( self,
* args )
Parameters
groupint
currentint

◆ get_node_group()

"int" get_node_group ( self,
* args )
Parameters
nodeint

◆ get_node_representative()

"int" get_node_representative ( self,
* args )

This will find the "closest" parent group node that's visible, by attempting to walk up the group nodes that contain 'node', and will stop when it finds a node that is currently visible.

See also get_group_node()

Parameters
node(C++: int) the node
Returns
: the node that represents 'node', or 'node' if it's not part of any group

◆ is_collapsed_node()

"bool" is_collapsed_node ( self,
* args )
Parameters
nodeint

◆ is_deleted_node()

"bool" is_deleted_node ( self,
* args )
Parameters
nodeint

◆ is_displayable_node()

"bool" is_displayable_node ( self,
* args )
Parameters
nodeint

◆ is_dot_node()

"bool" is_dot_node ( self,
* args )
Parameters
nodeint

◆ is_group_node()

"bool" is_group_node ( self,
* args )
Parameters
nodeint

◆ is_simple_node()

"bool" is_simple_node ( self,
* args )
Parameters
nodeint

◆ is_subgraph_node()

"bool" is_subgraph_node ( self,
* args )
Parameters
nodeint

◆ is_uncollapsed_node()

"bool" is_uncollapsed_node ( self,
* args )
Parameters
nodeint

◆ is_user_graph()

"bool" is_user_graph ( self,
* args )

◆ is_visible_node()

"bool" is_visible_node ( self,
* args )

An invisible node is a node that's part of a group that's currently collapsed.

Parameters
node(C++: int) the node
Returns
: success

◆ node_qty()

"int" node_qty ( self,
* args )

See also size()

Returns
: the number of visible nodes

Reimplemented from gdl_graph_t.

◆ npred()

"int" npred ( self,
* args )
Parameters
bint

Reimplemented from gdl_graph_t.

◆ nsucc()

"int" nsucc ( self,
* args )
Parameters
bint

Reimplemented from gdl_graph_t.

◆ pred()

"int" pred ( self,
* args )
Parameters
bint
iint

Reimplemented from gdl_graph_t.

◆ predset()

"intvec_t const &" predset ( self,
* args )
Parameters
bint

◆ redo_layout()

"bool" redo_layout ( self,
* args )
Returns
: success

◆ refresh()

"bool" refresh ( self,
* args )

A graph needs refreshing when it's "backing data". E.g., if the number (or contents) of the objects in the above example, change.

Let's say the user's plugin ends up finding a 5th piece of scattered data. It should then add it to its internal list of known objects, and tell IDA that the graph needs to be refreshed, using refresh_viewer(). This will cause IDA to:

  • discard all its internal rendering information,
  • call mutable_graph_t.refresh() on the graph so that the user's plugin has a chance to "sync" the number of nodes & edges that this graph contains, to the information that the plugin has collected so far
  • re-create internal rendering information, and
  • repaint the view
Returns
: success

◆ replace_edge()

"bool" replace_edge ( self,
* args )
Parameters
iint
jint
xint
yint

◆ reset()

"void" reset ( self,
* args )

◆ resize()

"void" resize ( self,
* args )
Parameters
n(C++: int) the new size

◆ set_custom_layout()

"void" set_custom_layout ( self,
* args )

◆ set_deleted_node()

"void" set_deleted_node ( self,
* args )
Parameters
nodeint

◆ set_edge()

"bool" set_edge ( self,
* args )
Parameters
eedge_t
eiedge_info_t const *

◆ set_graph_groups()

"void" set_graph_groups ( self,
* args )

◆ set_node_group()

"void" set_node_group ( self,
* args )
Parameters
nodeint
groupint

◆ set_nrect()

"bool" set_nrect ( self,
* args )
Parameters
nint
rrect_t const &

◆ size()

"int" size ( self,
* args )

See also node_qty()

Returns
: the total number of nodes in the graph

Reimplemented from gdl_graph_t.

◆ succ()

"int" succ ( self,
* args )
Parameters
bint
iint

Reimplemented from gdl_graph_t.

◆ succset()

"intvec_t const &" succset ( self,
* args )
Parameters
bint

Property Documentation

◆ belongs

belongs = property(_ida_graph.mutable_graph_t_belongs_get, _ida_graph.mutable_graph_t_belongs_set, doc=)
static

◆ edges

edges = property(_ida_graph.mutable_graph_t_edges_get, _ida_graph.mutable_graph_t_edges_set, doc=)
static

◆ gid

gid = property(_ida_graph.mutable_graph_t_gid_get, _ida_graph.mutable_graph_t_gid_set, doc=)
static

◆ node_flags

node_flags = property(_ida_graph.mutable_graph_t_node_flags_get, _ida_graph.mutable_graph_t_node_flags_set, doc=)
static

◆ nodes

nodes = property(_ida_graph.mutable_graph_t_nodes_get, _ida_graph.mutable_graph_t_nodes_set, doc=)
static

◆ org_preds

org_preds = property(_ida_graph.mutable_graph_t_org_preds_get, _ida_graph.mutable_graph_t_org_preds_set, doc=)
static

◆ org_succs

org_succs = property(_ida_graph.mutable_graph_t_org_succs_get, _ida_graph.mutable_graph_t_org_succs_set, doc=)
static

◆ preds

preds = property(_ida_graph.mutable_graph_t_preds_get, _ida_graph.mutable_graph_t_preds_set, doc=)
static

◆ succs

succs = property(_ida_graph.mutable_graph_t_succs_get, _ida_graph.mutable_graph_t_succs_set, doc=)
static

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

The documentation for this class was generated from the following file: