Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #pragma once
00026
00027 #include <boost/noncopyable.hpp>
00028 #include <boost/program_options.hpp>
00029 #include <drizzled/visibility.h>
00030 #include <string>
00031
00032 namespace drizzled {
00033 namespace module {
00034
00035 namespace po= boost::program_options;
00036
00041 class DRIZZLED_API option_context : boost::noncopyable
00042 {
00043 public:
00044
00045 option_context(const std::string &module_name_in,
00046 po::options_description_easy_init po_options_in);
00047
00048 option_context& operator()(const char* name,
00049 const char* description);
00050
00051 option_context& operator()(const char* name,
00052 const po::value_semantic* s);
00053
00054 option_context& operator()(const char* name,
00055 const po::value_semantic* s,
00056 const char* description);
00057
00058 static std::string prepend_name(std::string module_name_in,
00059 const char *name);
00060
00061 private:
00062 const std::string &module_name;
00063 po::options_description_easy_init po_options;
00064 };
00065
00066 }
00067 }
00068
00069