2004-08-09 18:53:05

Superclass for a command that can be invoked by a command-line script.

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Superclass for a command that can be invoked by a command-line script. Most commands won't need to subclass this.

A Command object encapsulates, for a particular command, a description, usage example, a set of valid options & arguments, methods for validating the actual options and arguments entered, a function for command invocation, and an association with subordinate Commands.

A tree of commands can be created by associating each Command instance with its subordinates. Typically, only the leaves of the tree will have functionality; the branches just provide ways of grouping the leaves and will not need to encapsulate the invocation functions themselves.

80