FACT++  1.0
shared_ptr< Event > StateMachineImp::PopEvent ( )
protected

Pop a command from the fifo.

Get an event from the fifo. We will take over the owenership of the object. The pointer is deleted from the fifo. Access of fEventQueue is encapsulated by fMutex.

Returns
A pointer to an Event object

Definition at line 181 of file StateMachineImp.cc.

References fEventQueue, and fMutex.

Referenced by Run().

182 {
183  const lock_guard<mutex> guard(fMutex);
184 
185  // Get the next event from the stack
186  // and remove event from the stack
187  const shared_ptr<Event> cmd = fEventQueue.front();
188  fEventQueue.pop_front();
189  return cmd;
190 }
std::list< std::shared_ptr< Event > > fEventQueue
List of available commands as setup by user.
std::mutex fMutex
Event queue (fifo) for the received commands.

+ Here is the caller graph for this function: