lintel 0.2.0
Loading...
Searching...
No Matches
BootstrapSequence.h
Go to the documentation of this file.
1#ifndef LINTEL_BOOTSTRAP_H
2#define LINTEL_BOOTSTRAP_H
3
4#include <magic_enum/magic_enum.hpp>
5#include <set>
6#include <string>
7
8namespace lintel {
13{
14public:
15 // value is defining priority of property repository type
25
27 BootstrapSequence() = default;
28
33 constexpr BootstrapSequence(Value value) : m_value(value) {}
34
39 constexpr explicit BootstrapSequence(std::string_view enumName)
41 {}
42
44 constexpr operator Value() const { return m_value; }
45
46 explicit operator bool() = delete;
47
49 static std::set<Value> values()
50 {
51 auto values = magic_enum::enum_values<Value>();
52 return std::set<Value>(values.begin(), values.end());
53 }
54
56 std::string toString() const { return std::string(magic_enum::enum_name<>(m_value)); }
57
59 friend std::ostream &operator<<(std::ostream &os, const BootstrapSequence &bootstrap)
60 {
62 return os;
63 }
64
65private:
66 Value m_value;
67};
68
69}// namespace lintel
70#endif// LINTEL_BOOTSTRAP_H
Definition BootstrapSequence.h:13
constexpr BootstrapSequence(std::string_view enumName)
Definition BootstrapSequence.h:39
constexpr BootstrapSequence(Value value)
Definition BootstrapSequence.h:33
std::string toString() const
Definition BootstrapSequence.h:56
Value
Definition BootstrapSequence.h:16
@ VirtualGroups
Definition BootstrapSequence.h:21
@ AdminUser
Definition BootstrapSequence.h:23
@ SingleInstance
Definition BootstrapSequence.h:18
@ Undefined
Definition BootstrapSequence.h:17
@ SharedMemory
Definition BootstrapSequence.h:22
@ Database
Definition BootstrapSequence.h:19
static std::set< Value > values()
Definition BootstrapSequence.h:49
friend std::ostream & operator<<(std::ostream &os, const BootstrapSequence &bootstrap)
Definition BootstrapSequence.h:59
Definition MessageQueue.h:25
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9