36
plugin::Handle *plugin::Registry::find(const LEX_STRING *name)
36
plugin::Module *plugin::Registry::find(const LEX_STRING *name)
38
38
string find_str(name->str,name->length);
39
39
transform(find_str.begin(), find_str.end(), find_str.begin(), ::tolower);
41
map<string, plugin::Handle *>::iterator map_iter;
42
map_iter= handle_map.find(find_str);
43
if (map_iter != handle_map.end())
41
map<string, plugin::Module *>::iterator map_iter;
42
map_iter= module_map.find(find_str);
43
if (map_iter != module_map.end())
44
44
return (*map_iter).second;
48
void plugin::Registry::add(plugin::Handle *handle)
48
void plugin::Registry::add(plugin::Module *handle)
50
50
string add_str(handle->getName());
51
51
transform(add_str.begin(), add_str.end(),
52
52
add_str.begin(), ::tolower);
54
handle_map[add_str]= handle;
54
module_map[add_str]= handle;
58
vector<plugin::Handle *> plugin::Registry::getList(bool active)
58
vector<plugin::Module *> plugin::Registry::getList(bool active)
60
plugin::Handle *plugin= NULL;
62
vector <plugin::Handle *> plugins;
63
plugins.reserve(handle_map.size());
65
map<string, plugin::Handle *>::iterator map_iter;
66
for (map_iter= handle_map.begin();
67
map_iter != handle_map.end();
60
plugin::Module *plugin= NULL;
62
vector <plugin::Module *> plugins;
63
plugins.reserve(module_map.size());
65
map<string, plugin::Module *>::iterator map_iter;
66
for (map_iter= module_map.begin();
67
map_iter != module_map.end();
70
70
plugin= (*map_iter).second;