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/copyable_functor.hpp | |
parent | db6edcd473a684420e9a7611b24462df21165c1b (diff) |
refactor: replace DI files with the yacppdic library
Diffstat (limited to 'src/DI/copyable_functor.hpp')
-rw-r--r-- | src/DI/copyable_functor.hpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/DI/copyable_functor.hpp b/src/DI/copyable_functor.hpp deleted file mode 100644 index 905da03..0000000 --- a/src/DI/copyable_functor.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#include "DI/interfaces/copyable_functor.hpp" - -#include "DI/alloc_functor.hpp" - -#include <typeinfo> - -/** - * A copyable function object. - */ -template <class Function, class Allocator, class FunctionSignature> -class CopyableFunctor; - -template <class Function, class Allocator, class Return, class... Args> -class CopyableFunctor<Function, Allocator, Return(Args...)> - : public ICopyableFunctor<Return(Args...)> -{ -public: - explicit CopyableFunctor(Function &&function); - - explicit CopyableFunctor(const Function &function, const Allocator &allocator); - - explicit CopyableFunctor(const Function &function, Allocator &&allocator); - - explicit CopyableFunctor(Function &&function, Allocator &&allocator); - - auto operator()(Args &&...args) -> Return override; - - auto clone() const -> ICopyableFunctor<Return(Args...)> * override; - - void clone(ICopyableFunctor<Return(Args...)> *functor) const override; - - void destroy() noexcept override; - - void destroy_deallocate() noexcept override; - - [[nodiscard]] auto target(const std::type_info &type_info) const noexcept -> const - void * override; - - [[nodiscard]] auto target_type() const noexcept -> const std::type_info & override; - -private: - AllocFunctor<Function, Allocator, Return(Args...)> _functor; -}; - -#include "copyable_functor.tpp" |