glibmm 2.4: Glib::OptionGroup Class Reference

Main Page Widgets Namespaces Book

# Glib::OptionGroup Class Reference

An OptionGroup defines the options in a single group. More...

List of all members.

## Public Types
typedef std::vector<Glib::ustring> | vecustrings
typedef std::vector<std::string> | vecstrings
## Public Member Functions
| OptionGroup (const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description=Glib::ustring())
| OptionGroup (GOptionGroup* castitem)
| This always takes ownership of the underlying GOptionGroup, so it is only useful with C functions that return newly-allocated GOptionGroups.
virtual | ~OptionGroup ()
virtual bool | on_pre_parse (OptionContext& context, OptionGroup& group)
virtual bool | on_post_parse (OptionContext& context, OptionGroup& group)
virtual void | on_error (OptionContext& context, OptionGroup& group)
void | add_entry (const OptionEntry& entry)
void | add_entry (const OptionEntry& entry, bool& arg)
void | add_entry (const OptionEntry& entry, int& arg)
void | add_entry (const OptionEntry& entry, Glib::ustring& arg)
void | add_entry_filename (const OptionEntry& entry, std::string& arg)
void | add_entry (const OptionEntry& entry, vecustrings& arg)
void | add_entry_filename (const OptionEntry& entry, vecstrings& arg)
void | set_translation_domain (const Glib::ustring& domain)
| A convenience function to use gettext() for translating user-visible strings.
GOptionGroup* | gobj ()
const GOptionGroup* | gobj () const
GOptionGroup* | gobj_give_ownership ()
## Protected Types
typedef std::map< Glib::ustring, CppOptionEntry > | type_map_entries
## Protected Member Functions
void | add_entry_with_wrapper (const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg)
## Protected Attributes
type_map_entries | map_entries_
GOptionGroup* | gobject_
bool | has_ownership_
## Classes
class | CppOptionEntry

## Detailed Description

An OptionGroup defines the options in a single group.

Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to be added to the application's OptionContext.

## Member Typedef Documentation

typedef std::map<Glib::ustring, CppOptionEntry> Glib::OptionGroup::type_map_entries`[protected]`

typedef std::vector<std::string> Glib::OptionGroup::vecstrings

typedef std::vector<Glib::ustring> Glib::OptionGroup::vecustrings

## Constructor & Destructor Documentation

Glib::OptionGroup::OptionGroup | ( | const Glib::ustring& | name,
|  | const Glib::ustring& | description,
|  | const Glib::ustring& | help_description = `Glib::ustring()`
| ) |

Glib::OptionGroup::OptionGroup | ( | GOptionGroup* | castitem | ) | `[explicit]`

| This always takes ownership of the underlying GOptionGroup, so it is only useful with C functions that return newly-allocated GOptionGroups.

virtual Glib::OptionGroup::~OptionGroup | ( |  | ) | `[virtual]`

## Member Function Documentation

void Glib::OptionGroup::add_entry | ( | const OptionEntry& | entry,
|  | vecustrings& | arg
| ) |

void Glib::OptionGroup::add_entry | ( | const OptionEntry& | entry,
|  | Glib::ustring& | arg
| ) |

void Glib::OptionGroup::add_entry | ( | const OptionEntry& | entry,
|  | int& | arg
| ) |

void Glib::OptionGroup::add_entry | ( | const OptionEntry& | entry,
|  | bool& | arg
| ) |

void Glib::OptionGroup::add_entry | ( | const OptionEntry& | entry | ) |

void Glib::OptionGroup::add_entry_filename | ( | const OptionEntry& | entry,
|  | vecstrings& | arg
| ) |

void Glib::OptionGroup::add_entry_filename | ( | const OptionEntry& | entry,
|  | std::string& | arg
| ) |

void Glib::OptionGroup::add_entry_with_wrapper | ( | const OptionEntry& | entry,
|  | GOptionArg | arg_type,
|  | void* | cpp_arg
| ) | `[protected]`

const GOptionGroup* Glib::OptionGroup::gobj | ( |  | ) | const`[inline]`

GOptionGroup* Glib::OptionGroup::gobj | ( |  | ) | `[inline]`

GOptionGroup* Glib::OptionGroup::gobj_give_ownership | ( |  | ) |

virtual void Glib::OptionGroup::on_error | ( | OptionContext& | context,
|  | OptionGroup& | group
| ) | `[virtual]`

virtual bool Glib::OptionGroup::on_post_parse | ( | OptionContext& | context,
|  | OptionGroup& | group
| ) | `[virtual]`

virtual bool Glib::OptionGroup::on_pre_parse | ( | OptionContext& | context,
|  | OptionGroup& | group
| ) | `[virtual]`

void Glib::OptionGroup::set_translation_domain | ( | const Glib::ustring& | domain | ) |

  | A convenience function to use gettext() for translating user-visible strings. Since: 2.6 Parameters:
  | domain | The domain to use.

## Member Data Documentation

GOptionGroup* Glib::OptionGroup::gobject_`[protected]`

bool Glib::OptionGroup::has_ownership_`[protected]`

type_map_entries Glib::OptionGroup::map_entries_`[protected]`

The documentation for this class was generated from the following file:

- optiongroup.h