]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Update deffering event.
authorpetr000 <silhavik.p@gmail.com>
Sun, 23 Oct 2011 16:30:14 +0000 (18:30 +0200)
committerpetr000 <silhavik.p@gmail.com>
Sun, 23 Oct 2011 16:30:14 +0000 (18:30 +0200)
src/stringoper.h
src/visualizer.cpp

index 48f337e317e52fade87d7224af46d3e29d5542e3..1d1f6444c9a757b5175b4b5280744594c241d6af 100644 (file)
@@ -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;
index b920127bf9aa338af7d2a21a9b58ce54c28d2f8c..1a0af5ac467f996dff2bedf4d5d3d34f29468bc8 100644 (file)
@@ -127,7 +127,7 @@ class FindStates : public ASTConsumer
        FullSourceLoc *fsloc; /** Full Source Location instance for holding Source Manager. */
        public:
 
-       list<string> getStates() /** Return list of states. */
+       list<string> 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;