FACT++  1.0
EventImp * StateMachineImp::FindEvent ( const std::string &  evt)

Check whether an event with the given name is found in fListOfEvents. Note that currently there is no mechanism which ensures that not two events have the same name.

Returns
true if the event was found, false otherwise

Definition at line 494 of file StateMachineImp.cc.

References fListOfEvents, and fMutexEvt.

Referenced by PostEvent().

495 {
496  // Find the command from the list of commands and queue it
497  const lock_guard<mutex> guard(fMutexEvt);
498  for (vector<EventImp*>::const_iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
499  if (evt == (*c)->GetName())
500  return *c;
501 
502  return 0;
503 }
std::vector< EventImp * > fListOfEvents
std::mutex fMutexEvt
Mutex to ensure thread-safe access to the command fifo.

+ Here is the caller graph for this function: