cmdr::actor - Cmdr - (Internal) Base class for officers and privates
Welcome to the Cmdr project, written by Andreas Kupries.
For availability please read Cmdr - How To Get The Sources.
This internal package implements the base class containing functionality common to cmdr::officer and cmdr::private.
The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary command instances.
It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework has no need for it.
Create an auto-named instance of cmdr::actor.
Not used.
Create a new instance of cmdr::actor, named obj.
Most of the instance API is not public.
It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework has no need for it.
This method is part of command line completion. For the details of its workings please read Cmdr - Internals of command line completion.
Given the completion state parse of a partial command line and a list of completions at the end of the line it returns a list of strings which are the valid completions of the whole line, properly quoted.
A dictionary holding the current completion state of a partial command line.
List of valid completions.
This accessor method returns the human-readable description of the actor.
This method sets the description of the actor to the text.
The description to remember.
This accessor method returns the display name of the actor. This is the name of the actor prefixed with the contents of the reserved common block *prefix*, set during command line processing with the actual command path to reach the current actor.
This method processes the command-line given as a list of words. Here in the bse class it does nothing. It is a virtual method expecting to be redefined by the derived classes.
This accessor method returns the "documented" flag of the actor.
This method returns a boolean value indicating whether the common block named by key exists in the actor and its parents (true), or not (false).
The name of the common block to check for.
This method returns the full name of the actor. This is the name of the actor prefixed with the path to it in the specification, i.e. the names of all actors in the chain of supers.
This method returns the content of the common block named by key. An error is thrown if the block is not known to the actor, nor its parents.
The name of the common block to retrieve.
This accessor method returns the empty string. It is a virtual method expecting to be redefined by the derived classes.
This accessor method returns a list of names for the set of common blocks known to this actor, and all of its parents.
This method extends the contents of the common block named by key with data. Conceptually this is a get/lappend/set operation, i.e. while the existing block content is taken from the actor or its parents, the new content is always stored in the actor.
The name of the common block to extend.
The data to add to the block.
This method is part of command line completion. For the details of its workings please read Cmdr - Internals of command line completion.
Given the completion state parse of a partial command line and a list of possible completions it returns a list of valid completions, filtered against the current word in the command line.
A dictionary holding the current completion state of a partial command line.
List of possible completions.
This accessor method returns the name of the actor.
This method sets the name of the actor.
The name to remember.
This method is part of command line completion. For the details of its workings please read Cmdr - Internals of command line completion.
Is the main helper to begin command completion. Given the entered command line it parses it into words and returns a parse structure as is taken by all other methods taking part in command completion.
The command line.
This accessor method returns the root actor instance the actor belongs to.
This method sets the contents of the common block named by key to data. If the block does not exist it is created. Otherwise its existing content is written over.
The name of the common block to write.
The data to store in the block.
This accessor method returns the parent actor instance. For the root of the tree this is the empty string.
This method links the actor to its parent actor.
The parent actor instance to remember.
This method marks the actor as undocumented.
This method removes the common block named by key from the actor. Note that definitions in parents are not touched by this.
The name of the common block to remove.
The help information generated by various places of the framework is a dictionary containing the following keys:
A list of strings, the names of the command arguments, in order. These names are keys into the parameters sub-dictionary.
The command's description, i.e. help text.
A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.
A dictionary mapping option names to their descriptions.
A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.
Output of method cmdline.
Output of method code.
Output of method default.
Output of method defered.
Output of method description.
Output of method documented.
A dictionary mapping flag names to flag types, i.e. primary, alias, or inverted.
Output of method generator.
Output of method interactive.
Output of method isbool.
Output of method label.
Output of method list.
Output of method ordered.
Output of method presence.
Output of method prompt.
Output of method required.
Output of method threshold.
Output of method type.
Output of method validator.
A list of sections the command belongs to. Each section name is a list itself, the path of the section and sub-sections.
A list of strings, the names of the command's hidden state parameters. These names are keys into the parameters sub-dictionary.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Cmdr Tickets.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
arguments, command hierarchy, command line completion, command line handling, command tree, editing command line, help for command line, hierarchy of commands, interactive command shell, optional arguments, options, parameters, processing command line, tree of commands
Copyright © 2013 Andreas Kupries
Copyright © 2013 Documentation, Andreas Kupries