4 #ifndef ASTDOTGENERATION_H
5 #define ASTDOTGENERATION_H
8 #include "DOTGeneration.h"
9 #include "roseInternal.h"
16 void generate(
SgProject* node, traversalType tt=TOPDOWNBOTTOMUP, std::string filenamePostfix=
"");
17 void generate(
SgNode* node, std::string filename, traversalType tt = TOPDOWNBOTTOMUP,std::string filenamePostfix =
"");
18 void generate(
SgProject* project, std::string
const & filename);
22 void generateInputFiles(
SgProject* node, traversalType tt=TOPDOWNBOTTOMUP, std::string filenamePostfix=
"",
bool excludeTemplateInstantiations =
false);
25 void generateWithinFile(
SgFile* node, traversalType tt=TOPDOWNBOTTOMUP, std::string filenamePostfix=
"");
27 void addAdditionalNodesAndEdges(
SgNode* node);
33 std::string additionalNodeInfo(
SgNode* node);
36 std::string additionalNodeOptions(
SgNode* node);
39 std::string additionalEdgeInfo(
SgNode* from,
SgNode* to, std::string label);
42 std::string additionalEdgeOptions(
SgNode* from,
SgNode* to, std::string label);
46 bool commentOutNodeInGraph(
SgNode* node);
48 bool skip_write_during_traversal{
false};
52 namespace AstDOTGenerationExtended_Defaults
58 std::string operator()(
SgNode* node);
61 std::string operator()(
SgNode* node)
63 std::ostringstream ss;
68 ss << n->get_qualified_name().str() <<
"\\n";
73 ss << n->get_qualified_name().str() <<
"\\n";
78 ss << n->get_qualified_name().str() <<
"\\n";
85 ss << decl->get_qualified_name().str() <<
"\\n";
91 ss << n->get_qualified_name().str() <<
"\\n";
96 ss << sym->
get_name().getString() <<
"\\n";
101 ss << n->get_name().str() <<
"\\n";
111 std::string operator()(
SgNode* node)
113 std::ostringstream ss;
123 std::string operator()(
SgNode* node)
125 std::ostringstream ss;
127 AstSuccessorsSelectors::SuccessorsContainer c;
128 AstSuccessorsSelectors::selectDefaultSuccessors(node,c);
129 ss << c.size() <<
"\\n";
139 std::string operator()(
SgNode* node);
142 std::string operator()(
SgNode* node)
144 std::ostringstream ss;
149 ss << (n->isLValue() ?
"L-Value" :
"!L-Value") <<
"\\n";
161 std::string operator()(
SgNode* node);
164 std::string operator()(
SgNode* node)
166 std::ostringstream ss;
170 ss << n->get_type()->unparseToString() <<
"\\n";
180 std::string operator()(
SgNode* node)
185 return std::string(
"\\n") + cs(node) + name(node) + add(node);
192 std::string operator()(
SgNode*)
194 return std::string();
202 return std::string();
210 return std::string();
227 ExtraNodeOptions_t eno;
229 ExtraEdgeOptions_t eeo;
231 AstDOTGenerationExtended(ExtraNodeInfo_t eni_ = ExtraNodeInfo_t(), ExtraNodeOptions_t eno_ = ExtraNodeOptions_t(), ExtraEdgeInfo_t eei_ = ExtraEdgeInfo_t(), ExtraEdgeOptions_t eeo_ = ExtraEdgeOptions_t())
232 : eni(eni_), eno(eno_), eei(eei_), eeo(eeo_)