GCC Middle and Back End API Reference
digraph< GraphTraits > Class Template Reference

#include <digraph.h>

Inheritance diagram for digraph< GraphTraits >:
Collaboration diagram for digraph< GraphTraits >:

Public Types

typedef GraphTraits::node_t node_t
 
typedef GraphTraits::edge_t edge_t
 
typedef GraphTraits::dump_args_t dump_args_t
 
typedef GraphTraits::cluster_t cluster_t
 

Public Member Functions

 digraph ()
 
virtual ~digraph ()
 
void dump_dot_to_pp (pretty_printer *pp, cluster_t *root_cluster, const dump_args_t &args) const
 
void dump_dot_to_file (FILE *fp, cluster_t *root_cluster, const dump_args_t &args) const
 
void dump_dot (const char *path, cluster_t *root_cluster, const dump_args_t &args) const
 
void add_node (node_t *node)
 
void add_edge (edge_t *edge)
 

Data Fields

auto_delete_vec< node_tm_nodes
 
auto_delete_vec< edge_tm_edges
 

Detailed Description

template<typename GraphTraits>
class digraph< GraphTraits >
Abstract base class for a directed graph.
This class maintains the vectors of nodes and edges,
and owns the nodes and edges.   

Member Typedef Documentation

◆ cluster_t

template<typename GraphTraits >
typedef GraphTraits::cluster_t digraph< GraphTraits >::cluster_t

◆ dump_args_t

template<typename GraphTraits >
typedef GraphTraits::dump_args_t digraph< GraphTraits >::dump_args_t

◆ edge_t

template<typename GraphTraits >
typedef GraphTraits::edge_t digraph< GraphTraits >::edge_t

◆ node_t

template<typename GraphTraits >
typedef GraphTraits::node_t digraph< GraphTraits >::node_t

Constructor & Destructor Documentation

◆ digraph()

◆ ~digraph()

template<typename GraphTraits >
virtual digraph< GraphTraits >::~digraph ( )
inlinevirtual

Member Function Documentation

◆ add_edge()

template<typename GraphTraits >
void digraph< GraphTraits >::add_edge ( edge_t * edge)
inline
Add EDGE to this digraph, and to the preds/succs of its endpoints.
Take ownership of EDGE.   

◆ add_node()

template<typename GraphTraits >
void digraph< GraphTraits >::add_node ( node_t * node)
inline
Add NODE to this DIGRAPH, taking ownership.   

◆ dump_dot()

template<typename GraphTraits >
void digraph< GraphTraits >::dump_dot ( const char * path,
cluster_t * root_cluster,
const dump_args_t & args ) const
inline
Write .dot information for this graph to a file at PATH, passing ARGS
to the nodes and edges.
If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.   

References fopen, and ggc_alloc().

◆ dump_dot_to_file()

template<typename GraphTraits >
void digraph< GraphTraits >::dump_dot_to_file ( FILE * fp,
cluster_t * root_cluster,
const dump_args_t & args ) const
inline
Write .dot information for this graph to FP, passing ARGS to the nodes
and edges.
If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.   

References pretty_printer::buffer, default_tree_printer(), ggc_alloc(), pp_flush(), pp_format_decoder, and output_buffer::stream.

◆ dump_dot_to_pp()

template<typename GraphTraits >
void digraph< GraphTraits >::dump_dot_to_pp ( pretty_printer * pp,
cluster_t * root_cluster,
const dump_args_t & args ) const
inline
Write .dot information for this graph to PP, passing ARGS to the nodes
and edges.
If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.   

References FOR_EACH_VEC_ELT, ggc_alloc(), i, pp_newline(), and pp_string().

Field Documentation

◆ m_edges

◆ m_nodes


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