15 template <
class SymbolType >
18 template <
class SymbolType >
30template <
class SymbolType >
32 unsigned nodeIdCounter = 0;
33 rte.getRTE ( ).getStructure ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
36template <
class SymbolType >
38 unsigned id = nodeIdCounter ++;
40 oss << nodePrefix <<
id <<
"[label=\"+\", shape=plaintext];" << std::endl;
42 size_t lId =
node.getLeftElement ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
43 size_t rId =
node.getRightElement ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
45 oss << nodePrefix <<
id <<
" -> " << nodePrefix << lId <<
";" << std::endl;
46 oss << nodePrefix <<
id <<
" -> " << nodePrefix << rId <<
";" << std::endl;
50template <
class SymbolType >
52 unsigned id = nodeIdCounter ++;
54 oss << nodePrefix <<
id <<
"[label=\". " <<
node.getSubstitutionSymbol( ).getSymbol ( ).getSymbol ( ) <<
"\", shape=plaintext];" << std::endl;
56 size_t lId =
node.getLeftElement ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
57 size_t rId =
node.getRightElement ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
59 oss << nodePrefix <<
id <<
" -> " << nodePrefix << lId <<
";" << std::endl;
60 oss << nodePrefix <<
id <<
" -> " << nodePrefix << rId <<
";" << std::endl;
64template <
class SymbolType >
66 unsigned id = nodeIdCounter ++;
68 oss << nodePrefix <<
id <<
"[label=\"* " <<
node.getSubstitutionSymbol( ).getSymbol ( ).getSymbol ( ) <<
"\", shape=plaintext];" << std::endl;
70 unsigned childId =
node.getElement ( ).template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
72 oss << nodePrefix <<
id <<
" -> " << nodePrefix << childId <<
";" << std::endl;
76template <
class SymbolType >
78 unsigned id = nodeIdCounter ++;
80 oss << nodePrefix <<
id <<
"[label=\"" <<
node.getSymbol( ).getSymbol ( ) <<
"\", shape=plaintext];" << std::endl;
82 for (
const auto & child :
node.getChildren ( ) ) {
83 unsigned childId = child.template accept < unsigned, DotConverterRTE::Formal < SymbolType > > ( oss, nodeIdCounter, nodePrefix );
84 oss << nodePrefix <<
id <<
" -> " << nodePrefix << childId <<
";" << std::endl;
90template <
class SymbolType >
92 oss << nodePrefix << nodeIdCounter <<
"[label=\"" <<
node.getSymbol ( ).getSymbol ( ) <<
"\", shape=plaintext];" << std::endl;
93 return nodeIdCounter ++;
96template <
class SymbolType >
98 oss << nodePrefix << nodeIdCounter <<
"[label=\"#0\", shape=plaintext];" << std::endl;
99 return nodeIdCounter ++;
Definition: DotConverterRTEPart.hxx:13
static void convertInternal(ext::ostream &oss, const rte::FormalRTE< SymbolType > &rte, const std::string &nodePrefix="")
Definition: DotConverterRTEPart.hxx:31
Definition: converterCommon.hpp:8
Definition: ToFTAGlushkov.h:22