Class provider_registry

Class Documentation

class legion::core::filesystem::provider_registry

Public Types

using domain = std::string
using resolver = filesystem_resolver
using resolver_ptr = resolver*

Public Static Functions

static std::unordered_set<domain> domains()
static bool has_domain(domain)
static void domain_add_resolver(domain, resolver_ptr)
template<typename Resolver, typename ...Args, typename = typename std::enable_if<std::is_base_of<filesystem_resolver_common_base, Resolver>::value>::type>
static inline void domain_create_resolver(domain d, Args&&... args)

Registers a new provider in the registry, which will than be used in searching.


Although multiple registration is currently supported, only the first provider will be used for resolution multiple registration will be removed in the future. @params args Additionally forwarded arguments for the creation of Resolver.


When the provider is not top level it must be of type mem_filesystem_provider.

Template Parameters
  • Resolver: The type of the resolver you want to register.

  • d: The domain you want to register the provider for.

static std::vector<resolver_ptr> domain_get_resolvers(domain)

Returns all resolvers associated with the domain.

static resolver_sentinel domain_get_first_resolver(domain)

returns the first resolver associated with the domain

static resolver_sentinel domain_get_prev_resolver(const resolver_sentinel &iterator)

use resolver_sentinel::operator– instead

static resolver_sentinel domain_get_next_resolver(const resolver_sentinel &iterator)

use resolver_sentinel::operator++ instead

static resolver_sentinel domain_get_resolver_end()

returns a resolver_sentinel that points to the end - 1


can only be used to check if a domain has reached the end!

static resolver_ptr domain_get_resolver_at(const resolver_sentinel &iterator)

use resolver_sentinel::operator* instead

struct driver

Public Functions

inline driver()
inline ~driver()

Public Members

std::unordered_multimap<domain, std::unique_ptr<resolver>> *m_domain_resolver_map
class resolver_sentinel

Public Functions

resolver_sentinel operator++() const
resolver_sentinel operator--() const
resolver_ptr operator*() const
resolver_ptr operator->() const


friend friend bool operator== (const resolver_sentinel &lhs, const resolver_sentinel &rhs)