VIPRA Documentation
Loading...
Searching...
No Matches
class_types.hpp
1#pragma once
2
3namespace VIPRA::Behaviors {
4#define DEFAULT_CONSTRUCTIBLE(T) \
5 public: \
6 T() = default; \
7 ~T() = default;
8
9#define COPYABLE(T) \
10 public: \
11 T(const T&) = default; \
12 auto operator=(const T&)->T& = default;
13
14#define MOVEABLE(T) \
15 public: \
16 T(T&&) noexcept = default; \
17 auto operator=(T&&) noexcept -> T& = default;
18
19#define NON_DEFAULT_CONSTRUCTIBLE(T) \
20 public: \
21 T() = delete; \
22 ~T() = default;
23
24#define NON_MOVEABLE(T) \
25 public: \
26 T(T&&) = delete; \
27 auto operator=(T&&)->T& = delete;
28
29#define NON_COPYABLE(T) \
30 public: \
31 T(const T&) = delete; \
32 auto operator=(const T&)->T& = delete;
33
34#define SINGLETON(T) \
35 public: \
36 T() = delete; \
37 ~T() = delete; \
38 NON_COPYABLE(T) \
39 NON_MOVABLE(T);
40
41#define VIRTUAL(T) \
42 public: \
43 T() = default; \
44 virtual ~T() = default;
45} // namespace VIPRA::Behaviors