Changeset 13951
- Timestamp:
- 05/28/12 10:46:55 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineImp.cc
r13909 r13951 122 122 StateMachineImp::StateMachineImp(ostream &out, const std::string &name) 123 123 : MessageImp(out), fName(name), fCurrentState(kSM_NotReady), 124 fRunning(false), f ExitRequested(0)124 fRunning(false), fBufferEvents(true), fExitRequested(0) 125 125 { 126 126 SetDefaultStateNames(); … … 319 319 } 320 320 321 if (IsRunning() )321 if (IsRunning() || fBufferEvents) 322 322 { 323 323 Event *event = new Event(evt, ptr, siz); … … 367 367 } 368 368 369 if (IsRunning() )369 if (IsRunning() || fBufferEvents) 370 370 PushEvent(new Event(evt)); 371 371 else -
trunk/FACT++/src/StateMachineImp.h
r13834 r13951 44 44 45 45 bool fRunning; /// Machine is in main-loop 46 bool fBufferEvents; /// Flag if events should be buffered outside the event loop 46 47 int fExitRequested; /// This is a flag which is set true if the main loop should stop 47 48 … … 116 117 /// Used to check if the main loop is already running or still running 117 118 bool IsRunning() const { return fRunning; } 119 120 /// Used to enable or disable buffering of events outside of the main loop 121 void EnableBuffer(bool b=true) { fBufferEvents=b; } 118 122 119 123 /// Post an event to the event queue
Note:
See TracChangeset
for help on using the changeset viewer.