~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/option_map.h

  • Committer: Barry.Leslie at PrimeBase
  • Date: 2010-07-14 19:45:50 UTC
  • mfrom: (1660 build)
  • mto: This revision was merged to the branch mainline in revision 1662.
  • Revision ID: barry.leslie@primebase.com-20100714194550-lf2vn7tnum6keqeo
Merge from main trunk.

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: