nitpm
nitc :: Command :: _all_commands
nitc :: Command :: all_commands
nitc :: Command :: all_commands=
nitc :: Command :: defaultinit
nitc :: Command :: _all_commands
nitc :: Command :: all_commands
nitc :: Command :: all_commands=
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: Command :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
# Command line action, passed after `nitpm`
abstract class Command
# Short name of the command, specified in the command line
fun name: String is abstract
# Short usage description
fun usage: String is abstract
# Command description
fun description: String is abstract
# Apply this command consiering the `args` that follow
fun apply(args: Array[String]) do end
private var all_commands: Map[String, Command]
init do all_commands[name] = self
# Print the help message for this command
fun print_local_help
do
print "usage: {usage}"
print ""
print " {description}"
end
end
src/nitpm.nit:25,1--51,3