1 #ifndef FILTEREDCFGVIEW_H
2 #define FILTEREDCFGVIEW_H
5 #include "virtualCFG.h"
18 FilterFunction filter;
30 void setFilter(
const FilterFunction& f)
35 const CFGNode& toNode()
const
39 std::string toString()
const
42 if (nToString.find(
'>',0)>0)
43 nToString.insert(nToString.find(
'>',0)+1,
"\n");
46 std::string toStringForDebugging()
const
50 std::string id()
const
58 unsigned int getIndex()
const
62 std::vector < FilteredCFGEdge < FilterFunction > >outEdges()
const;
63 std::vector < FilteredCFGEdge < FilterFunction > >inEdges()
const;
64 bool isInteresting()
const
82 template <
typename FilterFunction >
class FilteredCFGEdge
85 FilterFunction filter;
97 void setFilter(
const FilterFunction& f)
102 std::string toString()
const
106 std::string toStringForDebugging()
const
108 return p.toStringForDebugging();
110 std::string id()
const
114 FilteredCFGNode < FilterFunction > source()
const
116 return FilteredCFGNode < FilterFunction > (p.source());
118 FilteredCFGNode < FilterFunction > target()
const
120 return FilteredCFGNode < FilterFunction > (p.target());
122 EdgeConditionKind condition()
const
124 return p.condition();
128 return p.caseLabel();
130 std::vector < SgInitializedName * >scopesBeingExited()
const
132 return p.scopesBeingExited();
134 std::vector < SgInitializedName * >scopesBeingEntered()
const
136 return p.scopesBeingEntered();
138 bool operator==(
const FilteredCFGEdge < FilterFunction > &o)
const
142 bool operator!=(
const FilteredCFGEdge < FilterFunction > &o)
const
146 bool operator<(
const FilteredCFGEdge < FilterFunction > &o)
const
158 template <
typename FilterFunction > std::ostream & cfgToDot(std::ostream & o,
159 std::string graphName,
161 FilterFunction > start);
164 #include "filteredCFGImpl.h"