diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-15 00:20:23 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-15 00:20:23 +0000 |
commit | a38270df3ddad2ac60524a40eb986ab37e473c04 (patch) | |
tree | 2b0ff976a616fb970e62b93b3ffb52517efc1343 /netfs/lib/entryResolver.h | |
parent | Add missing include (diff) | |
parent | Bump to C++20, required by new Slicer (diff) | |
download | netfs-a38270df3ddad2ac60524a40eb986ab37e473c04.tar.bz2 netfs-a38270df3ddad2ac60524a40eb986ab37e473c04.tar.xz netfs-a38270df3ddad2ac60524a40eb986ab37e473c04.zip |
Psycho-rebased branch mapper on top of netfs-1.4netfs-1.4.0.1-mark
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 |