IDA C++ SDK 9.2
Loading...
Searching...
No Matches
drawable_graph_t Class Referenceabstract

#include <graph.hpp>

Inheritance diagram for drawable_graph_t:
gdl_graph_t interactive_graph_t

Public Member Functions

virtual ~drawable_graph_t ()
void idaapi clear (void)
void idaapi dump_graph (const char *header) const
bool idaapi calc_bounds (rect_t *r)
void idaapi calc_fitting_params (const rect_t &area, const rect_t &r, graph_location_info_t *gli, double max_zoom)
bool idaapi calc_fitting_params (const rect_t &area, graph_location_info_t *gli, double max_zoom)
int idaapi for_all_nodes_edges (graph_visitor_t &nev, bool visit_nodes=true)
const edge_info_t *idaapi get_edge_ports (edge_t e, point_t &s, point_t &d) const
void idaapi add_node_edges (edgevec_t &dlist, int node)
const rect_t &idaapi nrect (int n) const
const edge_info_t *idaapi get_edge (edge_t e) const
virtual rect_t &idaapi nrect (int n)=0
virtual edge_info_t *idaapi get_edge (edge_t e)=0
virtual drawable_graph_t *idaapi clone (void) const =0
bool idaapi create_tree_layout (void)
bool idaapi create_circle_layout (point_t p, int radius)
bool idaapi create_polar_tree_layout (point_t p, int radius)
bool idaapi create_radial_tree_layout (point_t p, int radius)
bool idaapi create_orthogonal_layout (void)
void set_callback (hook_cb_t *_callback, void *_ud)
ssize_t vgrcall (int code, va_list va)
ssize_t grcall (int code,...)
Public Member Functions inherited from gdl_graph_t
 DEFINE_MEMORY_ALLOCATION_FUNCS () virtual ~gdl_graph_t()
virtual char *idaapi get_node_label (char *iobuf, int iobufsize, int n) const
virtual void idaapi print_graph_attributes (FILE *fp) const
virtual bool idaapi print_node (FILE *fp, int n) const
virtual bool idaapi print_edge (FILE *fp, int i, int j) const
virtual void idaapi print_node_attributes (FILE *fp, int n) const
virtual int idaapi size (void) const =0
virtual int idaapi node_qty (void) const
virtual bool idaapi exists (int node) const
virtual int idaapi entry (void) const
virtual int idaapi exit (void) const
virtual int idaapi nsucc (int node) const =0
virtual int idaapi npred (int node) const =0
virtual int idaapi succ (int node, int i) const =0
virtual int idaapi pred (int node, int i) const =0
virtual bool idaapi empty (void) const
virtual bgcolor_t idaapi get_node_color (int n) const
virtual bgcolor_t idaapi get_edge_color (int i, int j) const
void idaapi gen_gdl (FILE *fp) const
void idaapi gen_gdl (const char *file) const
size_t idaapi nedge (int node, bool ispred) const
int idaapi edge (int node, int i, bool ispred) const
int idaapi front (void)
node_iterator idaapi begin (void) const
node_iterator idaapi end (void) const
bool idaapi path_exists (int m, int n) const
void idaapi gen_dot (FILE *fp) const
void idaapi gen_dot (const char *file) const

Public Attributes

qstring title
 graph title
bool rect_edges_made = false
 have create rectangular edges?
layout_type_t current_layout = layout_none
 see Proximity view layouts
point_t circle_center
 for layout_circle
int circle_radius = 0
 for layout_circle
hook_cb_tcallback = nullptr
 user-defined callback
voidcallback_ud = nullptr
 user data for callback

Protected Member Functions

void idaapi get_connected_components (intvec_t &entries) const
 Returns one entry point for each connected component.
int idaapi calc_longest_pathes (const node_set_t &entries, intvec_t &tops, int row_height) const
 Find longest paths from the entries.
void idaapi move_nodes_down (intvec_t &tops, const node_ordering_t &post, int first_reverser_node, int row_height) const
 Move entry nodes down as much as possible.
void idaapi create_graph_row_info (const intvec_t &tops, graph_row_info_t &gri, int graph_height) const
 Create graph row info from 'tops'.
void idaapi calc_row_heights (graph_row_info_t &gri) const
 Calculate height of each row.
void idaapi minimize_crossings (graph_row_info_t &gri) const
 Minimize crossings.
void idaapi set_x_coords (const graph_row_info_t &gri, const node_set_t &selfrefs, int first_added_node)
 Calculate x coords of all nodes.
