mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::mods: Preliminary ADL wrappage of mods::mod.
This commit is contained in:
parent
0dcf117910
commit
fe6f09d218
2 changed files with 26 additions and 1 deletions
|
@ -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::
|
||||
|
|
24
ircd/mods.cc
24
ircd/mods.cc
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue