5 #include <enum_modules.h>
18 static_modules_t mods = get_static_modules();
23 if (mask & eModLanguage)
25 for (
size_t i = 0; i < CT_LANG_COUNT; i++)
37 CT_NEVER(
"multiple static languages with the same id: %s (prev: %s, new: %s)", info->
id, prev->
name, info->
name);
40 mod.
type |= eModLanguage;
46 #if CT_PLUGIN_COUNT > 0
47 if (mask & eModPlugin)
49 for (
size_t i = 0; i < CT_PLUGIN_COUNT; i++)
51 const plugin_t *plugin = mods.plugins[i];
61 CT_NEVER(
"multiple static plugins with the same id: %s (prev: %s, new: %s)", info->
id, prev->
name, info->
name);
64 mod.
type |= eModPlugin;
70 #if CT_TARGET_COUNT > 0
71 if (mask & eModTarget)
73 for (
size_t i = 0; i < CT_TARGET_COUNT; i++)
75 const target_t *target = mods.targets[i];
84 CT_NEVER(
"multiple static targets with the same id: %s (prev: %s, new: %s)", info->
id, prev->
name, info->
name);
87 mod.
type |= eModTarget;
#define STA_DECL
sal2 annotation on function implementations to copy annotations from the declaration
CT_NODISCARD CT_PUREFN CT_BASE_API bool str_equal(const char *lhs, const char *rhs)
compare strings equality
#define CT_NEVER(...)
assert that a code path is never reached
#define CTASSERT(expr)
assert a condition, prints the condition as a message
STA_DECL loaded_module_t load_static_module(loader_t *loader, module_type_t mask, const char *name)
a language driver support capabilities
module_info_t info
common information about the language
common information about anything the broker supports
const char * id
unique id for the module
const char * name
the human readable name for the module
plugin support capabilities
module_info_t info
information about the plugin
module_info_t info
information about the target