plugify 1.2.8
Loading...
Searching...
No Matches
enum_object.hpp
1#pragma once
2
3#include <memory>
4#include <span>
5#include <string>
6#include <vector>
7
8#include "plugify/global.h"
9
10namespace plugify {
11 class EnumValue;
12
13 // Enum Class
14 class PLUGIFY_API EnumObject {
15 public:
16 EnumObject();
18 EnumObject(const EnumObject& other);
19 EnumObject(EnumObject&& other) noexcept;
20 EnumObject& operator=(const EnumObject& other);
21 EnumObject& operator=(EnumObject&& other) noexcept;
22
23 // Getters
24 [[nodiscard]] const std::string& GetName() const noexcept;
25 [[nodiscard]] const std::vector<EnumValue>& GetValues() const noexcept;
26
27 // Setters (pass by value and move)
28 void SetName(std::string name);
29 void SetValues(std::vector<EnumValue> values);
30
31 [[nodiscard]] bool operator==(const EnumObject& other) const noexcept;
32 [[nodiscard]] auto operator<=>(const EnumObject& other) const noexcept;
33
34 PLUGIFY_ACCESS : struct Impl;
35 PLUGIFY_NO_DLL_EXPORT_WARNING(std::unique_ptr<Impl> _impl;)
36 };
37}