Belle II Software development
ERRORNo.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#ifndef _Belle2_ERRORNo_hh
9#define _Belle2_ERRORNo_hh
10
11#include "daq/slc/base/Enum.h"
12
13namespace Belle2 {
18
19 class ERRORNo : public Enum {
20
21 public:
22 // cppcheck-suppress duplInheritedMember ; the derived class deliberately provides its own
23 static const ERRORNo UNKNOWN;
24 static const ERRORNo NSMONLINE;
25 static const ERRORNo NSMSENDREQ;
26 static const ERRORNo NSMMEMOPEN;
27 static const ERRORNo NSMINIT;
28 static const ERRORNo DATABASE;
29
30 public:
31 ERRORNo() {}
32 // cppcheck-suppress noExplicitConstructor ; implicit conversion is part of the Enum-style API
33 ERRORNo(const Enum& e) : Enum(e) {}
34 // cppcheck-suppress noExplicitConstructor ; implicit conversion is part of the Enum-style API
35 ERRORNo(const char* label) { *this = label; }
36 explicit ERRORNo(int id) { *this = id; }
37 ~ERRORNo() {}
38
39 protected:
40 ERRORNo(int id, const char* label)
41 : Enum(id, label) {}
42
43 public:
44 const ERRORNo& operator=(const std::string& label);
45 const ERRORNo& operator=(const char* label);
46 const ERRORNo& operator=(int id);
47
48 };
49
51}
52
53#endif
Abstract base class for different kinds of events.