~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/option_context.h

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 * @brief An Proxy Wrapper around options_description_easy_init
23
23
 */
24
24
 
25
 
#ifndef DRIZZLED_MODULE_OPTION_CONTEXT_H
26
 
#define DRIZZLED_MODULE_OPTION_CONTEXT_H
27
 
 
28
 
#include "drizzled/visibility.h"
29
 
 
 
25
#pragma once
 
26
 
 
27
#include <boost/noncopyable.hpp>
30
28
#include <boost/program_options.hpp>
31
 
 
 
29
#include <drizzled/visibility.h>
32
30
#include <string>
33
31
 
34
 
#include "drizzled/visibility.h"
35
 
 
36
 
namespace drizzled
37
 
{
38
 
namespace module
39
 
{
40
 
 
41
 
namespace po=boost::program_options;
 
32
namespace drizzled {
 
33
namespace module {
 
34
 
 
35
namespace po= boost::program_options;
42
36
 
43
37
/**
44
38
 * Options proxy wrapper. Provides pre-pending of module name to each option
45
39
 * which is added.
46
40
 */
47
 
class DRIZZLED_API option_context
 
41
class DRIZZLED_API option_context : boost::noncopyable
48
42
{
49
 
  const std::string &module_name;
50
 
  po::options_description_easy_init po_options;
51
 
 
52
43
public:
53
44
 
54
45
  option_context(const std::string &module_name_in,
68
59
                                  const char *name);
69
60
 
70
61
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 &);
 
62
  const std::string &module_name;
 
63
  po::options_description_easy_init po_options;
86
64
};
87
65
 
88
66
} /* namespace module */
89
67
} /* namespace drizzled */
90
68
 
91
69
 
92
 
#endif /* DRIZZLED_MODULE_OPTION_CONTEXT_H */