ToolContext
Serializable::inspect
to show more useful information
more_collections :: more_collections
Highly specific, but useful, collections-related classes.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatscore :: union_find
union–find algorithm using an efficient disjoint-set data structurenitc :: toolcontext
Common command-line tool infrastructure than handle options and error messages
# Program used to test `ToolContext`
module test_toolcontext
import toolcontext
redef class ToolContext
var opt_a = new OptionBool("option a, do nothing", "-a", "--option-a")
var opt_b = new OptionString("option b, do nothing", "-b", "--option-b")
var opt_c = new OptionBool("option c, do nothing", "-c")
redef init do
super
option_context.add_option(opt_a, opt_b, opt_c)
end
end
var toolcontext = new ToolContext
toolcontext.tooldescription = "Usage: test_toolcontext [OPTION]...\nTest for ToolContext, try --bash-completion."
toolcontext.process_options(args)
print toolcontext.option_context.rest
src/test_toolcontext.nit:15,1--34,37