diff options
Diffstat (limited to 'netfs/lib/entryResolver.h')
-rw-r--r-- | netfs/lib/entryResolver.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/netfs/lib/entryResolver.h b/netfs/lib/entryResolver.h new file mode 100644 index 0000000..86aaace --- /dev/null +++ b/netfs/lib/entryResolver.h @@ -0,0 +1,17 @@ +#ifndef NETFS_ENTRYRESOLVER_H +#define NETFS_ENTRYRESOLVER_H + +#include <memory> + +template<typename entry_t> class EntryResolver { +public: + virtual ~EntryResolver() noexcept = default; + using EntryPtr = std::shared_ptr<entry_t>; + + virtual EntryPtr getEntry(const decltype(entry_t::id) &) const noexcept = 0; + virtual EntryPtr getEntry(const decltype(entry_t::name) &) const noexcept = 0; +}; + +template<typename entry_t> using EntryResolverPtr = std::shared_ptr<EntryResolver<entry_t>>; + +#endif |