diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-30 16:28:13 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | 40d02748924aa7c48b04cf948204d8dacdfbbc74 (patch) | |
tree | 4d07a3703207295799b02cef52618a8f0c820542 /src/DI/interfaces | |
parent | db6edcd473a684420e9a7611b24462df21165c1b (diff) |
refactor: replace DI files with the yacppdic library
Diffstat (limited to 'src/DI/interfaces')
-rw-r--r-- | src/DI/interfaces/copyable_functor.hpp | 41 | ||||
-rw-r--r-- | src/DI/interfaces/wrapper.hpp | 17 |
2 files changed, 0 insertions, 58 deletions
diff --git a/src/DI/interfaces/copyable_functor.hpp b/src/DI/interfaces/copyable_functor.hpp deleted file mode 100644 index 46b7588..0000000 --- a/src/DI/interfaces/copyable_functor.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include <typeinfo> - -/** - * A copyable function object. - */ -template <class Function> -class ICopyableFunctor; - -template <class Return, class... Args> -class ICopyableFunctor<Return(Args...)> -{ -public: - ICopyableFunctor() = default; - - ICopyableFunctor(const ICopyableFunctor &) = delete; - - ICopyableFunctor(ICopyableFunctor &&) = delete; - - virtual ~ICopyableFunctor() = default; - - [[nodiscard]] virtual auto clone() const -> ICopyableFunctor * = 0; - - virtual void clone(ICopyableFunctor *) const = 0; - - virtual void destroy() noexcept = 0; - - virtual void destroy_deallocate() noexcept = 0; - - virtual auto operator()(Args &&...) -> Return = 0; - - auto operator=(const ICopyableFunctor &) = delete; - - auto operator=(ICopyableFunctor &&) = delete; - - [[nodiscard]] virtual auto target(const std::type_info &) const noexcept -> const - void * = 0; - - [[nodiscard]] virtual auto target_type() const noexcept -> const std::type_info & = 0; -}; diff --git a/src/DI/interfaces/wrapper.hpp b/src/DI/interfaces/wrapper.hpp deleted file mode 100644 index e22ea7f..0000000 --- a/src/DI/interfaces/wrapper.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include <memory> - -// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) -class IGenericWrapper -{ -public: - virtual ~IGenericWrapper() noexcept = default; -}; - -template <class Interface> -class IWrapper : public IGenericWrapper -{ -public: - [[nodiscard]] virtual auto get() const noexcept -> Interface = 0; -}; |