0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

ircd::mods: Preliminary ADL wrappage of mods::mod.

This commit is contained in:
Jason Volk 2018-03-23 20:31:09 -07:00
parent 0dcf117910
commit fe6f09d218
2 changed files with 26 additions and 1 deletions

View file

@ -53,6 +53,9 @@ namespace ircd::mods
std::forward_list<std::string> available();
bool available(const std::string &name);
bool loaded(const std::string &name);
string_view name(const mod &);
string_view path(const mod &);
}
// Bring struct module into main ircd::

View file

@ -38,8 +38,30 @@ std::map<std::string, ircd::mods::mod *>
ircd::mods::mod::loaded
{};
///////////////////////////////////////////////////////////////////////////////
//
// mod (internal)
// mods/mods.h
//
ircd::string_view
ircd::mods::name(const mod &mod)
{
return mod.name();
}
ircd::string_view
ircd::mods::path(const mod &mod)
{
return mod.location();
}
///////////////////////////////////////////////////////////////////////////////
//
// (internal) mods.h
//
//
// mod::mod
//
ircd::mods::mod::mod(const filesystem::path &path,