void idaapi gather_edge_segments (const graph_row_info_t &gri, edge_segs_vec_t &ges) const
 Gather information about all edge segments.
void idaapi make_rect_edges (graph_row_info_t &gri, const edge_segs_vec_t &ges, int first_reverser_node)
 Make all edges rectangular.
void idaapi assign_edge_ports (const graph_row_info_t &gri, const node_set_t &selfrefs)
 Assign ports to edges.
void idaapi recalc_edge_widths (const edgeset_t &back_edges, const edge_infos_t &self_edges)
 Recalculate width of all edges.
void idaapi clear_layout_info (void)
 Clear layout information in the graph.
void idaapi depth_first (node_ordering_t *pre, node_ordering_t *post, edge_typer_t *et) const
void idaapi create_spanning_tree (edge_typer_t *et, node_set_t *entries, edgeset_t *back_edges, node_ordering_t *pre, node_ordering_t *post) const
void idaapi tree_layout (edge_typer_t &et, const node_set_t &entries)
bool idaapi path_back (const array_of_node_set_t &domin, int m, int n) const
 Is there a path from M to N which terminates with a back edge to N?
bool idaapi path_back (edge_typer_t &et, int m, int n) const
int idaapi visit_nodes (int node, graph_node_visitor_t &gv) const
 Visit nodes starting from 'node', depth first.
int idaapi visit_paths (int node, graph_path_visitor_t &gv) const
 Visit all possible paths starting from 'node'.

Constructor & Destructor Documentation

◆ ~drawable_graph_t()

virtual drawable_graph_t::~drawable_graph_t ( )
inlinevirtual

Member Function Documentation

◆ get_connected_components()

void idaapi drawable_graph_t::get_connected_components ( intvec_t & entries) const
protected

Returns one entry point for each connected component.

◆ calc_longest_pathes()

int idaapi drawable_graph_t::calc_longest_pathes ( const node_set_t & entries,
intvec_t & tops,
int row_height ) const
protected

Find longest paths from the entries.

take into account node heights. if row_height > 0, then use it instead of real node heights. return max distance found

◆ move_nodes_down()

void idaapi drawable_graph_t::move_nodes_down ( intvec_t & tops,
const node_ordering_t & post,
int first_reverser_node,
int row_height ) const
protected

Move entry nodes down as much as possible.

◆ create_graph_row_info()

void idaapi drawable_graph_t::create_graph_row_info ( const intvec_t & tops,
graph_row_info_t & gri,
int graph_height ) const
protected

Create graph row info from 'tops'.

◆ calc_row_heights()

void idaapi drawable_graph_t::calc_row_heights ( graph_row_info_t & gri) const
protected

Calculate height of each row.

◆ minimize_crossings()

void idaapi drawable_graph_t::minimize_crossings ( graph_row_info_t & gri) const
protected

Minimize crossings.

◆ set_x_coords()

void idaapi drawable_graph_t::set_x_coords ( const graph_row_info_t & gri,
const node_set_t & selfrefs,
int first_added_node )
protected

Calculate x coords of all nodes.

◆ gather_edge_segments()

void idaapi drawable_graph_t::gather_edge_segments ( const graph_row_info_t & gri,
edge_segs_vec_t & ges ) const
protected

Gather information about all edge segments.

◆ make_rect_edges()

void idaapi drawable_graph_t::make_rect_edges ( graph_row_info_t & gri,
const edge_segs_vec_t & ges,
int first_reverser_node )
protected

Make all edges rectangular.

◆ assign_edge_ports()

void idaapi drawable_graph_t::assign_edge_ports ( const graph_row_info_t & gri,
const node_set_t & selfrefs )
protected

Assign ports to edges.

◆ recalc_edge_widths()

void idaapi drawable_graph_t::recalc_edge_widths ( const edgeset_t & back_edges,
const edge_infos_t & self_edges )
protected

Recalculate width of all edges.

◆ clear_layout_info()

void idaapi drawable_graph_t::clear_layout_info ( void )
protected

Clear layout information in the graph.

◆ depth_first()

void idaapi drawable_graph_t::depth_first ( node_ordering_t * pre,
node_ordering_t * post,
edge_typer_t * et ) const
protected

◆ create_spanning_tree()

void idaapi drawable_graph_t::create_spanning_tree ( edge_typer_t * et,
node_set_t * entries,
edgeset_t * back_edges,
node_ordering_t * pre,
node_ordering_t * post ) const
protected

