creating a Glib::OptionGroup



What is a god method of creating a OptionGroup?

The best option I see is to asign every member of Glib::OptionEntry and
then add it to the Glib::OptionGroup. Like so:

Glib::OptionGroup mainGroup;

Glib::OptionEntry ent;
ent.set_long_name("verbose");
ent.set_short_name('V');
ent.set_description("Set Verbosity level (0, 1, 2)");
ent.set_arg_description("LEVEL");
mainGroup.add_entry(ent, verbosityLevel);

and this for every entry.

This is to mutch code so i use the c-style. I would like  to use c++
features like std::vector and Glib::ustring instead of NULL terminated
arrays. Is ther a bether way of doing it?

Attachment: pgpfr_TKAA1Bc.pgp
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]