From: petr000 Date: Sun, 23 Oct 2011 16:30:14 +0000 (+0200) Subject: Update deffering event. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/commitdiff_plain/26593e107326b9ceacf13ae7c1d6a6d242ff6fad Update deffering event. --- diff --git a/src/stringoper.h b/src/stringoper.h index 48f337e..1d1f644 100644 --- a/src/stringoper.h +++ b/src/stringoper.h @@ -245,13 +245,15 @@ int get_model(const string line) /** Test the string to has a specified model. * case 5 : if(str.compare(0,5,"event")==0) return 1; break; case 6 : if(str.compare(0,6,"result")==0) return 5; - break; - case 7 : if(str.compare(0,7,"transit")==0) return 6; - break; - case 8 : if(str.compare(0,8,"deferral")==0) return 13; - break; + break; + case 7 : if(str.compare(0,7,"transit")==0) return 6; + break; + case 8 : if(str.compare(0,8,"deferral")==0) return 13; + break; case 10 : if(str.compare(0,10,"transition")==0) return 11; break; + case 11 : if(str.compare(0,11,"defer_event")==0) return 7; + break; case 13 : if(str.compare(0,13,"state_machine")==0) return 3; break; case 15 : if(str.compare(0,15,"custom_reaction")==0) return 12; diff --git a/src/visualizer.cpp b/src/visualizer.cpp index b920127..1a0af5a 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -127,7 +127,7 @@ class FindStates : public ASTConsumer FullSourceLoc *fsloc; /** Full Source Location instance for holding Source Manager. */ public: - list getStates() /** Return list of states. */ + list getStates() /** Return list of states of the state machine. */ { return states; } @@ -398,6 +398,11 @@ class FindStates : public ASTConsumer param = get_params(line); transitions.push_back(event.append(",").append(param)); } + if(get_model(line) == 7) + { + param = ","; + transitions.push_back(param.append(event)); + } break; case 99 : find_return_stmt(stmt, event); break;