glibmm: Glib::OptionEntry Class Reference

glibmm 2.58.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
Glib::OptionEntry Class Reference

An OptionEntry defines a single option. More...

`#include </home/kjell/checkout/gnome/glibmm-2.4/glib/glibmm/optionentry.h>`

## Public Types

## Public Member Functions
| OptionEntry ()
| OptionEntry (const OptionEntry& src)
| OptionEntry (OptionEntry&& other) noexcept
OptionEntry& | operator= (OptionEntry&& other) noexcept
virtual | ~OptionEntry ()
OptionEntry& | operator= (const OptionEntry& src)
Glib::ustring | get_long_name () const
void | set_long_name (const Glib::ustring& value)
gchar | get_short_name () const
void | set_short_name (const gchar& value)
int | get_flags () const
void | set_flags (const int& value)
| Set one or more OptionEntry::Flags. More...
Glib::ustring | get_description () const
void | set_description (const Glib::ustring& value)
Glib::ustring | get_arg_description () const
void | set_arg_description (const Glib::ustring& value)
GOptionEntry* | gobj ()
const GOptionEntry* | gobj () const

## Public Attributes
enum Glib::OptionEntry::Flags | GOptionFlags

## Protected Attributes
GOptionEntry* | gobject_

## Detailed Description

An OptionEntry defines a single option.

To have an effect, it must be added to an OptionGroup with OptionGroup::add_entry().

The long name of an option can be used to specify it in a commandline as –long_name. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as –groupname-long_name.

If an option has a short name, it can be specified as -short_name in a commandline.

The description for the option is shown in the –help output.

The arg_descripton is the placeholder to use for the extra argument parsed by the option in –help output.

## Member Enumeration Documentation

enum Glib::OptionEntry::Flags

Enumerator
FLAG_HIDDEN |
FLAG_IN_MAIN |
FLAG_REVERSE |
FLAG_NO_ARG |
FLAG_FILENAME |
FLAG_OPTIONAL_ARG |
FLAG_NOALIAS |

## Constructor & Destructor Documentation

Glib::OptionEntry::OptionEntry | ( |  | ) |

Glib::OptionEntry::OptionEntry | ( | const OptionEntry& | src | ) |

Glib::OptionEntry::OptionEntry | ( | OptionEntry&& | other | ) |
| noexcept

virtual Glib::OptionEntry::~OptionEntry | ( |  | ) |
| virtual

## Member Function Documentation

Glib::ustring Glib::OptionEntry::get_arg_description | ( |  | ) | const

Glib::ustring Glib::OptionEntry::get_description | ( |  | ) | const

int Glib::OptionEntry::get_flags | ( |  | ) | const

Glib::ustring Glib::OptionEntry::get_long_name | ( |  | ) | const

gchar Glib::OptionEntry::get_short_name | ( |  | ) | const

GOptionEntry* Glib::OptionEntry::gobj | ( |  | ) |
| inline

const GOptionEntry* Glib::OptionEntry::gobj | ( |  | ) | const
| inline

OptionEntry& Glib::OptionEntry::operator= | ( | OptionEntry&& | other | ) |
| noexcept

OptionEntry& Glib::OptionEntry::operator= | ( | const OptionEntry& | src | ) |

void Glib::OptionEntry::set_arg_description | ( | const Glib::ustring& | value | ) |

void Glib::OptionEntry::set_description | ( | const Glib::ustring& | value | ) |

void Glib::OptionEntry::set_flags | ( | const int & | value | ) |

Set one or more OptionEntry::Flags.

Do not set FLAG_FILENAME. Character encoding is chosen when the OptionEntry is added to an OptionGroup.

void Glib::OptionEntry::set_long_name | ( | const Glib::ustring& | value | ) |

void Glib::OptionEntry::set_short_name | ( | const gchar & | value | ) |

## Member Data Documentation

GOptionEntry* Glib::OptionEntry::gobject_
| protected

enum Glib::OptionEntry::Flags Glib::OptionEntry::GOptionFlags