2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GLIBMM_OPTIONENTRY_H
4 #define _GLIBMM_OPTIONENTRY_H
9 /* Copyright (C) 2004 The glibmm Development Team
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <glibmm/ustring.h>
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 extern "C" { typedef struct _GOptionEntry GOptionEntry; }
37 /** An OptionEntry defines a single option. To have an effect, it must be added to an OptionGroup with
38 * OptionGroup::add_entry().
40 * The long name of an option can be used to specify it in a commandline as --long_name.
41 * Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also
42 * possible to specify the option as --groupname-long_name.
44 * If an option has a short name, it can be specified as -short_name in a commandline.
46 * The description for the option is shown in the --help output.
48 * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help output.
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef OptionEntry CppObjectType;
55 typedef GOptionEntry BaseObjectType;
56 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
62 //Copied from goption.h, instead of generated, so that we can put it inside the class.
66 FLAG_IN_MAIN = 1 << 1,
71 OptionEntry(const OptionEntry& src);
72 virtual ~OptionEntry();
74 OptionEntry& operator=(const OptionEntry& src);
77 Glib::ustring get_long_name() const;
78 void set_long_name(const Glib::ustring& value);
80 gchar get_short_name() const;
81 void set_short_name(const gchar& value);
83 int get_flags() const;
84 void set_flags(const int& value);
86 //TODO: G_OPTION_ARG_CALLBACK,
88 Glib::ustring get_description() const;
89 void set_description(const Glib::ustring& value);
91 Glib::ustring get_arg_description() const;
92 void set_arg_description(const Glib::ustring& value);
94 GOptionEntry* gobj() { return gobject_; }
95 const GOptionEntry* gobj() const { return gobject_; }
99 GOptionEntry* gobject_;
107 #endif /* _GLIBMM_OPTIONENTRY_H */