~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/option_context.h

  • Committer: Stewart Smith
  • Date: 2011-03-29 01:30:47 UTC
  • mto: (2257.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: stewart@flamingspork.com-20110329013047-5ujzfx6pahmwuko2
have CachedDirectory print out a warning if we can't stat() something in a directory. We should always have access to at least stat() things in directories Drizzle is running in (otherwise there is likely a problem)

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