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