Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

IncidentSvc.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GaudiSvc/src/IncidentSvc/IncidentSvc.h,v 1.1.1.2 2001/04/18 18:32:50 tlindner Exp $
00002 #ifndef IncidentSvc_IncidentSvc_H
00003 #define IncidentSvc_IncidentSvc_H
00004 
00005 // Include Files
00006 #include "GaudiKernel/Service.h"
00007 #include "GaudiKernel/SvcFactory.h"
00008 #include "GaudiKernel/IIncidentSvc.h"
00009 
00010 #include <map>
00011 #include <list>
00012 
00013 // Forward declarations
00014 
00015 //------------------------------------------------------------------
00016 //
00017 // ClassName:   IncidentSvc
00018 //  
00019 // Description: This service manages Auditors. 
00020 //              Auditors can be inserted in the system to audit the Algorithms is 
00021 //              in their functions.
00022 //------------------------------------------------------------------
00023 class IncidentSvc : public Service, virtual public IIncidentSvc {
00024 
00025 public: 
00026   
00027 // Typedefs
00028   typedef std::pair<IIncidentListener*,long> Listener;
00029   typedef std::list<Listener> ListenerList;
00030   typedef std::map<std::string, ListenerList*> ListenerMap;
00031 
00032 // Inherited Service overrides:
00033 //
00034   virtual StatusCode initialize();
00035   virtual StatusCode finalize();
00036   virtual StatusCode queryInterface( const IID& riid, void** ppvInterface );
00037     
00038 // IIncidentSvc interfaces overwrite
00039 // 
00040   virtual void addListener(IIncidentListener* lis, const std::string& type = "", long priority = 0);
00041   virtual void removeListener(IIncidentListener* lis, const std::string& type = "");
00042   virtual void fireIncident( const Incident& incident );
00043 
00044 protected:
00045   
00046   // Standard Constructor.
00047   IncidentSvc( const std::string& name, ISvcLocator* svc );
00048   // Destructor.
00049   virtual ~IncidentSvc();
00050 
00051 private:
00052   // Allow SvcFactory to instantiate the service.
00053   friend class SvcFactory<IncidentSvc>;
00054 
00055   // List of auditor names
00056   ListenerMap  m_listenerMap;
00057 };
00058 
00059 #endif
00060 
00061 

Generated at Wed Nov 21 12:22:30 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000