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 >
GraphTraits::cluster_t digraph< GraphTraits >::cluster_t

◆ dump_args_t

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

◆ edge_t

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

◆ node_t

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

Constructor & Destructor Documentation

◆ digraph()

template<typename GraphTraits >
digraph< GraphTraits >::digraph ( )
inline

◆ ~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.

◆ 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 default_tree_printer(), pp_flush(), pp_format_decoder(), and pretty_printer::set_output_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, i, graphviz_out::indent(), graphviz_out::outdent(), pp_newline(), and pp_string().

Field Documentation

◆ m_edges

template<typename GraphTraits >
auto_delete_vec<edge_t> digraph< GraphTraits >::m_edges

◆ m_nodes

template<typename GraphTraits >
auto_delete_vec<node_t> digraph< GraphTraits >::m_nodes

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