summaryrefslogtreecommitdiff
path: root/netfs/lib/entryResolver.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-08-31 19:52:11 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-09-05 17:30:07 +0100
commitfc6e9a3316b608b30b5a25b347774181f1730c59 (patch)
tree67c74913d0d199dc6c366de8c05bfa91e4d452bc /netfs/lib/entryResolver.h
parentClang format all the code (diff)
downloadnetfs-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.h14
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