]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/blobdiff - src/visualizer.cpp
Do not require C++11 capable compiler
[boost-statechart-viewer.git] / src / visualizer.cpp
index 0d4998f6f19513479cd6b205d7e5da3adeaf26f4..4aceb86f8c10642e424962411d1fef257c38aa83 100644 (file)
@@ -27,6 +27,7 @@
 
 //clang header files
 #include "clang/AST/ASTConsumer.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -56,12 +57,12 @@ public:
        ofstream f(fn.c_str());
        f << "digraph " << name << " {\n";
        f << "  " << name_of_start << " [peripheries=2]\n";
-       for (string& s : states) {
-           f << "  " << s << "\n";
+       for (list<string>::iterator s = states.begin(), e = states.end(); s != e; ++s) {
+           f << "  " << *s << "\n";
        }
 
-       for (Transition &t : transitions) {
-           f << t.src << " -> " << t.dst << " [label = \"" << t.event << "\"]\n";
+       for (list<Transition>::iterator t = transitions.begin(), e = transitions.end(); t != e; ++t) {
+           f << t->src << " -> " << t->dst << " [label = \"" << t->event << "\"]\n";
        }
 
        f << "}";