All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ModuleIncident.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_MODULEINCIDENT_H
2 #define GAUDIKERNEL_MODULEINCIDENT_H
3 
4 // Include files
5 #include <string>
6 #include "GaudiKernel/Incident.h"
7 
14 class ModuleIncident : public Incident {
15 protected:
17 
18  ModuleIncident(const std::string& source, // Source(service or alg) name)
19  const std::string& type, // Type (load, unload, ...)
20  const std::string& module // module(DLL) in question
21  ) : Incident(source, type), m_module(module) { }
22  virtual ~ModuleIncident() { }
24 
25 public:
27 
28  using Incident::type;
29  using Incident::source;
31  const std::string& module() const { return m_module; }
33 private:
35  std::string m_module;
36 };
37 
45 public:
46  static std::string TYPE() { return std::string("ModuleLoaded"); }
47  ModuleLoadedIncident(const std::string& source, // Source(service or alg) name)
48  const std::string& module // module(DLL) in question
49  ) : ModuleIncident(source, TYPE(), module) { }
50 };
51 
52 #endif //GAUDIKERNEL_MODULEINCIDENT_H
53 
std::string m_module
the model (DLL) being worked on
const std::string & type() const
Access to the incident type.
Definition: Incident.h:34
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:40
const std::string & module() const
the model (DLL) being worked on
ModuleIncident(const std::string &source, const std::string &type, const std::string &module)
fired when a module (DLL) is loaded
ModuleLoadedIncident(const std::string &source, const std::string &module)
Base class for all Incidents (computing events).
Definition: Incident.h:16
static std::string TYPE()
virtual ~ModuleIncident()
base class for Module-related incident