1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2010 Monty Taylor
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#include "option_context.h"
30
option_context::option_context(const std::string &module_name_in,
31
po::options_description_easy_init po_options_in) :
32
module_name(module_name_in),
33
po_options(po_options_in)
36
option_context& option_context::operator()(const char* name,
37
const char* description)
39
const std::string new_name(prepend_name(name));
40
po_options(new_name.c_str(), description);
45
option_context& option_context::operator()(const char* name,
46
const po::value_semantic* s)
48
const std::string new_name(prepend_name(name));
49
po_options(new_name.c_str(), s);
54
option_context& option_context::operator()(const char* name,
55
const po::value_semantic* s,
56
const char* description)
58
const std::string new_name(prepend_name(name));
59
po_options(new_name.c_str(), s, description);
64
} /* namespace module */
65
} /* namespace drizzled */