Warning, file /include/GaudiKernel/IIncidentSvc.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef INTERFACES_IINCIDENTSVC_H
0012 #define INTERFACES_IINCIDENTSVC_H
0013
0014
0015 #include <GaudiKernel/EventContextHash.h>
0016 #include <GaudiKernel/IInterface.h>
0017 #include <GaudiKernel/Incident.h>
0018 #include <memory>
0019 #include <string>
0020 #include <vector>
0021
0022 class IIncidentListener;
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 class GAUDI_API IIncidentSvc : virtual public IInterface {
0034 public:
0035
0036 DeclareInterfaceID( IIncidentSvc, 2, 0 );
0037
0038
0039
0040
0041
0042
0043 virtual void addListener( IIncidentListener* lis, const std::string& type = "", long priority = 0,
0044 bool rethrow = false, bool singleShot = false ) = 0;
0045
0046
0047
0048
0049 virtual void removeListener( IIncidentListener* lis, const std::string& type = "" ) = 0;
0050
0051
0052 virtual void getListeners( std::vector<IIncidentListener*>& lis, const std::string& type = "" ) const = 0;
0053
0054
0055
0056
0057 virtual void fireIncident( const Incident& incident ) = 0;
0058
0059
0060 struct Listener final {
0061 IIncidentListener* iListener{ nullptr };
0062 long priority{ 0 };
0063 bool rethrow{ false };
0064 bool singleShot{ false };
0065 };
0066
0067
0068 typedef std::vector<std::pair<std::unique_ptr<Incident>, std::vector<Listener>>> IncidentPack;
0069
0070
0071 virtual IIncidentSvc::IncidentPack getIncidents( const EventContext* ctx ) = 0;
0072
0073
0074
0075
0076
0077 virtual void fireIncident( std::unique_ptr<Incident> incident ) = 0;
0078 };
0079
0080 #endif