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};
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_)
This class represents the concept of a class declaration statement. It includes the concept of an ins...
This class defines the DOT output (graphical representation) of the AST.
This class represents a source file for a project (which may contian many source files and or directo...
This class represents the notion of a declared variable.
This class represents the concept of a function declaration statement.
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes, since similar to statement, expressions have a concrete location within the user's source code.
This class represents the base class for all IR nodes within Sage III.
This class represents the concept of a variable name within the compiler (a shared container for the ...
This class represents the concept of a C++ namespace declaration.
This class represents the variable refernece in expressions.
This class defines the DOT output (graphical representation) of the AST.
This class represents the function being called and must be assembled in the SgFunctionCall with the ...
This class represents a source project, with a list of SgFile objects and global information about th...
This class defines the DOT output (graphical representation) of the AST.
SgName get_name() const override
Access function for getting name from declarations or types internally.