Guest User

Untitled

a guest
Jun 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /*
  2.  
  3. typedef boost::circular_buffer< Event > Event_buffer;
  4. typedef std::map< std::string, Event_config > Event_config_map;
  5.  
  6. typedef std::set< std::string > Set_of_sources;
  7. typedef std::map< std::string, Set_of_sources > Active_events_map;
  8.  
  9. /** Event id => event configuration */
  10. Event_config_map event_config;
  11.  
  12. /** Event id => set of sources */
  13. Active_events_map active_events;
  14. */
  15.  
  16. Event_severity Event_logger::highest_active_event_severity()
  17. {
  18. Event_severity highest_severity = cleared;
  19. BOOST_FOREACH( const Active_events_map::value_type& event, active_events )
  20. {
  21. Event_severity event_severity = event_config[ event.first ].severity;
  22. if( event_severity < highest_severity )
  23. {
  24. highest_severity = event_severity;
  25. }
  26. }
  27.  
  28. return highest_severity;
  29. }
Add Comment
Please, Sign In to add comment