diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-08-31 19:52:11 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-09-05 17:30:07 +0100 |
commit | fc6e9a3316b608b30b5a25b347774181f1730c59 (patch) | |
tree | 67c74913d0d199dc6c366de8c05bfa91e4d452bc /netfs/lib/entryResolver.h | |
parent | Clang format all the code (diff) | |
download | netfs-fc6e9a3316b608b30b5a25b347774181f1730c59.tar.bz2 netfs-fc6e9a3316b608b30b5a25b347774181f1730c59.tar.xz netfs-fc6e9a3316b608b30b5a25b347774181f1730c59.zip |
First cut extensible mapper
Replaces the weird fallback half implementation with something that looks
remotely fit for purpose.
Diffstat (limited to 'netfs/lib/entryResolver.h')
-rw-r--r-- | netfs/lib/entryResolver.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/netfs/lib/entryResolver.h b/netfs/lib/entryResolver.h new file mode 100644 index 0000000..84eb6ed --- /dev/null +++ b/netfs/lib/entryResolver.h @@ -0,0 +1,14 @@ +#ifndef NETFS_ENTRYRESOLVER_H +#define NETFS_ENTRYRESOLVER_H + +#include <memory> + +template<typename entry_t> class EntryResolver { +public: + virtual ~EntryResolver() noexcept = default; + + virtual std::shared_ptr<entry_t> getEntry(const decltype(entry_t::id) &) const noexcept = 0; + virtual std::shared_ptr<entry_t> getEntry(const decltype(entry_t::name) &) const noexcept = 0; +}; + +#endif |