LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
fundec-graph.hh
Go to the documentation of this file.
1
6
#ifndef CALLGRAPH_FUNDEC_GRAPH_HH
7
# define CALLGRAPH_FUNDEC_GRAPH_HH
8
9
# include <map>
10
# include <boost/graph/adjacency_list.hpp>
11
12
# include <
misc/graph.hh
>
13
14
# include <
ast/function-dec.hh
>
15
16
namespace
callgraph
17
{
18
19
/*--------------.
20
| FundecGraph. |
21
`--------------*/
22
23
class
FundecGraph
24
:
public
misc::directed_graph
<ast::FunctionDec*>
25
{
26
public
:
27
FundecGraph
();
28
virtual
~FundecGraph
();
29
30
public
:
32
void
fundec_add
(
ast::FunctionDec
* f);
35
void
fundec_link
(
ast::FunctionDec
* fu,
ast::FunctionDec
* fv);
36
37
public
:
39
vertex_descriptor
hfundec_get
(
ast::FunctionDec
* f)
const
;
40
41
protected
:
43
virtual
std::ostream&
44
vertex_print
(
vertex_descriptor
v, std::ostream& ostr)
const override
;
45
46
protected
:
47
typedef
std::map<ast::FunctionDec*, vertex_descriptor>
hfundecs_type
;
48
hfundecs_type
hfundecs
;
49
};
50
51
typedef
FundecGraph
CallGraph
;
52
53
54
/*------------.
55
| Iterators. |
56
`------------*/
57
59
typedef
boost::graph_traits<FundecGraph>::vertex_iterator
60
fundecgraph_vertex_iter_type
;
62
typedef
boost::graph_traits<FundecGraph>::edge_iterator
63
fundecgraph_edge_iter_type
;
65
typedef
boost::graph_traits<FundecGraph>::adjacency_iterator
66
fundecgraph_neighb_iter_type
;
67
71
typedef
fundecgraph_vertex_iter_type
callgraph_vertex_iter_type
;
73
typedef
fundecgraph_neighb_iter_type
callgraph_neighb_iter_type
;
75
76
}
// namespace callgraph
77
78
# include <
callgraph/fundec-graph.hxx
>
79
80
#endif // !CALLGRAPH_FUNDEC_GRAPH_HH
callgraph
fundec-graph.hh
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2