]> granicus.if.org Git - icinga2/blob - lib/db_ido/dbreference.hpp
Merge pull request #7124 from Icinga/bugfix/namespace-thread-safe
[icinga2] / lib / db_ido / dbreference.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef DBREFERENCE_H
4 #define DBREFERENCE_H
5
6 #include "db_ido/i2-db_ido.hpp"
7
8 namespace icinga
9 {
10
11 /**
12  * A database reference.
13  *
14  * @ingroup ido
15  */
16 struct DbReference
17 {
18 public:
19         DbReference() = default;
20         DbReference(long id);
21
22         bool IsValid() const;
23         operator long() const;
24 private:
25         long m_Id{-1};
26 };
27
28 }
29
30 #endif /* DBREFERENCE_H */