summaryrefslogtreecommitdiff
path: root/netfs/lib/entryResolver.h
blob: 86aaace09ed294430ddc740814c96b5beaa7c68d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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