~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/option_map.h

  • Committer: Monty Taylor
  • Date: 2010-07-08 04:31:12 UTC
  • mfrom: (1644.1.6 build)
  • Revision ID: mordred@inaugust.com-20100708043112-3l45pzavenlr7xu4
Merged in master.opt plugin consolidation, VJ's work with mysql-protocol and
drizzle-protocol plugin options and a drizzletest segfault bugfix from
Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#define DRIZZLED_MODULE_OPTION_MAP_H
27
27
 
28
28
#include "drizzled/visibility.h"
 
29
#include "drizzled/module/option_context.h"
29
30
 
30
31
#include <boost/program_options.hpp>
31
32
 
53
54
 
54
55
  const boost::program_options::variable_value& operator[](const std::string &name_in) const
55
56
  {
56
 
    std::string new_name(module_name);
57
 
    new_name.push_back('.');
58
 
    new_name.append(name_in);
59
 
    return vm[new_name];
 
57
    return vm[option_context::prepend_name(module_name, name_in.c_str())];
60
58
  }
61
59
 
62
60
  size_t count(const std::string &name_in) const
63
61
  {
64
 
    std::string new_name(module_name);
65
 
    new_name.push_back('.');
66
 
    new_name.append(name_in);
67
 
    return vm.count(new_name);
 
62
    return vm.count(option_context::prepend_name(module_name, name_in.c_str()));
68
63
  }
69
64
 
70
65
private: