Class
QuarrelCommand
Description
class Quarrel.Command : GObject.Object
{
GHashTable* subcommands,
QuarrelOpt* opts[],
gint opts_length1,
gchar* examples[],
gint examples_length1,
QuarrelCommandArg* arg_list[],
gint arg_list_length1,
gchar* rest_args_name,
gchar* rest_args_description
}
Declarative command definition with builder-style APIs for options, arguments, subcommands, parsing, and help generation.
Constructors
quarrel_command_new
Define a new command. Descriptions, arguments, options, subcommands can be added via builder methods.
Instance methods
quarrel_command_required_arg
Define a required positional argument. You might want to use quarrel_command_arg() instead because this method will cause the parser to
throw if the argument is missing.
quarrel_command_get_opt
Get an option appended using quarrel_command_opt() by either its long or short name.
quarrel_command_parse
Parse CLI arguments. Not that the first argument argv[0] is ignored as it is assumed to be the name of this command. Returns the command that
should be invoked.
Properties
Quarrel.Command:name
Name of this command. The name of the top level command should be the name of the program.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct QuarrelCommandClass {
QuarrelCommand* (* parse) (
QuarrelCommand* self,
gchar** argv,
gint argv_length1,
GError** error
);
}
No description available.
Class members
parse: QuarrelCommand* (* parse) ( QuarrelCommand* self, gchar** argv, gint argv_length1, GError** error )No description available.
Virtual methods
Quarrel.CommandClass.parse
Parse CLI arguments. Not that the first argument argv[0] is ignored as it is assumed to be the name of this command. Returns the command that
should be invoked.