~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/registry.cc

  • Committer: Brian Aker
  • Date: 2009-10-12 22:46:41 UTC
  • mfrom: (1130.2.27 plugin-base-class)
  • Revision ID: brian@gaz-20091012224641-gjo56i190y8c98xg
Merge Monty, default class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
  transform(find_str.begin(), find_str.end(), find_str.begin(), ::tolower);
40
40
 
41
41
  map<string, plugin::Handle *>::iterator map_iter;
42
 
  map_iter= plugin_map.find(find_str);
43
 
  if (map_iter != plugin_map.end())
 
42
  map_iter= handle_map.find(find_str);
 
43
  if (map_iter != handle_map.end())
44
44
    return (*map_iter).second;
45
45
  return(0);
46
46
}
47
47
 
48
 
void plugin::Registry::add(plugin::Handle *plugin)
 
48
void plugin::Registry::add(plugin::Handle *handle)
49
49
{
50
 
  string add_str(plugin->getName());
 
50
  string add_str(handle->getName());
51
51
  transform(add_str.begin(), add_str.end(),
52
52
            add_str.begin(), ::tolower);
53
53
 
54
 
  plugin_map[add_str]= plugin;
 
54
  handle_map[add_str]= handle;
55
55
}
56
56
 
57
57
 
60
60
  plugin::Handle *plugin= NULL;
61
61
 
62
62
  vector <plugin::Handle *> plugins;
63
 
  plugins.reserve(plugin_map.size());
 
63
  plugins.reserve(handle_map.size());
64
64
 
65
65
  map<string, plugin::Handle *>::iterator map_iter;
66
 
  for (map_iter= plugin_map.begin();
67
 
       map_iter != plugin_map.end();
 
66
  for (map_iter= handle_map.begin();
 
67
       map_iter != handle_map.end();
68
68
       map_iter++)
69
69
  {
70
70
    plugin= (*map_iter).second;