◆ tree_layout()

void idaapi drawable_graph_t::tree_layout ( edge_typer_t & et,
const node_set_t & entries )
protected

◆ path_back() [1/2]

bool idaapi drawable_graph_t::path_back ( const array_of_node_set_t & domin,
int m,
int n ) const
protected

Is there a path from M to N which terminates with a back edge to N?

◆ path_back() [2/2]

bool idaapi drawable_graph_t::path_back ( edge_typer_t & et,
int m,
int n ) const
protected

◆ visit_nodes()

int idaapi drawable_graph_t::visit_nodes ( int node,
graph_node_visitor_t & gv ) const
protected

Visit nodes starting from 'node', depth first.

◆ visit_paths()

int idaapi drawable_graph_t::visit_paths ( int node,
graph_path_visitor_t & gv ) const
protected

Visit all possible paths starting from 'node'.

A path cannot contain the same node twice.

◆ clear()

void idaapi drawable_graph_t::clear ( void )

◆ dump_graph()

void idaapi drawable_graph_t::dump_graph ( const char * header) const

◆ calc_bounds()

bool idaapi drawable_graph_t::calc_bounds ( rect_t * r)

◆ calc_fitting_params() [1/2]

void idaapi drawable_graph_t::calc_fitting_params ( const rect_t & area,
const rect_t & r,
graph_location_info_t * gli,
double max_zoom )

◆ calc_fitting_params() [2/2]

bool idaapi drawable_graph_t::calc_fitting_params ( const rect_t & area,
graph_location_info_t * gli,
double max_zoom )

◆ for_all_nodes_edges()

int idaapi drawable_graph_t::for_all_nodes_edges ( graph_visitor_t & nev,
bool visit_nodes = true )

◆ get_edge_ports()

const edge_info_t *idaapi drawable_graph_t::get_edge_ports ( edge_t e,
point_t & s,
point_t & d ) const

◆ add_node_edges()

void idaapi drawable_graph_t::add_node_edges ( edgevec_t & dlist,
int node )

◆ nrect() [1/2]

const rect_t &idaapi drawable_graph_t::nrect ( int n) const
inline

◆ get_edge() [1/2]

const edge_info_t *idaapi drawable_graph_t::get_edge ( edge_t e) const
inline

◆ nrect() [2/2]

virtual rect_t &idaapi drawable_graph_t::nrect ( int n)
pure virtual

Implemented in interactive_graph_t.

◆ get_edge() [2/2]

virtual edge_info_t *idaapi drawable_graph_t::get_edge ( edge_t e)
pure virtual

Implemented in interactive_graph_t.

◆ clone()

virtual drawable_graph_t *idaapi drawable_graph_t::clone ( void ) const
pure virtual

Implemented in interactive_graph_t.

◆ create_tree_layout()

bool idaapi drawable_graph_t::create_tree_layout ( void )
inline

◆ create_circle_layout()

bool idaapi drawable_graph_t::create_circle_layout ( point_t p,
int radius )
inline

◆ create_polar_tree_layout()

bool idaapi drawable_graph_t::create_polar_tree_layout ( point_t p,
int radius )

◆ create_radial_tree_layout()

bool idaapi drawable_graph_t::create_radial_tree_layout ( point_t p,
int radius )

◆ create_orthogonal_layout()

bool idaapi drawable_graph_t::create_orthogonal_layout ( void )

◆ set_callback()

void drawable_graph_t::set_callback ( hook_cb_t * _callback,
void * _ud )
inline

◆ vgrcall()

ssize_t drawable_graph_t::vgrcall ( int code,
va_list va )
inline

◆ grcall()

ssize_t drawable_graph_t::grcall ( int code,
... )
inline

Member Data Documentation

◆ title

qstring drawable_graph_t::title

graph title

◆ rect_edges_made

bool drawable_graph_t::rect_edges_made = false

have create rectangular edges?

◆ current_layout

layout_type_t drawable_graph_t::current_layout = layout_none

◆ circle_center

point_t drawable_graph_t::circle_center

for layout_circle

◆ circle_radius

int drawable_graph_t::circle_radius = 0

for layout_circle

◆ callback

hook_cb_t* drawable_graph_t::callback = nullptr

user-defined callback

◆ callback_ud

void* drawable_graph_t::callback_ud = nullptr

user data for callback


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