Debian Codegraph @

lib/command_arguments.cpp

raw symbols SCIP
1 /*
2 Copyright (C) 2022-2023 Sutou Kouhei <[email protected]>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include "grn_proc.h"
20
21 #include <groonga.hpp>
22
23 namespace grn {
24 bool
25 CommandArguments::arg_to_bool(grn_obj *arg, bool default_value)
26 {
27 return grn_proc_option_value_bool(ctx_, arg, default_value);
28 }
29
30 int32_t
31 CommandArguments::arg_to_int32(grn_obj *arg, int32_t default_value)
32 {
33 return grn_proc_option_value_int32(ctx_, arg, default_value);
34 }
35
36 uint32_t
37 CommandArguments::arg_to_uint32(grn_obj *arg, uint32_t default_value)
38 {
39 return grn_proc_option_value_uint32(ctx_, arg, default_value);
40 }
41
42 float
43 CommandArguments::arg_to_float(grn_obj *arg, float default_value)
44 {
45 return grn_proc_option_value_float(ctx_, arg, default_value);
46 }
47 } // namespace grn