~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/option_context.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-01 10:23:12 UTC
  • mto: (2211.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2212.
  • Revision ID: olafvdspek@gmail.com-20110301102312-j5tiy4pacbu1qv7r
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#ifndef DRIZZLED_MODULE_OPTION_CONTEXT_H
26
26
#define DRIZZLED_MODULE_OPTION_CONTEXT_H
27
27
 
28
 
#include <drizzled/visibility.h>
29
 
 
 
28
#include <boost/noncopyable.hpp>
30
29
#include <boost/program_options.hpp>
31
 
 
 
30
#include <drizzled/visibility.h>
32
31
#include <string>
33
32
 
34
 
#include <drizzled/visibility.h>
35
 
 
36
 
namespace drizzled
37
 
{
38
 
namespace module
39
 
{
40
 
 
41
 
namespace po=boost::program_options;
 
33
namespace drizzled {
 
34
namespace module {
 
35
 
 
36
namespace po= boost::program_options;
42
37
 
43
38
/**
44
39
 * Options proxy wrapper. Provides pre-pending of module name to each option
45
40
 * which is added.
46
41
 */
47
 
class DRIZZLED_API option_context
 
42
class DRIZZLED_API option_context : boost::noncopyable
48
43
{
49
 
  const std::string &module_name;
50
 
  po::options_description_easy_init po_options;
51
 
 
52
44
public:
53
45
 
54
46
  option_context(const std::string &module_name_in,
68
60
                                  const char *name);
69
61
 
70
62
private:
71
 
  
72
 
  /**
73
 
   * Don't allow default construction.
74
 
   */
75
 
  option_context();
76
 
 
77
 
  /**
78
 
   * Don't allow copying of objects.
79
 
   */
80
 
  option_context(const option_context &);
81
 
 
82
 
  /**
83
 
   * Don't allow assignment of objects.
84
 
   */
85
 
  option_context& operator=(const option_context &);
 
63
  const std::string &module_name;
 
64
  po::options_description_easy_init po_options;
86
65
};
87
66
 
88
67
} /* namespace module */