cmdr
Check-in [b7d756fe00]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
or submit via the online form by Sep 9.

Overview
Comment: Completed the split of the DSL documents. Regenerated the embedded docs. family | ancestors | descendants | both | trunk files | file ages | folders b7d756fe00bcc5cd3beb4322ef0659abce4fc8d6 aku 2013-11-15 07:41:12
Context
 2013-11-15 23:10 Extended the shells to note their activity in a root common block named *in-shell*. Bumped version to 0.11. check-in: 5a480bf9d8 user: andreask tags: trunk 07:41 Completed the split of the DSL documents. Regenerated the embedded docs. check-in: b7d756fe00 user: aku tags: trunk 00:51 Split the large DSL document into several smaller pieces: introduction, officer, private, parameter check-in: daa000e429 user: andreask tags: trunk
Changes

Changes to doc/cmdr.man.

 1 2 3 4 5 6 7 8 9 10 11 12 .. 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT] [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_MAIN]] [description] [include parts/welcome.inc] This is the main package of the framework, its public entry point. It provides four commands for setup and configuration of command ................................................................................ [para] The result of the command is the new instance command. [list_begin arguments] [arg_def string name] The user-visible name of the command (hierarchy). [arg_def script actions] The specification of the subordinate commands. On the command line these are the toplevel commands of the application using the hierarchy. Please read [term [vset TITLE_DSL]], (section "Officers") for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ::cmdr] [method interactive] [opt [arg enable]]] This command globally (de)activates the interactive parts of the   | > | |  1 2 3 4 5 6 7 8 9 10 11 12 .. 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT] [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr] [titledesc [vset TITLE_MAIN]] [description] [include parts/welcome.inc] This is the main package of the framework, its public entry point. It provides four commands for setup and configuration of command ................................................................................ [para] The result of the command is the new instance command. [list_begin arguments] [arg_def string name] The user-visible name of the command (hierarchy). [arg_def script actions] The specification of the subordinate commands. On the command line these are the toplevel commands of the application using the hierarchy. Please read [term [vset TITLE_DSL_OFFICER]] for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ::cmdr] [method interactive] [opt [arg enable]]] This command globally (de)activates the interactive parts of the 

Changes to doc/cmdr_actor.man.

 1 2 3 4 5 6 7 8 9 10 11 12  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_actor [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_ACTOR]] [description] [include parts/welcome.inc] This internal package implements the base class containing functionality common to [package cmdr::officer] and [package cmdr::private].   | |  1 2 3 4 5 6 7 8 9 10 11 12  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::actor [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::actor] [titledesc [vset TITLE_ACTOR]] [description] [include parts/welcome.inc] This internal package implements the base class containing functionality common to [package cmdr::officer] and [package cmdr::private]. 

Changes to doc/cmdr_config.man.

 1 2 3 4 5 6 7 8 9 10 11 12 .. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_config [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_CONFIG]] [description] [include parts/welcome.inc] This package implements the collections of [package cmdr::parameters] serving as the configuration of privates (see [package cmdr::private]). ................................................................................ [arg_def cmdr::config context] The instance command of the [package cmdr::private] instance the configuration will belong to. [arg_def script spec] Tcl-script specifying the parameters in detail. Please read [term [vset TITLE_DSL]] (section "Parameters") for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ::cmdr::config] [method interactive] [opt [arg enable]]] Class method to change the global interaction default for the   | | | |  1 2 3 4 5 6 7 8 9 10 11 12 .. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::config [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::config] [titledesc [vset TITLE_CONFIG]] [description] [include parts/welcome.inc] This package implements the collections of [package cmdr::parameters] serving as the configuration of privates (see [package cmdr::private]). ................................................................................ [arg_def cmdr::config context] The instance command of the [package cmdr::private] instance the configuration will belong to. [arg_def script spec] Tcl-script specifying the parameters in detail. Please read [term [vset TITLE_DSL_PARAMETER]] for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ::cmdr::config] [method interactive] [opt [arg enable]]] Class method to change the global interaction default for the 

Changes to doc/cmdr_dsl.man.

 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of command hierarchies with commands and their parameters by way of examples and then provides links to the detailed reference documents. [para] These related documents are: [include parts/related_dsl.inc] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Introductory examples}] Instead of immediately diving into the full syntax of the specification language first a few examples to demonstrate the general look and feel, plus basic features. [comment ================================================] [subsection {Basic setup, private with inputs}] [include parts/ex_alias0.inc] [comment ================================================] [subsection {Basic setup, command nesting}] [include parts/ex_alias1.inc] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Language Reference}] With the examples behind us we can now go and specify the entire specification language. If you have skipped here on first reading, ignoring the examples, please go back and read them first. [include parts/dsl_general.inc] [para] For the details please continue reading at [include parts/related_dsl.inc] [include parts/related.inc] [include parts/feedback.inc] [manpage_end]   < < | | | < <  6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of command hierarchies with commands and their parameters by way of examples and then provides links to the detailed reference documents. [include parts/related_dsl.inc] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Introductory examples}] Instead of immediately diving into the full syntax of the specification language first a few examples to demonstrate the general look and feel, plus basic features. [comment ================================================] [subsection {Basic private commands with inputs}] [include parts/ex_alias0.inc] [comment ================================================] [subsection {Simple command nesting}] [include parts/ex_alias1.inc] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Language Reference}] With the examples behind us we can now go and specify the entire specification language. If you have skipped here on first reading, ignoring the examples, please go back and read them first. [include parts/dsl_general.inc] [para] Please continue reading with [term [vset TITLE_DSL_OFFICER]]. [include parts/related.inc] [include parts/feedback.inc] [manpage_end] 

Changes to doc/cmdr_dsl_officer.man.

 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  [manpage_begin [vset PROJECT]_dsl_officer [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [titledesc [vset TITLE_DSL_OFFICER]] [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of officers in detail. [para] Related documents are: [include parts/related_dsl.inc] [include parts/dsl_officer.inc] [include parts/related_dsl.inc] [include parts/related.inc] [include parts/feedback.inc] [manpage_end]   | | < > < > >  2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  [manpage_begin [vset PROJECT]_dsl_officer [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [titledesc [vset TITLE_DSL_OFFICER]] [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of [term officer]s in detail. [include parts/related_dsl.inc] [section {Language Reference}] [include parts/dsl_officer.inc] [para] Please continue reading with [term [vset TITLE_DSL_PRIVATE]]. [include parts/related.inc] [include parts/feedback.inc] [manpage_end] 

Changes to doc/cmdr_dsl_parameter.man.

 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of parameters in detail. [para] Related documents are: [include parts/related_dsl.inc] [include parts/dsl_parameter.inc] [include parts/related_dsl.inc] [include parts/related.inc] [include parts/feedback.inc] [manpage_end]   < < > <  5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of parameters in detail. [include parts/related_dsl.inc] [section {Language Reference}] [include parts/dsl_parameter.inc] [include parts/related.inc] [include parts/feedback.inc] [manpage_end] 

Changes to doc/cmdr_dsl_private.man.

 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  [titledesc [vset TITLE_DSL_PRIVATE]] [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of privates in detail. [para] Related documents are: [include parts/related_dsl.inc] [include parts/dsl_private.inc] [include parts/related_dsl.inc] [include parts/related.inc] [include parts/feedback.inc] [manpage_end]   < < > < > >  4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  [titledesc [vset TITLE_DSL_PRIVATE]] [description] [include parts/welcome.inc] This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of privates in detail. [include parts/related_dsl.inc] [section {Language Reference}] [include parts/dsl_private.inc] [para] Please continue reading with [term [vset TITLE_DSL_PARAMETER]]. [include parts/related.inc] [include parts/feedback.inc] [manpage_end] 

Changes to doc/cmdr_help.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_help [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help] [titledesc [vset TITLE_HELP]] [description] [include parts/welcome.inc] This internal package implements the four standard help formats   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::help [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help] [titledesc [vset TITLE_HELP]] [description] [include parts/welcome.inc] This internal package implements the four standard help formats 

Changes to doc/cmdr_help_json.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_help_json [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help::json] [titledesc [vset TITLE_HELP_JSON]] [description] [include parts/welcome.inc] This package provides a single command implementing the help format   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::help::json [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help::json] [titledesc [vset TITLE_HELP_JSON]] [description] [include parts/welcome.inc] This package provides a single command implementing the help format 

Changes to doc/cmdr_help_sql.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_help_sql [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help::sql] [titledesc [vset TITLE_HELP_SQL]] [description] [include parts/welcome.inc] This package provides a single command implementing the help format   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::help::sql [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::help::sql] [titledesc [vset TITLE_HELP_SQL]] [description] [include parts/welcome.inc] This package provides a single command implementing the help format 

Changes to doc/cmdr_officer.man.

 1 2 3 4 5 6 7 8 9 10 11 12 .. 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 ... 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_officer [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_OFFICER]] [description] [include parts/welcome.inc] This package implements [emph officers], the inner nodes of command hierarchies. Each officer can execute many actions, by delegating them to their sub-ordinate actors, officers and privates. ................................................................................ The instance command of the actor (officer actually) which contains the new officer. [arg_def string name] The user-visible name of the command. [arg_def script actions] The specification of the officer's subordinates. Please read [term [vset TITLE_DSL]] (section "Officers") for the details. [list_end][comment arguments] [list_end][comment definitions] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Instance API}] ................................................................................ The list of names specifying the route from this officer to the new private. The last element is the name of the private command, while the preceding names specify the intermediate officers. [comment {--- TODO place into text block for inclusion --- see private - constructor}] [arg_def script arguments] The specification of the private's parameters. Please read [term [vset TITLE_DSL]] (section "Parameters") for the details. [arg_def cmd-prefix action] The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden [package cmdr::config] container holding the private's parameters. The result of the action, if there is any, is ignored by the framework. ................................................................................ the set of subordinates known to this officer. This is the same type of script as used during construction, except here we dynamically extend the officer. [list_begin arguments] [arg_def script actions] The specification of the officer's additional subordinates. Please read [term [vset TITLE_DSL]] (section "Officers") for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method lookup] [arg name]] This method returns the instance command of the sub-ordinate with the   | | | | |  1 2 3 4 5 6 7 8 9 10 11 12 .. 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 ... 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::officer [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::officer] [titledesc [vset TITLE_OFFICER]] [description] [include parts/welcome.inc] This package implements [emph officers], the inner nodes of command hierarchies. Each officer can execute many actions, by delegating them to their sub-ordinate actors, officers and privates. ................................................................................ The instance command of the actor (officer actually) which contains the new officer. [arg_def string name] The user-visible name of the command. [arg_def script actions] The specification of the officer's subordinates. Please read [term [vset TITLE_DSL_OFFICER]] for the details. [list_end][comment arguments] [list_end][comment definitions] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Instance API}] ................................................................................ The list of names specifying the route from this officer to the new private. The last element is the name of the private command, while the preceding names specify the intermediate officers. [comment {--- TODO place into text block for inclusion --- see private - constructor}] [arg_def script arguments] The specification of the private's parameters. Please read [term [vset TITLE_DSL_PARAMETER]] for the details. [arg_def cmd-prefix action] The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden [package cmdr::config] container holding the private's parameters. The result of the action, if there is any, is ignored by the framework. ................................................................................ the set of subordinates known to this officer. This is the same type of script as used during construction, except here we dynamically extend the officer. [list_begin arguments] [arg_def script actions] The specification of the officer's additional subordinates. Please read [term [vset TITLE_DSL_OFFICER]] for the details. [list_end][comment arguments] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method lookup] [arg name]] This method returns the instance command of the sub-ordinate with the 

Changes to doc/cmdr_parameter.man.

 1 2 3 4 5 6 7 8 9 10 11 12 .. 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_parameter [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_PARAMETER]] [description] [include parts/welcome.inc] This package implements [emph parameters], collections of which (see [package cmdr::config]) serve as the configuration of privates (see [package cmdr::private]). ................................................................................ help, if not overridden by a [cmd label] declaration (in [arg spec]). [arg_def string description] Human-readable help text for the parameter. [arg_def script spec] Tcl-script specifying the parameter in detail. Please read [term [vset TITLE_DSL]] (section "Parameters") for the details. [list_end][comment arguments] [list_end][comment definitions] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Instance API}]   | | | |  1 2 3 4 5 6 7 8 9 10 11 12 .. 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::parameter [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::parameter] [titledesc [vset TITLE_PARAMETER]] [description] [include parts/welcome.inc] This package implements [emph parameters], collections of which (see [package cmdr::config]) serve as the configuration of privates (see [package cmdr::private]). ................................................................................ help, if not overridden by a [cmd label] declaration (in [arg spec]). [arg_def string description] Human-readable help text for the parameter. [arg_def script spec] Tcl-script specifying the parameter in detail. Please read [term [vset TITLE_DSL_PARAMETER]] for the details. [list_end][comment arguments] [list_end][comment definitions] [comment @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@] [section {Instance API}] 

Changes to doc/cmdr_private.man.

 1 2 3 4 5 6 7 8 9 10 11 12 .. 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_private [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_PRIVATE]] [description] [include parts/welcome.inc] This package implements [emph privates], the leaves of command hierarchies. While each private can execute only a single action they have parameters, i.e. arguments and options with which to configure ................................................................................ [arg_def string name] The user-visible name of the command. [comment {--- TODO place into text block for inclusion --- see officer - extend}] [arg_def script arguments] The specification of the private's parameters. Please read [term [vset TITLE_DSL]] (section "Privates") for the details. [arg_def cmd-prefix action] The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden [package cmdr::config] container holding the private's parameters. The result of the action, if there is any, is ignored by the framework.   | | |  1 2 3 4 5 6 7 8 9 10 11 12 .. 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::private [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::private] [titledesc [vset TITLE_PRIVATE]] [description] [include parts/welcome.inc] This package implements [emph privates], the leaves of command hierarchies. While each private can execute only a single action they have parameters, i.e. arguments and options with which to configure ................................................................................ [arg_def string name] The user-visible name of the command. [comment {--- TODO place into text block for inclusion --- see officer - extend}] [arg_def script arguments] The specification of the private's parameters. Please read [term [vset TITLE_DSL_PRIVATE]] for the details. [arg_def cmd-prefix action] The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden [package cmdr::config] container holding the private's parameters. The result of the action, if there is any, is ignored by the framework. 

Changes to doc/cmdr_util.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_util [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_UTIL]] [description] [include parts/welcome.inc] This internal package provides a single utility command.   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::util [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::util] [titledesc [vset TITLE_UTIL]] [description] [include parts/welcome.inc] This internal package provides a single utility command. 

Changes to doc/cmdr_validate.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_validate [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate] [titledesc [vset TITLE_VALIDATE]] [description] [include parts/welcome.inc] This internal package implements the twelve standard validation types   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::validate [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate] [titledesc [vset TITLE_VALIDATE]] [description] [include parts/welcome.inc] This internal package implements the twelve standard validation types 

Changes to doc/cmdr_vcommon.man.

 1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]_validate_common [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate::common] [titledesc [vset TITLE_VCOMMON]] [description] [include parts/welcome.inc] This package publicly exports three commands for use in the   |  1 2 3 4 5 6 7 8 9 10  [comment {-*- tcl -*- doctools manpage}] [include parts/definitions.inc] [manpage_begin [vset PROJECT]::validate::common [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate::common] [titledesc [vset TITLE_VCOMMON]] [description] [include parts/welcome.inc] This package publicly exports three commands for use in the 

Changes to doc/cmdr_vtypes.man.

 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ... 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 ... 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ... 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165  [manpage_begin [vset PROJECT]_vtypes [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate] [titledesc [vset TITLE_DEV_VT]] [description] [include parts/welcome.inc] This document describes the API expected of validation types to make them usable within the [vset PTITLE] framework, and how to write a custom validation type. [para] Readers interested in the standard validation types of the framework should read [term [vset TITLE_VALIDATE]]. [section Background] Validation types are [vset PTITLE]'s answer to the necessity of moving ................................................................................ [para] Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not. This choice is made per the six rules below and always returns one of the builtins described in [term [vset TITLE_VALIDATE]]. [list_begin enumerated] [enum] Use [const identity] if a [cmd generate] callback is specified. [enum] Use [const boolean] if no [cmd default] is specified and the parameter is an option. [enum] Use [const identity] if no [cmd default] is specified and the parameter is an input. [enum] Use [const boolean] if the specified [cmd default] value is a Tcl boolean. [enum] Use [const integer] if the specified [cmd default] value is a Tcl integer. [enum] Use [const identity] as fallback of last resort. [list_end] [para] The general concept of validation types was taken from package [package snit], and modified to suit [vset PTITLE]. Where snit's types expect only a single method to validate the input we expect all types to support an ensemble of [emph four] methods. One for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion. The details (method names, signatures, etc.) can be found in section [sectref API] below. [para] As an example the implementation of the standard boolean validation type is shown in section [sectref Example]. [para] It should be noted that while snit's validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use. [para] The [cmd validate] and [cmd release] methods are primarily used during either completion or execution phases, depending on the chosen deferal state. They may also be used during parsing, for optional inputs under the [cmd test]-regime]. [para] The [cmd complete] method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters. [para] The [cmd default] method on the other hand can expect to be invoked during dispatch, as part of the system's declaration processing, if not preempted by [cmd default] and [cmd generate] declarations for the parameter. Note here that the [cmd default] method has the same signature as a [cmd generate] callback and can be used as such. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early. We can still use the validation type for its generation, by hooking it explicitly into [cmd generate] to change the timing of its invokation. [section API] In the descriptions below the [cmd cmd] is a placeholder for the actual command prefix, most often a main command, of the validation type. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd cmd] [method complete] [arg p] [arg x]] This method is invoked during command completion done by the framework. [para] It has to return the list of legal string representations for the type and parameter instance [arg p] which have the incomplete word [arg x] as their prefix. ................................................................................ custom type may have need for access to the context of the completion. [arg_def string x] The string value to complete. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd cmd] [method default] [arg p]] This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation. [para] It has to return the default internal representation for the type and parameter instance [arg p]. ................................................................................ do not make use of it a custom type may have need for access to the context. [arg_def string x] The string value to complete. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd cmd] [method release] [arg p] [arg x]] This method is invoked when the framework has to get rid of an internal representation for a parameter. [para] It has to release any resources associated with the internal representation [arg x] of parameter instance [arg p]. ................................................................................ of the completion. [arg_def string x] The internal representation to release. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd cmd] [method validate] [arg p] [arg x]] This method is invoked during to validate and convert a string representation. [para] It has to verify that [arg x] is a legal string representation for the parameter instance [arg p], and return the associated internal representation.   | | | | | | | > | | > > | | | > > | | | > > | | | | | > > | > | | | > > | | < | | | < | |  3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 ... 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 ... 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 ... 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175  [manpage_begin [vset PROJECT]_vtypes [vset MAN_SECTION] [vset VERSION]] [include parts/module.inc] [require cmdr::validate] [titledesc [vset TITLE_DEV_VT]] [description] [include parts/welcome.inc] This document describes the API expected of [term {validation types}] to make them usable within the [vset PTITLE] framework, and how to write a custom validation type. [para] Readers interested in the standard validation types of the framework should read [term [vset TITLE_VALIDATE]]. [section Background] Validation types are [vset PTITLE]'s answer to the necessity of moving ................................................................................ [para] Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not. This choice is made per the six rules below and always returns one of the builtins described in [term [vset TITLE_VALIDATE]]. [list_begin enumerated] [enum] Use [const identity] if a [cmd generate] callback is specified. [enum] Use [const boolean] if no [cmd default] is specified and the parameter is an [term option]. [enum] Use [const identity] if no [cmd default] is specified and the parameter is an [term input]. [enum] Use [const boolean] if the specified [cmd default] value is a Tcl boolean. [enum] Use [const integer] if the specified [cmd default] value is a Tcl integer. [enum] Use [const identity] as fallback of last resort. [list_end] [para] The general concept of [term {validation types}] was taken from package [package snit], and modified to suit [vset PTITLE]. Where [package snit]'s types expect only a single method to validate the input we expect all types to support an ensemble of [emph four] methods. One for the basic validation and transformation of the string, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion. The details (method names, signatures, etc.) can be found in section [sectref API] below. [para] As an example the implementation of the standard boolean validation type is shown in section [sectref Example]. [para] It should be noted that while [package snit]'s validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use. [para] The [cmd validate] and [cmd release] methods are primarily used during either [term Completion] or [term Execution] phases, depending on the chosen deferal state. They may also be used during the [term Parsing] phase, for optional [term inputs] under the [cmd test]-regime]. [para] The [cmd complete] method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters. [para] The [cmd default] method on the other hand can expect to be invoked during the [term Dispatch] phase, as part of the system's declaration processing, if not preempted by [cmd default] and [cmd generate] declarations for the parameter. Note here that the [cmd default] method has the same signature as a paramete's [cmd generate] callback and can be used as such. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early. We can still use the validation type for its generation, by hooking it explicitly into [cmd generate] to change the timing of its invokation. [section API] In the descriptions below the [cmd ] is a placeholder for the actual command prefix, most often a main command, of the validation type. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method complete] [arg p] [arg x]] This method is invoked during command completion done by the framework. [para] It has to return the list of legal string representations for the type and parameter instance [arg p] which have the incomplete word [arg x] as their prefix. ................................................................................ custom type may have need for access to the context of the completion. [arg_def string x] The string value to complete. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method default] [arg p]] This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation. [para] It has to return the default internal representation for the type and parameter instance [arg p]. ................................................................................ do not make use of it a custom type may have need for access to the context. [arg_def string x] The string value to complete. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method release] [arg p] [arg x]] This method is invoked when the framework has to get rid of an internal representation for a parameter. [para] It has to release any resources associated with the internal representation [arg x] of parameter instance [arg p]. ................................................................................ of the completion. [arg_def string x] The internal representation to release. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd ] [method validate] [arg p] [arg x]] This method is invoked during to validate and convert a string representation. [para] It has to verify that [arg x] is a legal string representation for the parameter instance [arg p], and return the associated internal representation. 

Changes to doc/parts/definitions.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14  [include configuration.inc] [vset TITLE_INTRO "[vset PTITLE] - Introduction to the project"] [vset TITLE_LICENSE "[vset PTITLE] - License" ] [vset TITLE_CHANGES "[vset PTITLE] - Log of Changes" ] [vset TITLE_SOURCES "[vset PTITLE] - How To Get The Sources" ] [vset TITLE_INSTALL "[vset PTITLE] - The Installer's Guide" ] [vset TITLE_DEV "[vset PTITLE] - The Developer's Guide" ] [comment {- Custom documents & titles - - -- --- ----- --------}] [vset TITLE_MAIN "[vset PTITLE] - Main package and API"] [vset TITLE_ACTOR "[vset PTITLE] - Base class for officers and privates - Internal"] [vset TITLE_CONFIG "[vset PTITLE] - Collection of parameters for privates"] [vset TITLE_DEV_HF "[vset PTITLE] - Writing custom help formats"] [vset TITLE_DEV_VT "[vset PTITLE] - Writing custom validation types"] [vset TITLE_DSL "[vset PTITLE] - Introduction to the Specification Language"]   >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  [include configuration.inc] [vset TITLE_INTRO "[vset PTITLE] - Introduction to the project"] [vset TITLE_LICENSE "[vset PTITLE] - License" ] [vset TITLE_CHANGES "[vset PTITLE] - Log of Changes" ] [vset TITLE_SOURCES "[vset PTITLE] - How To Get The Sources" ] [vset TITLE_INSTALL "[vset PTITLE] - The Installer's Guide" ] [vset TITLE_DEV "[vset PTITLE] - The Developer's Guide" ] [comment {- Custom documents & titles - - -- --- ----- --------}] [vset TITLE_MAIN "[vset PTITLE] - Main package and API"] [vset TITLE_ACTOR "[vset PTITLE] - Base class for officers and privates - Internal"] [vset TITLE_CONFIG "[vset PTITLE] - Collection of parameters for privates"] [vset TITLE_DEV_HF "[vset PTITLE] - Writing custom help formats"] [vset TITLE_DEV_VT "[vset PTITLE] - Writing custom validation types"] [vset TITLE_DSL "[vset PTITLE] - Introduction to the Specification Language"] 

Changes to doc/parts/dsl_general.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29   [para] The conceptual model underneath the command hierarchy is that of a tree. [para] The inner nodes of the tree represent command ensembles, here called "officer"s. Each officer knows one or more commands, and delegates actual execution to their respective specification, which may be another officer, or a private. [para] The leaf nodes of the tree represent the individual commands, here called "private"s. Each private is responsible for a single action, and knows how to perform it and the parameters used to configure that action at runtime. [para] The same model is graphically presented in the Entity-Relationship-Diagram below. [image erd] [para] The "Actor" in that diagram is the common base class for the ensembles and commands and not directly relevant to users. [para] The "Config" on the other hand is the second interface seen by the user, as the sole argument to the action command prefix of [cmd private] (See section [sectref Officer]). This container holds all the declared parameters of the command the action is invoked for, and provides easy access to them through its methods (see package [package cmdr::config]) at the time of execution.   | | | > > | < > | | | | | > | | < >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32   [para] The conceptual model underneath the command hierarchy is that of a tree. [para] The inner nodes of the tree represent command ensembles, here called [term officer]s. Each officer knows one or more commands to perform, and delegates actual execution to their respective specification, which may be another [term officer], or a [term private]. [para] The leaf nodes of the tree represent the individual commands, here called [term private]s. Each [term private] is responsible for a single action and knows how to perform it, and the set of [term parameter]s used to configure that action at runtime. [para] The same model is graphically presented in the Entity-Relationship-Diagram below. [image erd] [para] The [term actor] in that diagram is the common base class for the ensembles and commands and not directly relevant to users. [para] The [term config] on the other hand is the second interface seen by the user, as the sole argument to the action command prefix of [cmd private]. See [term [vset TITLE_DSL_OFFICER]] for the details. This container, an instance of [package cmdr::config], holds all the declared parameters of the command the action is invoked for, and provides easy access to them through its methods at the time of execution. 

Changes to doc/parts/dsl_officer.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 .. 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137   [comment { No tables in doctools, using an example to get a tabular formatting. }] [comment { TODO doctools: table markup }] [comment { TODO doctools: named TOCs for commands - embedded small TOCs}] [example { alias = ... Declare an alternate name for a command path. alias Declare an alternate name for the previous command. common

Changes to doc/parts/dsl_para_callbacks.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59   Of the four callbacks supported by parameters the first two, "generate" and "validate" have been described already, in the sections --TODO--\ref{para/reps} about representations and --TODO--\ref{para/vtype} about validation types, respectively. [para] This section explains the commonalities between the callbacks in general, and the last two, for notifications about state changes in detail. [para] All callbacks are treated as command prefixes, not scripts. There are no placeholder substitutions, only arguments added to each command prefix on invokation. This does not harm the generality of the system, as complex scripts can be used via procedures or equivalents (i.e. [cmd apply]). [para] The two callbacks not yet described are the state-change callbacks through which the framework can actively drive parts of the application while processing the command line, whereas normally the application drives access to parameters through their methods. [list_begin definitions] [def "[cmd when-complete] [arg cmdprefix]"] This command declares the state-change callback to invoke when the internal representation of the parameter is generated from the string representation, or the various ways of getting a default. [para] The callback is invoked with two arguments, the [package cmdr::parameter] instance of the parameter which changed, and its internal representation, in this order. [def "[cmd when-set] [arg cmdprefix]"] This command declares the state-change callback to invoke when the string representation of the parameter is set during command line parsing. [para] The callback is invoked with two arguments, the [package cmdr::parameter] instance of the parameter which changed, and its string representation, in this order. [list_end] Due to their nature these callbacks are invoked at runtime during either parsing, completion," or execution. The details are shown in the table below. The specification commands influencing the timing, i.e. forcing the use in a specific phase are shown in the intersection of callback and phase. [example { | Dispatch | Parsing | Completion | Execution --------------------+----------+---------+-------------+----------- validate (default) | * | | | --------------------+----------+---------+-------------+----------- validate (complete) | | * | immediate | defered   | | | | < > > | < > > | | < > > | < > | | < < > | > > | | |  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63   Of the four callbacks supported by parameters the first two, [cmd generate] and [cmd validate] have been described already, in the sections [sectref Representations] and [sectref Validation], respectively. [para] This section explains the commonalities between the callbacks in general, and the last two, for notifications about state changes in detail. [para] All callbacks are treated as command prefixes, not scripts. There are no placeholder substitutions, only arguments added to each command prefix on invokation. This does not harm the generality of the system, as complex scripts can be used via procedures or equivalents (i.e. [cmd apply]). [para] The two callbacks not yet described are the state-change callbacks through which the framework can actively drive parts of the application while processing the command line, whereas normally the application drives access to parameters through their methods. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd when-complete] [arg cmdprefix]] This command declares the state-change callback to invoke when the [term {internal representation}] of the [term parameter] is generated from the [term {string representation}], or the various ways of getting a default. [para] The callback is invoked with two arguments, the [package cmdr::parameter] instance of the changed [term parameter], and its [term {internal representation}], in this order. [comment {- - -- --- ----- -------- -------------}] [call [cmd when-set] [arg cmdprefix]] This command declares the state-change callback to invoke when the [term {string representation}] of the [term parameter] is set during command line parsing. [para] The callback is invoked with two arguments, the [package cmdr::parameter] instance of the changed [term parameter], and its [term {string representation}], in this order. [list_end] Due to their nature these callbacks are invoked at runtime during either the [term Parsing], [term Completion], or [term Execution] phases. The details are shown in the table below. The specification commands influencing the timing, i.e. forcing the use in a specific phase are shown in the intersection of callback and phase. [example { | Dispatch | Parsing | Completion | Execution --------------------+----------+---------+-------------+----------- validate (default) | * | | | --------------------+----------+---------+-------------+----------- validate (complete) | | * | immediate | defered 

Changes to doc/parts/dsl_para_general.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40   [para] The general handling of a parameter is influenced by three commands. [list_begin definitions] [def "[cmd optional]"] This command marks the parameter as optional, i.e. as something the user may skip on the command line, and the application supplying sensible defaults. --TODO--(sectref:para/vtype)-- During parsing the framework will then expend some effort to determine whether an argument word should be assigned to the parameter, or not. [para] This setting is only applicable to "inputs", as "options" are optional by definition, and "state" is hidden. [def "[cmd test]"] This command is related to the above, switching from the standard regime for acceptance based on counting and thresholds to a different one based on validation. The details are explained in section --TODO--(sectref:flow/parsing, flow/optional)--. [def "[cmd undocumented]"] Like "officers" and "privates" parameters can be hidden from the generated help. This is the command for doing so, the same as for the first two. [para] The main use case is the hiding of options giving an application developer access to the internals of their application, something a regular user has no need of, and doesn't have to know about. [list_end]   | | > > | | | < > < > | > | | > | | | | > | > | < < < > |  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44   [para] The general handling of a [term parameter] is influenced by three commands: [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd optional]] This command marks the parameter as [term optional], i.e. as something the user may skip on the command line, with the application supplying sensible defaults (See section [sectref Representations]). This causes the framework to expend some effort in the [term Parsing] phase to determine whether an argument word should be assigned to the parameter, or not. [para] This setting is only applicable to [term input]s, as [term option]s are optional by definition, and [term state] is hidden. [comment {- - -- --- ----- -------- -------------}] [call [cmd test]] This command is related to the above, switching the runtime from the standard regime for acceptance (based on counting and thresholds) to a different regime based on validation. The details are explained in --TODO--(sectref:flow/parsing,flow/optional)--. [comment {- - -- --- ----- -------- -------------}] [call [cmd undocumented]] This command excludes the [term parameter] from the generated help. [para] Its main use case is the hiding of [term option]s giving an application developer access to the internals of their application, something a regular user has no need of, and doesn't have to know about. [list_end] 

Changes to doc/parts/dsl_para_naming.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40   [para] We have two commands to influence the visible naming of all parameters. [para] As background, all parameters are named for proper identification within the framework and other Tcl code, i.e. the various callbacks, including a "private"s action. This "system name" has to be unique within the "private" a parameter belongs to. Beyond that however the visible parameters have to be identified within help texts, and, in case of "options", for detection during "Parsing". That is the visible naming, seen by a user of any application whose command line processing is based on the [vset PTITLE] framework. [list_begin definitions] [def "[cmd label] [arg text]"] This command declares the visible name, if different from the system name used as the default. Note that in most cases this default is good enough, obviating the need for this command. [para] The only use case seen so far is when two semantically equivalent input and option parameters clash, requiring different internal names due to the requirement for uniqueness, yet also the same visible name and flag within the help to highlight their connection and equivalence. [def "[cmd alias] [arg name]"] For option parameters the "label" command and its default specifies the name of the primary flag recognized during parsing. If that is not enough for a specific option this command allows the specification of any number additional flags to be recognized. [para] Note however that the framework automatically recognizes not only the specified flags, but also all unique prefixes, obviating the need for this command in many cases. [list_end]   | | | | > | > > | < > > > > > | | > | > | | | > < > | | | > | < < < > > > > > > | < > |  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54   [para] We have two commands to influence the visible naming of all [term parameter]s. [para] As background, all [term parameter]s are named, to properly identify them within the framework and other Tcl code, i.e. in the various callbacks and the [term private]'s action. This [term {system name}] has to be unique within the [term private] a [term parameter] belongs to. Beyond that however the visible (i.e. non-term state]) [term parameter]s have to be identified by users within help texts, and, in the case of [term option]s, for detection during the [term Parsing] phase. That is the visible naming, seen by a user of any application whose command line processing is based on the [vset PTITLE] framework. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd label] [arg text]] This command declares the [term parameter]'s visible name, if different from the [term {system name}] used as the default. Note that in most cases this default is good enough, obviating the need for this command. [para] The only use case seen so far is when two semantically equivalent [term input] and [term option] [term parameter]s clash, forcing the use of different system names due to the requirement for their uniqueness, yet also use the same visible name and flag within the help to highlight their connection and equivalence. [comment {- - -- --- ----- -------- -------------}] [call [cmd alias] [arg name]] For [term option]s the [cmd label] command and its default specifies the name of the [term {primary flag}] recognized during the [term Parsing] phase. If that is not enough for a specific [term option] this command allows the specification of any number additional flags to be recognized. [para] Note however that the framework automatically recognizes not only the specified flag(s), but also all their unique prefixes, obviating the need for this command in many cases. [list_end] 

Changes to doc/parts/dsl_para_reps.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125   [para] An important concept of parameters is something taken up from Tcl itself. The differentation between string and internal representations. Where Tcl uses internal representations to speed up its execution here this separation is that of between the information delivered to the application by a user, and the application-specific data structures behind them. [para] All parameters will have an internal representation. This is usually derived from the string representation provided by the user. The details of that process are explained in section --TODO--(sectref:para/vtype)-- about validation types. However we have cases where the user cannot specify a string representation ("states"), or is allowed to choose not to (optional "inputs", "options"). For these cases three specification commands are made available enabling us to programmatically choose the internal representation. [list_begin definitions] [def "[cmd default] [arg value]"] This command provides a constant value for the internal representation. [def "[cmd generate] [arg cmdprefix]"] This command provides a callback to compute the internal representation at runtime. This is useful if the default is something which cannot be captured as a fixed value, for example a handle to some resource, or a dynamically created object. [para] The command prefix is invoked with a single argument, the [package cmdr::parameter] instance for which to generate the internal representation. [list_end] [para] The commands "default" and "generate" exclude each other, i.e. only of them can be specified. If neither are specified, and we need a default (see the cases above) a default is chosen per the two rules below: [list_begin enumerated] [enum] Use the empty string for a "list" parameter. [enum] Use the default value supplied by the chosen validation type (See section --TODO--(sectref:para/vtype)--). [list_end] [list_begin definitions] [def "[cmd interact] [opt [arg prompt]]"] This command actually does not specify an internal representation, but activates another method for the user to specify a string value for the parameter, outside of the command line. As such it has priority over either "default" and "generate," and can be specified with either. A parameter marked with it will interactively ask the user for a value if none was specified on the command line. [para] The default [arg prompt] is derived from the system name. [list_end] [para] To recapitulate: [list_begin enumerated] [enum] A string representation specified on the command line has the highest priority and goes through the chosen validation type to get the associated internal representation. [enum] If activated via "interact" a small shell is run asking the user for a value (or more, as per "list", see below). The result goes through the chosen validation type to get the associated internal representation. [enum] After that the internal representation is either the declared "default," or the result of invoking the "generate" callback. As internal representations they are [emph not] run through the chosen validation type. [list_end] [list_begin definitions] [def "[cmd list]"] This command is used to mark parameters whose string and thus internal value should be treated as a list. By default all parameters are scalar. [para] This affects the handling of the parameter during parsing, by "interact" above, and the use of the validation type. The last two ask for multiple values, and feed the elements of the string value separately through validation instead of just the string value in one. During parsing treatment of "options" changes from keeping only the last assigned value to accumulation of all values. Similarly a list-"input" takes all remaining words on the command line for itself instead of just the current word. Because of this list-"inputs" are only allowed as the last parameter of a "private." [list_end] [para] The last two specification commands dealing with the representations control when the internal representation is created. [list_begin definitions] [def "[cmd defered]"] This command marks a parameter as defered, with the internal representation computed on first access to its value. This is the default for "state" parameters. [def "[cmd immediate]"] This command marks a parameter as immediate, with the internal representation computed in the "Completion" phase. This is the default for "input" and "option" parameters. [list_end]   | | | | | | | | | | | < < | < > > > | | > | | | | | | | | | > | | < > > | > | | > | | | | | | > | | > | | | | | < > | > > | | > > | < > > > > > | | < > > > | > | < > > | < > > > | | > | > > > | < > > | < > > | < < < > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155   [para] An important concept of [term parameter]s is something taken up from Tcl itself. The differentation between [term string] and [term {internal representations}]. Where Tcl uses [term {internal representations}] to speed up its execution here this separation is that of between the information delivered to the application by a user, and the application-specific data structures behind them. [para] All [term parameter]s will have an [term {internal representation}]. This is usually derived from the [term {string representation}] provided by the user. The details of that process are explained in section [sectref Validation]. However we have cases where the user cannot specify a string representation ([term state]s), or is allowed to choose not to (optional [term input]s, [term option]s). For these cases three specification commands are made available enabling us to programmatically choose the internal representation. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd default] [arg value]] This command specifies a constant default value for the internal representation. [comment {- - -- --- ----- -------- -------------}] [call [cmd generate] [arg cmdprefix]] This command specifies a callback to compute the default internal representation at runtime. This is useful if the default is something which cannot be captured as a fixed value. An example would be a handle to some resource, or a dynamically created object. [para] The command prefix is invoked with a single argument, the [package cmdr::parameter] instance for which to generate the internal representation. [list_end] [para] The commands [cmd default] and [cmd generate] exclude each other, i.e. only of them can be specified, but not both. If neither are specified, and we need a default (see the cases above) then a default is chosen by the framework itself, as per the two rules below: [list_begin enumerated] [enum] Use the empty string for a [cmd list] parameter. [enum] Use the default value supplied by the chosen [term {validation type}] (See section [sectref Validation]). [list_end] [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd interact] [opt [arg prompt]]] This command actually does not specify an [term {internal representation}], but activates another method for the user to specify the [term {string representation}] of the [term parameter], outside of the command line. As such it has priority over either [cmd default] and [cmd generate], and can be specified with either. A [term parameter] marked with it will interactively ask the user for a value if none was specified on the command line. [para] The default for the [arg prompt] is derived from the [term parameter]'s [term {system name}]. [list_end] [para] To recapitulate: [list_begin enumerated] [enum] A [term {string representation}] specified on the command line has the highest priority and goes through the chosen [term {validation type}] to get the associated [term {internal representation}]. [enum] If activated via [cmd interact] a small shell is run asking the user for a value (or more, as per [cmd list], see below). The result goes through the chosen [term {validation type}] to get the associated [term {internal representation}]. [enum] After that the [term {internal representation}] is either the declared [cmd default] value, or the result of invoking the [cmd generate] callback. As [term {internal representation}]s the resulting values are [emph not] run through the chosen [term {validation type}]. [list_end] [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd list]] This command marks the [term parameter] as a list. In other words, its [term string] and [term {internal representation}] is actually a list of such, instead of a single value. By default all parameters are scalar. [para] This affects the handling of the parameter by the [term Parsing] phase, by [cmd interact] above, and the use of the [term {validation type}]. The last two ask for multiple values, and feed the elements of the [term {string representation}] separately through validation instead of just the string value in one. In the [term Parsing] phase treatment of [term option]s changes from keeping only the last assigned value to the accumulation of all values. Similarly a list-[term input] takes all the remaining words on the command line for itself instead of just the current word. Because of this list-[term inputs] are only allowed as the last [term parameter] of a [term private]. [list_end] [para] The last two specification commands dealing with the representations control [emph when] the [term {internal representation}] is created. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd defered]] This command marks a [term parameter] as [term defered], causing its [term {internal representation}] to be computed on first access to its value. This is the default for [term state] parameters. [comment {- - -- --- ----- -------- -------------}] [call [cmd immediate]] This command marks a [term parameter] as [term immediate], causing its [term {internal representation}] to be computed in the [term Completion] phase. This is the default for [term input] and [term option] parameters. [list_end] 

Changes to doc/parts/dsl_para_validation.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68   [para] The answer to the necessity of moving between the string and internal representations described in the previous section are the validation types. Given a string representation they either return the associated internal representation or raise an error, signaling that the input was illegal. This part of their work, the verification of the legality of the input string gave them their name. [comment {--TODO--(textblock shared with cmdr-vtypes.man)}] [para] The general concept of validation types was taken from [package snit], and modified to suit [vset PTITLE]. Where snit's types expect only a single method to validate the input [vset PTITLE] expects all types to support an ensemble of [emph four] methods, one for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus delivery of a default representation and support for command line completion. [list_begin definitions] [def "[cmd validate] [arg cmdprefix]"] This command specifies a validation type for the parameter, in the form of a command prefix. The set of methods this callback has to support, their signatures, etc. are all explained in [term [vset TITLE_DEV_VT]]. This document contains the implementation of the standard boolean validation type as an example as well. [para] Because of the same necessity all parameters must have a validation type assigned to them, and the system will choose which, if the user did not. This choice is made per the six rules below and always returns one of the standard types implemented in package [package cmdr::validate]. [list_begin enumerated] [enum] Use "identity" if a "generate" callback is specified. [enum] Use "boolean" if no "default" is specified and the parameter is an option. [enum] Use "identity" if no "default" is specified and the parameter is an input. [enum] Use "boolean" if the specified "default" value is a Tcl boolean. [enum] Use "integer" if the specified "default" value is a Tcl integer. [enum] Use "identity" as fallback of last resort. [list_end] [def "[cmd presence]"] This command is best discussed as part of the wider area of "boolean" options, i.e. options with validation type "boolean" assigned to them. These have associated special behaviours, both in the handling of the specification, and during parsing. [para] First, normal boolean options. They have automatic aliases declared for them, derived from their primary flag. An option named "foo" will have an alias of "no-foo", and the reverse. During parsing the "foo" and "no-foo" flags have inverse semantics, and both are allowed to occur without option argument following the flag. This is in contrast to all other options which must have such an argument. The parser essentially uses the validation type to decide if the word after the flag is a proper boolean value, or not, i.e. an argument to assign to the parameter, or not. [para] Now "presence" declares a variant of the above, a boolean option without the automatic aliases, and [emph never] taking an argument during parsing. Its mere [emph presence] on the command line will set its parameter. Their default value is consequently fixed to [const false] as well. [list_end]   | | | < > > > | | < | | > | | | | | > < > > | | > | > | | | | | | | | | | | > | > | < > > > | | | > | > > | > > | | > > | | | < > | | > > | > > | |  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89   [para] The answer to the necessity of moving between the [term string] and [term {internal representations}] described in the previous section are the [term {validation types}]. Given a [term {string representation}] they either return the associated [term {internal representation}] or raise an error, signaling that the string was illegal. This part of their work, the verification of the legality of the input string gave them their name. [comment {--TODO--(textblock shared with cmdr-vtypes.man)}] [para] The general concept of [term {validation types}] was taken from [package snit], and modified to suit [vset PTITLE]. Where snit's types expect only a single method to validate the input [vset PTITLE] expects all types to support an ensemble of [emph four] methods, one for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus delivery of a default representation and support for command line completion. [list_begin definitions] [comment {- - -- --- ----- -------- -------------}] [call [cmd validate] [arg cmdprefix]] This command specifies a [term {validation type}] for the [term parameter], in the form of a command prefix (or the name of one of the builtin types, see package [package cmdr::validate]). The set of methods this callback has to support, their signatures, etc. are all explained in [term [vset TITLE_DEV_VT]]. This document contains the implementation of the standard boolean validation type as an example as well. [para] Because of the same necessity all [term parameter]s must have a [term {validation type}] assigned to them, and the system will choose which, if the user did not. This choice is made as per the six rules below and always returns one of the standard types implemented by package [package cmdr::validate]. [list_begin enumerated] [enum] Use [const identity] if a [cmd generate] callback is specified. [enum] Use [const boolean] if no [cmd default] is specified and the parameter is an [term option]. [enum] Use [const identity] if no [cmd default] is specified and the parameter is an [term input]. [enum] Use [const boolean] if the specified [cmd default] value is a Tcl boolean. [enum] Use [const integer] if the specified [cmd default] value is a Tcl integer. [enum] Use [const identity] as fallback of last resort. [list_end] [comment {- - -- --- ----- -------- -------------}] [call [cmd presence]] This command is best discussed as part of the wider area of [term boolean] [term option]s, i.e. [term option]s with the standard [term {validation type}] [const boolean] assigned to them. These have associated special behaviours, both in the handling of the specification, and in the [term Parsing] phase. [para] First, normal boolean options. They have automatic aliases declared for them, derived from their primary flag. An option named "foo" will have an alias of "no-foo", and the reverse. In the [term Parsing] phase the "foo" and "no-foo" flags have inverse semantics, and both are allowed to occur without option argument following the flag. This is in contrast to all other [term option]s which must have such an argument. The parser essentially uses the [term {validation type}] to decide if the word after the flag is a proper boolean value, or not, i.e. an argument to assign to the [term parameter], or not. [para] Now [cmd presence] declares a variant of the above, a boolean option [emph without] the automatic aliases, and [emph never] taking an argument during parsing. Its mere [emph presence] on the command line will set its [term parameter]. Their [cmd default] value is consequently fixed to [const false] as well. [list_end] 

Changes to doc/parts/dsl_parameter.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80   [para] The parameters of private commands are the heart of the system, providing the space needed to transfer the command arguments to the implementations, and having the most attributes controlling their behaviour. [para] This complexity is mitigated strongly by the use of sensible defaults for each of the three possible kinds of parameter, i.e. positional "inputs", named "options", and "state" hidden from the command line. [para] Each kind has its own construction command in the DSL for [sectref Privates] which specifies the common information which cannot have defaults, i.e. [list_begin enumerated] [enum] the name identifying it to the system, [enum] the help text describing it in informal speech, and, of course, [enum] the parameter specification itself, using the commands of this section. [list_end] [comment { No tables in doctools, using an example to get a tabular formatting. }] [comment { TODO doctools: table markup }] [comment { TODO doctools: named TOCs for commands - embedded small TOCs}] [example { alias N Declare alternate flag for an option. default R Set constant default value. defered R Defer calculation of the internal representation until demanded. generate R Set callback returning the default value. immediate R Complement of defered. interact ?? R Enable the interactive entry of the string value. label N Name to use in the help, and as primary flag (for an option). list R Declare as list-valued. optional G Declare input as optional. presence V Declare as boolean option without argument. test G Control the matching of words to optional inputs. undocumented G Declare as hidden from help. validate V Declare validation type. when-complete C Set callback executed when the value becomes known. when-set C Set callback executed when the string value becomes known. }] [para][emph Naming] [include dsl_para_naming.inc] [para][emph {General control}] [include dsl_para_general.inc] [para][emph Representations] [include dsl_para_reps.inc] [para][emph Validation] [include dsl_para_validation.inc] [para][emph Signaling] [include dsl_para_callbacks.inc] [comment { Command & Attribute & Input & Option & State & Notes presence & presence & no & no & n/a & Declare as boolean \coption without argument. Implies \cdefault and \cvalidate settings. validate & validate & $*$ & $*$ & $*$ & Declare validation type. Details in section \ref{para/vtype}. when-complete & when-complete & none & none & none & Set callback executed when the value becomes known. when-set & when-set & none & none & none & Set callback executed when the string value becomes known. }]   | | | | | | | | | | | | < > | < < < < < < < < < < < < < < < < < < | | < > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35   [para] The [term parameter]s of [term private]s are the heart of the system, providing the space needed to transfer command arguments to their implementations, and having the most attributes controlling their behaviour. [para] This complexity is strongly mitigated by the use of sensible defaults for each of the three possible kinds of parameter, i.e. positional [term input]s, named [term option]s", and [term state] hidden from the command line. [para] Each kind has its own construction command in the language for [term private]s (See [term [vset TITLE_DSL_PRIVATE]]) which specifies the common information which cannot have defaults, i.e. [list_begin enumerated] [enum] the name identifying it to the system, [enum] the help text describing it in informal speech, and, of course, [enum] the parameter specification itself, using the commands of this section. [list_end] [para][subsection Naming] [include dsl_para_naming.inc] [para][subsection {General control}] [include dsl_para_general.inc] [para][subsection Representations] [include dsl_para_reps.inc] [para][subsection Validation] [include dsl_para_validation.inc] [para][subsection Signaling] [include dsl_para_callbacks.inc] 

Changes to doc/parts/dsl_private.inc.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62   [para] The specification of simple commands, i.e. "privates" is quite easy, with only seven commands (see the table below). The important parts are found in the parameter specifications, explained in the next section. [comment { No tables in doctools, using an example to get a tabular formatting. }] [comment { TODO doctools: table markup }] [comment { TODO doctools: named TOCs for commands - embedded small TOCs}] [example { description Set help text for command. input

Changes to embedded/man/files/cmdr.n.

 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298  \\$1\l'|0\(ul'\\$2 .. .TH "cmdr" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr \- Cmdr - Main package and API .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr\fR \fBnew\fR \fIname\fR \fIspecification\fR .sp \fB::cmdr\fR \fBcreate\fR \fIobj\fR \fIname\fR \fIspecification\fR .sp \fB::cmdr\fR \fBinteractive\fR ?\fIenable\fR? .sp ................................................................................ .TP string \fIname\fR The user-visible name of the command (hierarchy)\&. .TP script \fIactions\fR The specification of the subordinate commands\&. On the command line these are the toplevel commands of the application using the hierarchy\&. Please read \fICmdr - Specification Language\fR, (section "Officers") for the details\&. .RE .TP \fB::cmdr\fR \fBinteractive\fR ?\fIenable\fR? This command globally (de)activates the interactive parts of the framework, as per the value of \fIenable\fR\&. .sp By default (initial state) the framework allows interaction\&.   | | |  240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298  \\$1\l'|0\(ul'\\$2 .. .TH "cmdr" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr \- Cmdr - Main package and API .SH SYNOPSIS package require \fBcmdr \fR .sp \fB::cmdr\fR \fBnew\fR \fIname\fR \fIspecification\fR .sp \fB::cmdr\fR \fBcreate\fR \fIobj\fR \fIname\fR \fIspecification\fR .sp \fB::cmdr\fR \fBinteractive\fR ?\fIenable\fR? .sp ................................................................................ .TP string \fIname\fR The user-visible name of the command (hierarchy)\&. .TP script \fIactions\fR The specification of the subordinate commands\&. On the command line these are the toplevel commands of the application using the hierarchy\&. Please read \fICmdr - Officer Specification Language\fR for the details\&. .RE .TP \fB::cmdr\fR \fBinteractive\fR ?\fIenable\fR? This command globally (de)activates the interactive parts of the framework, as per the value of \fIenable\fR\&. .sp By default (initial state) the framework allows interaction\&. 

Changes to embedded/man/files/cmdr_actor.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_actor" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_actor \- Cmdr - Base class for officers and privates - Internal .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::actor\fR \fBnew\fR .sp \fB::cmdr::actor\fR \fBcreate\fR \fIobj\fR .sp \fB\fR \fBcompletions\fR \fIparse\fR \fIcmdlist\fR .sp   | | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::actor" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::actor \- Cmdr - Base class for officers and privates - Internal .SH SYNOPSIS package require \fBcmdr::actor \fR .sp \fB::cmdr::actor\fR \fBnew\fR .sp \fB::cmdr::actor\fR \fBcreate\fR \fIobj\fR .sp \fB\fR \fBcompletions\fR \fIparse\fR \fIcmdlist\fR .sp 

Changes to embedded/man/files/cmdr_config.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_config" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_config \- Cmdr - Collection of parameters for privates .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::config\fR \fBnew\fR \fIcontext\fR \fIspec\fR .sp \fB::cmdr::config\fR \fBcreate\fR \fIobj\fR \fIcontext\fR \fIspec\fR .sp \fB::cmdr::config\fR \fBinteractive\fR ?\fIenable\fR? .sp ................................................................................ The (command) name of the new config instance\&. .TP cmdr::config \fIcontext\fR The instance command of the \fBcmdr::private\fR instance the configuration will belong to\&. .TP script \fIspec\fR Tcl-script specifying the parameters in detail\&. Please read \fICmdr - Specification Language\fR (section "Parameters") for the details\&. .RE .TP \fB::cmdr::config\fR \fBinteractive\fR ?\fIenable\fR? Class method to change the global interaction default for the mini-shell of privates\&. The default is to disable this mini-shell for all privates, and enable it on a per-private basis, through the specification\&.   | | | | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::config" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::config \- Cmdr - Collection of parameters for privates .SH SYNOPSIS package require \fBcmdr::config \fR .sp \fB::cmdr::config\fR \fBnew\fR \fIcontext\fR \fIspec\fR .sp \fB::cmdr::config\fR \fBcreate\fR \fIobj\fR \fIcontext\fR \fIspec\fR .sp \fB::cmdr::config\fR \fBinteractive\fR ?\fIenable\fR? .sp ................................................................................ The (command) name of the new config instance\&. .TP cmdr::config \fIcontext\fR The instance command of the \fBcmdr::private\fR instance the configuration will belong to\&. .TP script \fIspec\fR Tcl-script specifying the parameters in detail\&. Please read \fICmdr - Parameter Specification Language\fR for the details\&. .RE .TP \fB::cmdr::config\fR \fBinteractive\fR ?\fIenable\fR? Class method to change the global interaction default for the mini-shell of privates\&. The default is to disable this mini-shell for all privates, and enable it on a per-private basis, through the specification\&. 

Changes to embedded/man/files/cmdr_dsl.n.

 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 ... 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 ... 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 ... 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957  .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_dsl" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_dsl \- Cmdr - Specification Language .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document is for users of the cmdr framework\&. It describes the domain-specific language for the specification of command hierarchies with commands and their parameters (options, and inputs)\&. .SH "INTRODUCTORY EXAMPLES" Instead of immediately diving into the full syntax of the specification language first a few examples to demonstrate the general look and feel, plus basic features\&. .SS "BASIC SETUP, PRIVATE WITH INPUTS" .PP This example specifies a command line providing 3 commands for the management of command aliases\&. This is actually a slice of \fBstackato\fR's interface, reduced and modified to fit here\&. While it does not have the necessary backend procedures required to actually run the commands, it is enough to demonstrate basic features, ................................................................................ .CE .PP At the bottom of the example, just above we can also see the very simple Tcl command which invokes the command line processing for a list of words, here coming from \fB$argv\fR, i\&.e\&. the application's command line\&. .SS "BASIC SETUP, COMMAND NESTING" .PP The decoupling of command names from their implementations seen in the previous example makes it easy to re-arrange and re-label the user visible commands without having to touch any other part of the code\&. .PP This is demonstrated in the example below, moving the 3 ................................................................................ \&.\&.\&. .CE .SH "LANGUAGE REFERENCE" With the examples behind us we can now go and specify the entire specification language\&. If you have skipped here on first reading, ignoring the examples, please go back and read them first\&. .SS GENERAL .PP The conceptual model underneath the command hierarchy is that of a tree\&. .PP The inner nodes of the tree represent command ensembles, here called "officer"s\&. Each officer knows one or more commands, and delegates actual execution to their respective specification, which may be another officer, or a private\&. .PP The leaf nodes of the tree represent the individual commands, here called "private"s\&. Each private is responsible for a single action, and knows how to perform it and the parameters used to configure that action at runtime\&. .PP The same model is graphically presented in the Entity-Relationship-Diagram below\&. .PS .nf is-a is-a /-1:1-> actor <-1:1-\\ ................................................................................ \\--/ 1:(0-n) has .fi .PE .PP The "Actor" in that diagram is the common base class for the ensembles and commands and not directly relevant to users\&. .PP The "Config" on the other hand is the second interface seen by the user, as the sole argument to the action command prefix of \fBprivate\fR (See section \fBOfficer\fR)\&. This container holds all the declared parameters of the command the action is invoked for, and provides easy access to them through its methods (see package \fBcmdr::config\fR) at the time of execution\&. .SS OFFICERS .CS alias = \&.\&.\&. Declare an alternate name for a command path\&. alias Declare an alternate name for the previous command\&. common Added embedded/man/files/cmdr_dsl_officer.n.      > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455  '\" '\" Generated from file 'cmdr_dsl_officer\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2013 Andreas Kupries '\" Copyright (c) 2013 Documentation, Andreas Kupries '\" '\" The definitions below are for supplemental macros used in Tcl/Tk '\" manual entries. '\" '\" .AP type name in/out ?indent? '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS ?type? ?name? '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .CS '\" Begin code excerpt. '\" '\" .CE '\" End code excerpt. '\" '\" .VS ?version? ?br? '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. The first argument is ignored and used for recording '\" the version when the .VS was added, so that the sidebars can be '\" found and removed when they reach a certain age. If another argument '\" is present, then a line break is forced before starting the sidebar. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" '\" .SO '\" Start of list of standard options for a Tk widget. The '\" options follow on successive lines, in four columns separated '\" by tabs. '\" '\" .SE '\" End of list of standard options for a Tk widget. '\" '\" .OP cmdName dbName dbClass '\" Start of description of a specific option. cmdName gives the '\" option's name as specified in the class command, dbName gives '\" the option's name in the option database, and dbClass gives '\" the option's class in the option database. '\" '\" .UL arg1 arg2 '\" Print arg1 underlined, then print arg2 normally. '\" '\" RCS: @(#)$Id: man.macros,v 1.1 2009/01/30 04:56:47 andreas_kupries Exp $'\" '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '\" # SO - start of list of standard options .de SO .SH "STANDARD OPTIONS" .LP .nf .ta 4c 8c 12c .ft B .. '\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\fBoptions\\fR manual entry for details on the standard options. .. '\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. '\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. '\" # CE - end code excerpt .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_dsl_officer" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_dsl_officer \- Cmdr - Officer Specification Language .SH SYNOPSIS \fBalias\fR \fIname\fR \fB=\fR \fIname'\fR\&.\&.\&. .sp \fBalias\fR \fIname\fR .sp \fBcommon\fR \fIname\fR \fItext\fR .sp \fBdefault\fR .sp \fBdescription\fR \fItext\fR .sp \fBehandler\fR \fIcmdprefix\fR .sp \fBofficer\fR \fIname\fR \fIscript\fR .sp \fBprivate\fR \fIname\fR \fIscript\fR \fIcmdprefix\fR .sp \fBundocumented\fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document is for users of the cmdr framework\&. It introduces the domain-specific language for the specification of \fIofficer\fRs in detail\&. .SH "RELATED SPECIFICATION DOCUMENTS" .IP [1] \fICmdr - Introduction to the Specification Language\fR .IP [2] \fICmdr - Officer Specification Language\fR .IP [3] \fICmdr - Private Specification Language\fR .IP [4] \fICmdr - Parameter Specification Language\fR .PP .SH "LANGUAGE REFERENCE" .TP \fBalias\fR \fIname\fR \fB=\fR \fIname'\fR\&.\&.\&. .TP \fBalias\fR \fIname\fR This is a structuring command, for the command hierarchy\&. Its main uses are the creation of alternate command names, and of shortcuts through the command hierarchy\&. .sp For example, \fBstackato\fR's command specification for alias management is written using deep nesting and uses aliases to provide the look of a flat namespace to application users\&. .sp In the first form the \fIname\fR is given the explicit path to the actor the name is an alias for\&. In the second form the alias implicitly refers to the immediately preceding \fIofficer\fR or \fIprivate\fR\&. Note that "immediately" is interpreted at the current level\&. The system is \fInot\fR looking into a nested specification for its last command\&. .RS .TP string \fIname\fR The name of the alias\&. .TP string \fIname'\&.\&.\&.\fR The path to the actor, as list of names\&. .RE .TP \fBcommon\fR \fIname\fR \fItext\fR This is another structuring command, for structuring the specification itself instead of the command tree it declares\&. .sp It creates named values, usually code blocks, which can be shared between specifications\&. Note that while each block is visible in the current \fIofficer\fR and its subordinates, parents and siblings have no access\&. .sp An example of such a block would be .CS common *all* { option debug { Activate client internal tracing\&. } { undocumented list when-complete [lambda {p tags} { foreach t $tags { debug on$t } }] } } .CE .IP This example defines an option to access the subsystem for debug narative (See package \fBTcllib\fR)\&. The example is actually special, as the block named \fB*all*\fR is reserved by the framework\&. This block, if defined, is automatically included at the front of all \fIprivate\fR specifications, i\&.e\&. shared across all the privates specified underneath this \fIofficer\fR\&. A very important trait for the \fIoption\fR in the example, as it makes the debug setup available to all privates without having to explicitly include the block, and possibly forgetting such\&. .sp Generally speaking, the framework reserves all blocks whose name begins with a star, i\&.e \fB*\fR, for its own use\&. .RS .TP string \fIname\fR The name of the common block\&. .TP string \fItext\fR The text of the block\&. .RE .TP \fBdefault\fR This command sets up a special kind of alias\&. The last \fIprivate\fR or \fIofficer\fR is set as the default command to use at runtime\&. This means that if during "Dispatch" phase the currently processed word does not match any of the commands known to this \fIofficer\fR this default is used\&. If no default is specified an error will be thrown instead\&. .TP \fBdescription\fR \fItext\fR This command declares the help text of the \fIofficer\fR\&. .TP \fBehandler\fR \fIcmdprefix\fR This is an advanced command which should normally only be specified at the top of the whole hierarchy (from which its value will automatically propagate to all subordinates)\&. .sp At runtime the framework will call the specified command prefix with a single argument, a script whose execution is equivalent to the phases "Parsing", "Completion", and "Execution" of the framework, as described in --TODO--(sectref:flow/phases)--\&. The handler \fImust\fR call this script, and can perform any application-specific actions before and after\&. .sp This handler's main uses are two-fold: .RS .IP [1] Capture and hande application-specific errors which should not abort the application, nor shown as Tcl stacktrace\&. .IP [2] Cleanup of application-specific transient state the \fIparameter\fR callbacks (See \fICmdr - Parameter Specification Language\fR) and/or actions may have set during their execution\&. This is especially important if the interactive command line shells of the framework are enabled\&. Without such a handler and its bespoke cleanup code transient state \fIwill\fR leak between multiple commands run from such a shell, something which is definitely not wanted\&. .RE .TP \fBofficer\fR \fIname\fR \fIscript\fR This command creates a named subordinate \fIofficer\fR with its specification \fIscript\fR of officer commands as described here\&. .TP \fBprivate\fR \fIname\fR \fIscript\fR \fIcmdprefix\fR This command creates a named subordinate \fIprivate\fR with its specification \fIscript\fR of private commands (See \fICmdr - Private Specification Language\fR), and a command prefix to invoke when it is chosen\&. .sp This command prefix is called with a single argument, the \fBcmdr::config\fR instance holding the \fIparameter\fRs of the private\&. --TODO--(ref:backend-example-code)-- .TP \fBundocumented\fR This command excludes the \fIofficer\fR (and its subordinates) from the generated help\&. Note that subordinates reachable through aliases may be included, under the alias name, if they are not explicitly excluded themselves\&. .PP .PP Please continue reading with \fICmdr - Private Specification Language\fR\&. .SH "RELATED DOCUMENTS" .IP [1] \fICmdr - Introduction to the project\fR .IP [2] \fICmdr - License\fR .IP [3] \fICmdr - Log of Changes\fR .IP [4] \fICmdr - How To Get The Sources\fR .IP [5] \fICmdr - The Installer's Guide\fR .IP [6] \fICmdr - The Developer's Guide\fR .PP .SH "BUGS, IDEAS, FEEDBACK" Both the package(s) and this documentation will undoubtedly contain bugs and other problems\&. Please report such at \fICmdr Tickets\fR [https:/core\&.tcl\&.tk/akupries/cmdr]\&. .PP Please also report any ideas you may have for enhancements of either package(s) and/or documentation\&. .SH KEYWORDS 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 .SH COPYRIGHT .nf Copyright (c) 2013 Andreas Kupries Copyright (c) 2013 Documentation, Andreas Kupries .fi 

     > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679  '\" '\" Generated from file 'cmdr_dsl_parameter\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2013 Andreas Kupries '\" Copyright (c) 2013 Documentation, Andreas Kupries '\" '\" The definitions below are for supplemental macros used in Tcl/Tk '\" manual entries. '\" '\" .AP type name in/out ?indent? '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS ?type? ?name? '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .CS '\" Begin code excerpt. '\" '\" .CE '\" End code excerpt. '\" '\" .VS ?version? ?br? '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. The first argument is ignored and used for recording '\" the version when the .VS was added, so that the sidebars can be '\" found and removed when they reach a certain age. If another argument '\" is present, then a line break is forced before starting the sidebar. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" '\" .SO '\" Start of list of standard options for a Tk widget. The '\" options follow on successive lines, in four columns separated '\" by tabs. '\" '\" .SE '\" End of list of standard options for a Tk widget. '\" '\" .OP cmdName dbName dbClass '\" Start of description of a specific option. cmdName gives the '\" option's name as specified in the class command, dbName gives '\" the option's name in the option database, and dbClass gives '\" the option's class in the option database. '\" '\" .UL arg1 arg2 '\" Print arg1 underlined, then print arg2 normally. '\" '\" RCS: @(#) $Id: man.macros,v 1.1 2009/01/30 04:56:47 andreas_kupries Exp$ '\" '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '\" # SO - start of list of standard options .de SO .SH "STANDARD OPTIONS" .LP .nf .ta 4c 8c 12c .ft B .. '\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\fBoptions\\fR manual entry for details on the standard options. .. '\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. '\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. '\" # CE - end code excerpt .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_dsl_parameter" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_dsl_parameter \- Cmdr - Parameter Specification Language .SH SYNOPSIS \fBlabel\fR \fItext\fR .sp \fBalias\fR \fIname\fR .sp \fBoptional\fR .sp \fBtest\fR .sp \fBundocumented\fR .sp \fBdefault\fR \fIvalue\fR .sp \fBgenerate\fR \fIcmdprefix\fR .sp \fBinteract\fR ?\fIprompt\fR? .sp \fBlist\fR .sp \fBdefered\fR .sp \fBimmediate\fR .sp \fBvalidate\fR \fIcmdprefix\fR .sp \fBpresence\fR .sp \fBwhen-complete\fR \fIcmdprefix\fR .sp \fBwhen-set\fR \fIcmdprefix\fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document is for users of the cmdr framework\&. It introduces the domain-specific language for the specification of parameters in detail\&. .SH "RELATED SPECIFICATION DOCUMENTS" .IP [1] \fICmdr - Introduction to the Specification Language\fR .IP [2] \fICmdr - Officer Specification Language\fR .IP [3] \fICmdr - Private Specification Language\fR .IP [4] \fICmdr - Parameter Specification Language\fR .PP .SH "LANGUAGE REFERENCE" .PP The \fIparameter\fRs of \fIprivate\fRs are the heart of the system, providing the space needed to transfer command arguments to their implementations, and having the most attributes controlling their behaviour\&. .PP This complexity is strongly mitigated by the use of sensible defaults for each of the three possible kinds of parameter, i\&.e\&. positional \fIinput\fRs, named \fIoption\fRs", and \fIstate\fR hidden from the command line\&. .PP Each kind has its own construction command in the language for \fIprivate\fRs (See \fICmdr - Private Specification Language\fR) which specifies the common information which cannot have defaults, i\&.e\&. .IP [1] the name identifying it to the system, .IP [2] the help text describing it in informal speech, and, of course, .IP [3] the parameter specification itself, using the commands of this section\&. .PP .PP .SS NAMING .PP We have two commands to influence the visible naming of all \fIparameter\fRs\&. .PP As background, all \fIparameter\fRs are named, to properly identify them within the framework and other Tcl code, i\&.e\&. in the various callbacks and the \fIprivate\fR's action\&. This \fIsystem name\fR has to be unique within the \fIprivate\fR a \fIparameter\fR belongs to\&. Beyond that however the visible (i\&.e\&. non-term state]) \fIparameter\fRs have to be identified by users within help texts, and, in the case of \fIoption\fRs, for detection during the \fIParsing\fR phase\&. That is the visible naming, seen by a user of any application whose command line processing is based on the Cmdr framework\&. .TP \fBlabel\fR \fItext\fR This command declares the \fIparameter\fR's visible name, if different from the \fIsystem name\fR used as the default\&. Note that in most cases this default is good enough, obviating the need for this command\&. .sp The only use case seen so far is when two semantically equivalent \fIinput\fR and \fIoption\fR \fIparameter\fRs clash, forcing the use of different system names due to the requirement for their uniqueness, yet also use the same visible name and flag within the help to highlight their connection and equivalence\&. .TP \fBalias\fR \fIname\fR For \fIoption\fRs the \fBlabel\fR command and its default specifies the name of the \fIprimary flag\fR recognized during the \fIParsing\fR phase\&. If that is not enough for a specific \fIoption\fR this command allows the specification of any number additional flags to be recognized\&. .sp Note however that the framework automatically recognizes not only the specified flag(s), but also all their unique prefixes, obviating the need for this command in many cases\&. .PP .PP .SS "GENERAL CONTROL" .PP The general handling of a \fIparameter\fR is influenced by three commands: .TP \fBoptional\fR This command marks the parameter as \fIoptional\fR, i\&.e\&. as something the user may skip on the command line, with the application supplying sensible defaults (See section \fBRepresentations\fR)\&. This causes the framework to expend some effort in the \fIParsing\fR phase to determine whether an argument word should be assigned to the parameter, or not\&. .sp This setting is only applicable to \fIinput\fRs, as \fIoption\fRs are optional by definition, and \fIstate\fR is hidden\&. .TP \fBtest\fR This command is related to the above, switching the runtime from the standard regime for acceptance (based on counting and thresholds) to a different regime based on validation\&. The details are explained in --TODO--(sectref:flow/parsing,flow/optional)--\&. .TP \fBundocumented\fR This command excludes the \fIparameter\fR from the generated help\&. .sp Its main use case is the hiding of \fIoption\fRs giving an application developer access to the internals of their application, something a regular user has no need of, and doesn't have to know about\&. .PP .PP .SS REPRESENTATIONS .PP An important concept of \fIparameter\fRs is something taken up from Tcl itself\&. The differentation between \fIstring\fR and \fIinternal representations\fR\&. Where Tcl uses \fIinternal representations\fR to speed up its execution here this separation is that of between the information delivered to the application by a user, and the application-specific data structures behind them\&. .PP All \fIparameter\fRs will have an \fIinternal representation\fR\&. This is usually derived from the \fIstring representation\fR provided by the user\&. The details of that process are explained in section \fBValidation\fR\&. However we have cases where the user cannot specify a string representation (\fIstate\fRs), or is allowed to choose not to (optional \fIinput\fRs, \fIoption\fRs)\&. For these cases three specification commands are made available enabling us to programmatically choose the internal representation\&. .TP \fBdefault\fR \fIvalue\fR This command specifies a constant default value for the internal representation\&. .TP \fBgenerate\fR \fIcmdprefix\fR This command specifies a callback to compute the default internal representation at runtime\&. This is useful if the default is something which cannot be captured as a fixed value\&. An example would be a handle to some resource, or a dynamically created object\&. .sp The command prefix is invoked with a single argument, the \fBcmdr::parameter\fR instance for which to generate the internal representation\&. .PP .PP The commands \fBdefault\fR and \fBgenerate\fR exclude each other, i\&.e\&. only of them can be specified, but not both\&. If neither are specified, and we need a default (see the cases above) then a default is chosen by the framework itself, as per the two rules below: .IP [1] Use the empty string for a \fBlist\fR parameter\&. .IP [2] Use the default value supplied by the chosen \fIvalidation type\fR (See section \fBValidation\fR)\&. .PP .TP \fBinteract\fR ?\fIprompt\fR? This command actually does not specify an \fIinternal representation\fR, but activates another method for the user to specify the \fIstring representation\fR of the \fIparameter\fR, outside of the command line\&. As such it has priority over either \fBdefault\fR and \fBgenerate\fR, and can be specified with either\&. A \fIparameter\fR marked with it will interactively ask the user for a value if none was specified on the command line\&. .sp The default for the \fIprompt\fR is derived from the \fIparameter\fR's \fIsystem name\fR\&. .PP .PP To recapitulate: .IP [1] A \fIstring representation\fR specified on the command line has the highest priority and goes through the chosen \fIvalidation type\fR to get the associated \fIinternal representation\fR\&. .IP [2] If activated via \fBinteract\fR a small shell is run asking the user for a value (or more, as per \fBlist\fR, see below)\&. The result goes through the chosen \fIvalidation type\fR to get the associated \fIinternal representation\fR\&. .IP [3] After that the \fIinternal representation\fR is either the declared \fBdefault\fR value, or the result of invoking the \fBgenerate\fR callback\&. As \fIinternal representation\fRs the resulting values are \fInot\fR run through the chosen \fIvalidation type\fR\&. .PP .TP \fBlist\fR This command marks the \fIparameter\fR as a list\&. In other words, its \fIstring\fR and \fIinternal representation\fR is actually a list of such, instead of a single value\&. By default all parameters are scalar\&. .sp This affects the handling of the parameter by the \fIParsing\fR phase, by \fBinteract\fR above, and the use of the \fIvalidation type\fR\&. The last two ask for multiple values, and feed the elements of the \fIstring representation\fR separately through validation instead of just the string value in one\&. In the \fIParsing\fR phase treatment of \fIoption\fRs changes from keeping only the last assigned value to the accumulation of all values\&. Similarly a list-\fIinput\fR takes all the remaining words on the command line for itself instead of just the current word\&. Because of this list-\fIinputs\fR are only allowed as the last \fIparameter\fR of a \fIprivate\fR\&. .PP .PP The last two specification commands dealing with the representations control \fIwhen\fR the \fIinternal representation\fR is created\&. .TP \fBdefered\fR This command marks a \fIparameter\fR as \fIdefered\fR, causing its \fIinternal representation\fR to be computed on first access to its value\&. This is the default for \fIstate\fR parameters\&. .TP \fBimmediate\fR This command marks a \fIparameter\fR as \fIimmediate\fR, causing its \fIinternal representation\fR to be computed in the \fICompletion\fR phase\&. This is the default for \fIinput\fR and \fIoption\fR parameters\&. .PP .PP .SS VALIDATION .PP The answer to the necessity of moving between the \fIstring\fR and \fIinternal representations\fR described in the previous section are the \fIvalidation types\fR\&. Given a \fIstring representation\fR they either return the associated \fIinternal representation\fR or raise an error, signaling that the string was illegal\&. This part of their work, the verification of the legality of the input string gave them their name\&. .PP The general concept of \fIvalidation types\fR was taken from \fBsnit\fR, and modified to suit Cmdr\&. Where snit's types expect only a single method to validate the input Cmdr expects all types to support an ensemble of \fIfour\fR methods, one for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus delivery of a default representation and support for command line completion\&. .TP \fBvalidate\fR \fIcmdprefix\fR This command specifies a \fIvalidation type\fR for the \fIparameter\fR, in the form of a command prefix (or the name of one of the builtin types, see package \fBcmdr::validate\fR)\&. The set of methods this callback has to support, their signatures, etc\&. are all explained in \fICmdr - Writing custom validation types\fR\&. This document contains the implementation of the standard boolean validation type as an example as well\&. .sp Because of the same necessity all \fIparameter\fRs must have a \fIvalidation type\fR assigned to them, and the system will choose which, if the user did not\&. This choice is made as per the six rules below and always returns one of the standard types implemented by package \fBcmdr::validate\fR\&. .RS .IP [1] Use \fBidentity\fR if a \fBgenerate\fR callback is specified\&. .IP [2] Use \fBboolean\fR if no \fBdefault\fR is specified and the parameter is an \fIoption\fR\&. .IP [3] Use \fBidentity\fR if no \fBdefault\fR is specified and the parameter is an \fIinput\fR\&. .IP [4] Use \fBboolean\fR if the specified \fBdefault\fR value is a Tcl boolean\&. .IP [5] Use \fBinteger\fR if the specified \fBdefault\fR value is a Tcl integer\&. .IP [6] Use \fBidentity\fR as fallback of last resort\&. .RE .TP \fBpresence\fR This command is best discussed as part of the wider area of \fIboolean\fR \fIoption\fRs, i\&.e\&. \fIoption\fRs with the standard \fIvalidation type\fR \fBboolean\fR assigned to them\&. These have associated special behaviours, both in the handling of the specification, and in the \fIParsing\fR phase\&. .sp First, normal boolean options\&. They have automatic aliases declared for them, derived from their primary flag\&. An option named "foo" will have an alias of "no-foo", and the reverse\&. In the \fIParsing\fR phase the "foo" and "no-foo" flags have inverse semantics, and both are allowed to occur without option argument following the flag\&. This is in contrast to all other \fIoption\fRs which must have such an argument\&. The parser essentially uses the \fIvalidation type\fR to decide if the word after the flag is a proper boolean value, or not, i\&.e\&. an argument to assign to the \fIparameter\fR, or not\&. .sp Now \fBpresence\fR declares a variant of the above, a boolean option \fIwithout\fR the automatic aliases, and \fInever\fR taking an argument during parsing\&. Its mere \fIpresence\fR on the command line will set its \fIparameter\fR\&. Their \fBdefault\fR value is consequently fixed to \fBfalse\fR as well\&. .PP .PP .SS SIGNALING Of the four callbacks supported by parameters the first two, \fBgenerate\fR and \fBvalidate\fR have been described already, in the sections \fBRepresentations\fR and \fBValidation\fR, respectively\&. .PP This section explains the commonalities between the callbacks in general, and the last two, for notifications about state changes in detail\&. .PP All callbacks are treated as command prefixes, not scripts\&. There are no placeholder substitutions, only arguments added to each command prefix on invokation\&. This does not harm the generality of the system, as complex scripts can be used via procedures or equivalents (i\&.e\&. \fBapply\fR)\&. .PP The two callbacks not yet described are the state-change callbacks through which the framework can actively drive parts of the application while processing the command line, whereas normally the application drives access to parameters through their methods\&. .TP \fBwhen-complete\fR \fIcmdprefix\fR This command declares the state-change callback to invoke when the \fIinternal representation\fR of the \fIparameter\fR is generated from the \fIstring representation\fR, or the various ways of getting a default\&. .sp The callback is invoked with two arguments, the \fBcmdr::parameter\fR instance of the changed \fIparameter\fR, and its \fIinternal representation\fR, in this order\&. .TP \fBwhen-set\fR \fIcmdprefix\fR This command declares the state-change callback to invoke when the \fIstring representation\fR of the \fIparameter\fR is set during command line parsing\&. .sp The callback is invoked with two arguments, the \fBcmdr::parameter\fR instance of the changed \fIparameter\fR, and its \fIstring representation\fR, in this order\&. .PP Due to their nature these callbacks are invoked at runtime during either the \fIParsing\fR, \fICompletion\fR, or \fIExecution\fR phases\&. The details are shown in the table below\&. The specification commands influencing the timing, i\&.e\&. forcing the use in a specific phase are shown in the intersection of callback and phase\&. .CS | Dispatch | Parsing | Completion | Execution --------------------+----------+---------+-------------+----------- validate (default) | * | | | --------------------+----------+---------+-------------+----------- validate (complete) | | * | immediate | defered when-set | | * | | --------------------+----------+---------+-------------+----------- generate | | | immediate | defered validate (validate) | | test | immediate | defered validate (release) | | test | immediate | defered --------------------+----------+---------+-------------+----------- when-complete | | | immediate | defered --------------------+----------+---------+-------------+----------- .CE .SH "RELATED DOCUMENTS" .IP [1] \fICmdr - Introduction to the project\fR .IP [2] \fICmdr - License\fR .IP [3] \fICmdr - Log of Changes\fR .IP [4] \fICmdr - How To Get The Sources\fR .IP [5] \fICmdr - The Installer's Guide\fR .IP [6] \fICmdr - The Developer's Guide\fR .PP .SH "BUGS, IDEAS, FEEDBACK" Both the package(s) and this documentation will undoubtedly contain bugs and other problems\&. Please report such at \fICmdr Tickets\fR [https:/core\&.tcl\&.tk/akupries/cmdr]\&. .PP Please also report any ideas you may have for enhancements of either package(s) and/or documentation\&. .SH KEYWORDS 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 .SH COPYRIGHT .nf Copyright (c) 2013 Andreas Kupries Copyright (c) 2013 Documentation, Andreas Kupries .fi  Added embedded/man/files/cmdr_dsl_private.n.      > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360  '\" '\" Generated from file 'cmdr_dsl_private\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2013 Andreas Kupries '\" Copyright (c) 2013 Documentation, Andreas Kupries '\" '\" The definitions below are for supplemental macros used in Tcl/Tk '\" manual entries. '\" '\" .AP type name in/out ?indent? '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS ?type? ?name? '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .CS '\" Begin code excerpt. '\" '\" .CE '\" End code excerpt. '\" '\" .VS ?version? ?br? '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. The first argument is ignored and used for recording '\" the version when the .VS was added, so that the sidebars can be '\" found and removed when they reach a certain age. If another argument '\" is present, then a line break is forced before starting the sidebar. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" '\" .SO '\" Start of list of standard options for a Tk widget. The '\" options follow on successive lines, in four columns separated '\" by tabs. '\" '\" .SE '\" End of list of standard options for a Tk widget. '\" '\" .OP cmdName dbName dbClass '\" Start of description of a specific option. cmdName gives the '\" option's name as specified in the class command, dbName gives '\" the option's name in the option database, and dbClass gives '\" the option's class in the option database. '\" '\" .UL arg1 arg2 '\" Print arg1 underlined, then print arg2 normally. '\" '\" RCS: @(#)$Id: man.macros,v 1.1 2009/01/30 04:56:47 andreas_kupries Exp $'\" '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '\" # SO - start of list of standard options .de SO .SH "STANDARD OPTIONS" .LP .nf .ta 4c 8c 12c .ft B .. '\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\fBoptions\\fR manual entry for details on the standard options. .. '\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. '\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. '\" # CE - end code excerpt .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_dsl_private" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_dsl_private \- Cmdr - Private Specification Language .SH SYNOPSIS \fBdescription\fR \fItext\fR .sp \fBinput\fR \fIname\fR \fIhelp\fR \fIscript\fR .sp \fBinteractive\fR .sp \fBoption\fR \fIname\fR \fIhelp\fR \fIscript\fR .sp \fBstate\fR \fIname\fR \fIhelp\fR \fIscript\fR .sp \fBundocumented\fR .sp \fBuse\fR \fIname\fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document is for users of the cmdr framework\&. It introduces the domain-specific language for the specification of privates in detail\&. .SH "RELATED SPECIFICATION DOCUMENTS" .IP [1] \fICmdr - Introduction to the Specification Language\fR .IP [2] \fICmdr - Officer Specification Language\fR .IP [3] \fICmdr - Private Specification Language\fR .IP [4] \fICmdr - Parameter Specification Language\fR .PP .SH "LANGUAGE REFERENCE" .PP The specification of \fIprivate\fRs is quite easy, with only seven commands\&. The important parts are found in the \fIparameter\fR specifications, explained in \fICmdr - Parameter Specification Language\fR\&. .TP \fBdescription\fR \fItext\fR This command declares the help text for the \fIprivate\fR\&. .TP \fBinput\fR \fIname\fR \fIhelp\fR \fIscript\fR This command adds an \fIinput\fR (i\&.e\&. positional) \fIparameter\fR to the \fIprivate\fR, with description \fIhelp\fR and its specification \fIscript\fR of parameter commands as described in \fICmdr - Parameter Specification Language\fR\&. .TP \fBinteractive\fR This command activates a mini-shell for this \fIprivate\fR which will be invoked when required \fIparameter\fRs do not have a value after argument extraction and matching\&. .sp By default the only interactive command line shells are associated with the \fIofficer\fRs\&. .sp The command \fBcmdr::config interactive\fR provided by the package \fBcmdr::config\fR can be used to globally activate this type of shell for all \fIprivate\fRs\&. .TP \fBoption\fR \fIname\fR \fIhelp\fR \fIscript\fR This command adds an \fIoption\fR (i\&.e\&. named) \fIparameter\fR to the \fIprivate\fR, with description \fIhelp\fR and its specification \fIscript\fR of parameter commands as described in \fICmdr - Parameter Specification Language\fR\&. .TP \fBstate\fR \fIname\fR \fIhelp\fR \fIscript\fR This command adds a \fIstate\fR (i\&.e\&. hidden) \fIparameter\fR to the \fIprivate\fR, with description \fIhelp\fR and its specification \fIscript\fR of parameter commands as described in \fICmdr - Parameter Specification Language\fR\&. .TP \fBundocumented\fR This command excludes the \fIprivate\fR from the generated help\&. .TP \fBuse\fR \fIname\fR This command is the counterpart to \fBcommon\fR of \fIofficer\fRs (See \fICmdr - Officer Specification Language\fR)\&. It inserts the named block into the specification, executing it in place\&. As such it expects the contents to be a script of private commands as described in this section\&. .PP .PP Please continue reading with \fICmdr - Parameter Specification Language\fR\&. .SH "RELATED DOCUMENTS" .IP [1] \fICmdr - Introduction to the project\fR .IP [2] \fICmdr - License\fR .IP [3] \fICmdr - Log of Changes\fR .IP [4] \fICmdr - How To Get The Sources\fR .IP [5] \fICmdr - The Installer's Guide\fR .IP [6] \fICmdr - The Developer's Guide\fR .PP .SH "BUGS, IDEAS, FEEDBACK" Both the package(s) and this documentation will undoubtedly contain bugs and other problems\&. Please report such at \fICmdr Tickets\fR [https:/core\&.tcl\&.tk/akupries/cmdr]\&. .PP Please also report any ideas you may have for enhancements of either package(s) and/or documentation\&. .SH KEYWORDS 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 .SH COPYRIGHT .nf Copyright (c) 2013 Andreas Kupries Copyright (c) 2013 Documentation, Andreas Kupries .fi 

Changes to embedded/man/files/cmdr_help.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_help" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_help \- Cmdr - Utilities for help text formatting and setup - Internal .SH SYNOPSIS package require \fBcmdr::help \fR .sp \fB::cmdr::help\fR \fBauto\fR \fIactor\fR .sp .BE .SH DESCRIPTION   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::help" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::help \- Cmdr - Utilities for help text formatting and setup - Internal .SH SYNOPSIS package require \fBcmdr::help \fR .sp \fB::cmdr::help\fR \fBauto\fR \fIactor\fR .sp .BE .SH DESCRIPTION 

Changes to embedded/man/files/cmdr_help_json.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_help_json" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_help_json \- Cmdr - Formatting help as JSON object .SH SYNOPSIS package require \fBcmdr::help::json \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&.   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::help::json" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::help::json \- Cmdr - Formatting help as JSON object .SH SYNOPSIS package require \fBcmdr::help::json \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. 

Changes to embedded/man/files/cmdr_help_sql.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_help_sql" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_help_sql \- Cmdr - Formatting help as series of SQL commands .SH SYNOPSIS package require \fBcmdr::help::sql \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&.   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::help::sql" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::help::sql \- Cmdr - Formatting help as series of SQL commands .SH SYNOPSIS package require \fBcmdr::help::sql \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. 

Changes to embedded/man/files/cmdr_officer.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 ... 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 ... 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_officer" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_officer \- Cmdr - Aggregation of multiple commands for dispatch\&. .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::officer\fR \fBnew\fR \fIsuper\fR \fIname\fR \fIactions\fR .sp \fB::cmdr::officer\fR \fBcreate\fR \fIobj\fR \fIsuper\fR \fIname\fR \fIactions\fR .sp \fB\fR \fBchildren\fR .sp ................................................................................ The instance command of the actor (officer actually) which contains the new officer\&. .TP string \fIname\fR The user-visible name of the command\&. .TP script \fIactions\fR The specification of the officer's subordinates\&. Please read \fICmdr - Specification Language\fR (section "Officers") for the details\&. .RE .PP .SH "INSTANCE API" The instance API is not public\&. It is used internally by the framework during the parsing of a command hierarchy specification to configure the officer instances, and when processing a command line at runtime to manage navigation of the hierarchy, word-completion, etc\&. ................................................................................ script \fIpath\fR The list of names specifying the route from this officer to the new private\&. The last element is the name of the private command, while the preceding names specify the intermediate officers\&. .TP script \fIarguments\fR The specification of the private's parameters\&. Please read \fICmdr - Specification Language\fR (section "Parameters") for the details\&. .TP cmd-prefix \fIaction\fR The command prefix to invoke when this private is selected for execution\&. It takes a single argument, the instance command of the hidden \fBcmdr::config\fR container holding the private's parameters\&. The result of the action, if there is any, is ignored by the framework\&. ................................................................................ the set of subordinates known to this officer\&. This is the same type of script as used during construction, except here we dynamically extend the officer\&. .RS .TP script \fIactions\fR The specification of the officer's additional subordinates\&. Please read \fICmdr - Specification Language\fR (section "Officers") for the details\&. .RE .TP \fB\fR \fBlookup\fR \fIname\fR This method returns the instance command of the sub-ordinate with the given \fIname\fR\&. An error is thrown if such a sub-ordinate does not exist\&. See also method \fBhas\fR\&. .RS   | | | | | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 ... 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 ... 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::officer" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::officer \- Cmdr - Aggregation of multiple commands for dispatch\&. .SH SYNOPSIS package require \fBcmdr::officer \fR .sp \fB::cmdr::officer\fR \fBnew\fR \fIsuper\fR \fIname\fR \fIactions\fR .sp \fB::cmdr::officer\fR \fBcreate\fR \fIobj\fR \fIsuper\fR \fIname\fR \fIactions\fR .sp \fB\fR \fBchildren\fR .sp ................................................................................ The instance command of the actor (officer actually) which contains the new officer\&. .TP string \fIname\fR The user-visible name of the command\&. .TP script \fIactions\fR The specification of the officer's subordinates\&. Please read \fICmdr - Officer Specification Language\fR for the details\&. .RE .PP .SH "INSTANCE API" The instance API is not public\&. It is used internally by the framework during the parsing of a command hierarchy specification to configure the officer instances, and when processing a command line at runtime to manage navigation of the hierarchy, word-completion, etc\&. ................................................................................ script \fIpath\fR The list of names specifying the route from this officer to the new private\&. The last element is the name of the private command, while the preceding names specify the intermediate officers\&. .TP script \fIarguments\fR The specification of the private's parameters\&. Please read \fICmdr - Parameter Specification Language\fR for the details\&. .TP cmd-prefix \fIaction\fR The command prefix to invoke when this private is selected for execution\&. It takes a single argument, the instance command of the hidden \fBcmdr::config\fR container holding the private's parameters\&. The result of the action, if there is any, is ignored by the framework\&. ................................................................................ the set of subordinates known to this officer\&. This is the same type of script as used during construction, except here we dynamically extend the officer\&. .RS .TP script \fIactions\fR The specification of the officer's additional subordinates\&. Please read \fICmdr - Officer Specification Language\fR for the details\&. .RE .TP \fB\fR \fBlookup\fR \fIname\fR This method returns the instance command of the sub-ordinate with the given \fIname\fR\&. An error is thrown if such a sub-ordinate does not exist\&. See also method \fBhas\fR\&. .RS 

Changes to embedded/man/files/cmdr_parameter.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_parameter" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_parameter \- Cmdr - Command parameters .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::parameter\fR \fBnew\fR \fIconfig\fR \fIorder\fR \fIcmdline\fR \fIrequired\fR \fIdefered\fR \fIname\fR \fIdescription\fR \fIspec\fR .sp \fB::cmdr::parameter\fR \fBcreate\fR \fIobj\fR \fIconfig\fR \fIorder\fR \fIcmdline\fR \fIrequired\fR \fIdefered\fR \fIname\fR \fIdescription\fR \fIspec\fR .sp \fB\fR \fBaccept\fR \fIx\fR .sp ................................................................................ help, if not overridden by a \fBlabel\fR declaration (in \fIspec\fR)\&. .TP string \fIdescription\fR Human-readable help text for the parameter\&. .TP script \fIspec\fR Tcl-script specifying the parameter in detail\&. Please read \fICmdr - Specification Language\fR (section "Parameters") for the details\&. .RE .PP .SH "INSTANCE API" Most of the instance API is not public\&. .PP It is described here for use by developers maintaining, modifying and extending the framework itself\&. A user of the framework   | | | | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::parameter" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::parameter \- Cmdr - Command parameters .SH SYNOPSIS package require \fBcmdr::parameter \fR .sp \fB::cmdr::parameter\fR \fBnew\fR \fIconfig\fR \fIorder\fR \fIcmdline\fR \fIrequired\fR \fIdefered\fR \fIname\fR \fIdescription\fR \fIspec\fR .sp \fB::cmdr::parameter\fR \fBcreate\fR \fIobj\fR \fIconfig\fR \fIorder\fR \fIcmdline\fR \fIrequired\fR \fIdefered\fR \fIname\fR \fIdescription\fR \fIspec\fR .sp \fB\fR \fBaccept\fR \fIx\fR .sp ................................................................................ help, if not overridden by a \fBlabel\fR declaration (in \fIspec\fR)\&. .TP string \fIdescription\fR Human-readable help text for the parameter\&. .TP script \fIspec\fR Tcl-script specifying the parameter in detail\&. Please read \fICmdr - Parameter Specification Language\fR for the details\&. .RE .PP .SH "INSTANCE API" Most of the instance API is not public\&. .PP It is described here for use by developers maintaining, modifying and extending the framework itself\&. A user of the framework 

Changes to embedded/man/files/cmdr_private.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_private" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_private \- Cmdr - Single command handling, options, and arguments .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::private\fR \fBnew\fR \fIsuper\fR \fIname\fR \fIarguments\fR \fIaction\fR .sp \fB::cmdr::private\fR \fBcreate\fR \fIobj\fR \fIsuper\fR \fIname\fR \fIarguments\fR \fIaction\fR .sp \fB\fR \fBcomplete-words\fR \fIparse\fR .sp ................................................................................ The instance command of the actor (officer actually) which contains the new private\&. .TP string \fIname\fR The user-visible name of the command\&. .TP script \fIarguments\fR The specification of the private's parameters\&. Please read \fICmdr - Specification Language\fR (section "Privates") for the details\&. .TP cmd-prefix \fIaction\fR The command prefix to invoke when this private is selected for execution\&. It takes a single argument, the instance command of the hidden \fBcmdr::config\fR container holding the private's parameters\&. The result of the action, if there is any, is ignored by the framework\&.   | | | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::private" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::private \- Cmdr - Single command handling, options, and arguments .SH SYNOPSIS package require \fBcmdr::private \fR .sp \fB::cmdr::private\fR \fBnew\fR \fIsuper\fR \fIname\fR \fIarguments\fR \fIaction\fR .sp \fB::cmdr::private\fR \fBcreate\fR \fIobj\fR \fIsuper\fR \fIname\fR \fIarguments\fR \fIaction\fR .sp \fB\fR \fBcomplete-words\fR \fIparse\fR .sp ................................................................................ The instance command of the actor (officer actually) which contains the new private\&. .TP string \fIname\fR The user-visible name of the command\&. .TP script \fIarguments\fR The specification of the private's parameters\&. Please read \fICmdr - Private Specification Language\fR for the details\&. .TP cmd-prefix \fIaction\fR The command prefix to invoke when this private is selected for execution\&. It takes a single argument, the instance command of the hidden \fBcmdr::config\fR container holding the private's parameters\&. The result of the action, if there is any, is ignored by the framework\&. 

Changes to embedded/man/files/cmdr_util.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_util" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_util \- Cmdr - General Utilities - Internal .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::util\fR \fBpadr\fR \fIlist\fR .sp .BE .SH DESCRIPTION   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::util" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::util \- Cmdr - General Utilities - Internal .SH SYNOPSIS package require \fBcmdr::util \fR .sp \fB::cmdr::util\fR \fBpadr\fR \fIlist\fR .sp .BE .SH DESCRIPTION 

Changes to embedded/man/files/cmdr_validate.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_validate" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_validate \- Cmdr - Standard validation types for parameters .SH SYNOPSIS package require \fBcmdr::validate \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&.   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::validate" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::validate \- Cmdr - Standard validation types for parameters .SH SYNOPSIS package require \fBcmdr::validate \fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. 

Changes to embedded/man/files/cmdr_vcommon.n.

 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr_validate_common" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_validate_common \- Cmdr - Utilities for Validation Types .SH SYNOPSIS package require \fBcmdr::validate::common \fR .sp \fB::cmdr::validate::common\fR \fBfail\fR \fIp\fR \fIcode\fR \fItype\fR \fIx\fR .sp \fB::cmdr::validate::common\fR \fBcomplete-enum\fR \fIchoices\fR \fInocase\fR \fIbuffer\fR .sp   | |  235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH "cmdr::validate::common" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr::validate::common \- Cmdr - Utilities for Validation Types .SH SYNOPSIS package require \fBcmdr::validate::common \fR .sp \fB::cmdr::validate::common\fR \fBfail\fR \fIp\fR \fIcode\fR \fItype\fR \fIx\fR .sp \fB::cmdr::validate::common\fR \fBcomplete-enum\fR \fIchoices\fR \fInocase\fR \fIbuffer\fR .sp 

Changes to embedded/man/files/cmdr_vtypes.n.

 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 ... 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 ... 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 ... 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 ... 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405  .TH "cmdr_vtypes" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_vtypes \- Cmdr - Writing custom validation types .SH SYNOPSIS package require \fBcmdr::validate \fR .sp \fBcmd\fR \fBcomplete\fR \fIp\fR \fIx\fR .sp \fBcmd\fR \fBdefault\fR \fIp\fR .sp \fBcmd\fR \fBrelease\fR \fIp\fR \fIx\fR .sp \fBcmd\fR \fBvalidate\fR \fIp\fR \fIx\fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document describes the API expected of validation types to make them usable within the Cmdr framework, and how to write a custom validation type\&. .PP Readers interested in the standard validation types of the framework should read \fICmdr - Standard validation types for parameters\fR\&. .SH BACKGROUND Validation types are Cmdr's answer to the necessity of moving between the string and internal representations of \fBcmdr::parameter\fR instances\&. ................................................................................ Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not\&. This choice is made per the six rules below and always returns one of the builtins described in \fICmdr - Standard validation types for parameters\fR\&. .IP [1] Use \fBidentity\fR if a \fBgenerate\fR callback is specified\&. .IP [2] Use \fBboolean\fR if no \fBdefault\fR is specified and the parameter is an option\&. .IP [3] Use \fBidentity\fR if no \fBdefault\fR is specified and the parameter is an input\&. .IP [4] Use \fBboolean\fR if the specified \fBdefault\fR value is a Tcl boolean\&. .IP [5] Use \fBinteger\fR if the specified \fBdefault\fR value is a Tcl integer\&. .IP [6] Use \fBidentity\fR as fallback of last resort\&. .PP .PP The general concept of validation types was taken from package \fBsnit\fR, and modified to suit Cmdr\&. Where snit's types expect only a single method to validate the input we expect all types to support an ensemble of \fIfour\fR methods\&. One for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion\&. The details (method names, signatures, etc\&.) can be found in section \fBAPI\fR below\&. .PP As an example the implementation of the standard boolean validation type is shown in section \fBExample\fR\&. .PP It should be noted that while snit's validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use\&. .PP The \fBvalidate\fR and \fBrelease\fR methods are primarily used during either completion or execution phases, depending on the chosen deferal state\&. They may also be used during parsing, for optional inputs under the \fBtest\fR-regime]\&. .PP The \fBcomplete\fR method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters\&. .PP The \fBdefault\fR method on the other hand can expect to be invoked during dispatch, as part of the system's declaration processing, if not preempted by \fBdefault\fR and \fBgenerate\fR declarations for the parameter\&. Note here that the \fBdefault\fR method has the same signature as a \fBgenerate\fR callback and can be used as such\&. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early\&. We can still use the validation type for its generation, by hooking it explicitly into \fBgenerate\fR to change the timing of its invokation\&. .SH API In the descriptions below the \fBcmd\fR is a placeholder for the actual command prefix, most often a main command, of the validation type\&. .TP \fBcmd\fR \fBcomplete\fR \fIp\fR \fIx\fR This method is invoked during command completion done by the framework\&. .sp It has to return the list of legal string representations for the type and parameter instance \fIp\fR which have the incomplete word \fIx\fR as their prefix\&. .RS .TP ................................................................................ process\&. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion\&. .TP string \fIx\fR The string value to complete\&. .RE .TP \fBcmd\fR \fBdefault\fR \fIp\fR This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation\&. .sp It has to return the default internal representation for the type and parameter instance \fIp\fR\&. .RS ................................................................................ do not make use of it a custom type may have need for access to the context\&. .TP string \fIx\fR The string value to complete\&. .RE .TP \fBcmd\fR \fBrelease\fR \fIp\fR \fIx\fR This method is invoked when the framework has to get rid of an internal representation for a parameter\&. .sp It has to release any resources associated with the internal representation \fIx\fR of parameter instance \fIp\fR\&. .sp Note that the result of this method, if there is any, is ................................................................................ make use of it a custom type may have need for access to the context of the completion\&. .TP string \fIx\fR The internal representation to release\&. .RE .TP \fBcmd\fR \fBvalidate\fR \fIp\fR \fIx\fR This method is invoked during to validate and convert a string representation\&. .sp It has to verify that \fIx\fR is a legal string representation for the parameter instance \fIp\fR, and return the associated internal representation\&. .RS   | | | | | | | | | | | | | > | | | > | | | > | | | | | > | | | | > | | < | | | | |  242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 ... 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 ... 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 ... 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 ... 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409  .TH "cmdr_vtypes" n 0 doc "Cmdr, a framework for command line parsing and dispatch" .BS .SH NAME cmdr_vtypes \- Cmdr - Writing custom validation types .SH SYNOPSIS package require \fBcmdr::validate \fR .sp \fB\fR \fBcomplete\fR \fIp\fR \fIx\fR .sp \fB\fR \fBdefault\fR \fIp\fR .sp \fB\fR \fBrelease\fR \fIp\fR \fIx\fR .sp \fB\fR \fBvalidate\fR \fIp\fR \fIx\fR .sp .BE .SH DESCRIPTION .PP Welcome to the Cmdr project, written by Andreas Kupries\&. .PP For availability please read \fICmdr - How To Get The Sources\fR\&. .PP This document describes the API expected of \fIvalidation types\fR to make them usable within the Cmdr framework, and how to write a custom validation type\&. .PP Readers interested in the standard validation types of the framework should read \fICmdr - Standard validation types for parameters\fR\&. .SH BACKGROUND Validation types are Cmdr's answer to the necessity of moving between the string and internal representations of \fBcmdr::parameter\fR instances\&. ................................................................................ Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not\&. This choice is made per the six rules below and always returns one of the builtins described in \fICmdr - Standard validation types for parameters\fR\&. .IP [1] Use \fBidentity\fR if a \fBgenerate\fR callback is specified\&. .IP [2] Use \fBboolean\fR if no \fBdefault\fR is specified and the parameter is an \fIoption\fR\&. .IP [3] Use \fBidentity\fR if no \fBdefault\fR is specified and the parameter is an \fIinput\fR\&. .IP [4] Use \fBboolean\fR if the specified \fBdefault\fR value is a Tcl boolean\&. .IP [5] Use \fBinteger\fR if the specified \fBdefault\fR value is a Tcl integer\&. .IP [6] Use \fBidentity\fR as fallback of last resort\&. .PP .PP The general concept of \fIvalidation types\fR was taken from package \fBsnit\fR, and modified to suit Cmdr\&. Where \fBsnit\fR's types expect only a single method to validate the input we expect all types to support an ensemble of \fIfour\fR methods\&. One for the basic validation and transformation of the string, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion\&. The details (method names, signatures, etc\&.) can be found in section \fBAPI\fR below\&. .PP As an example the implementation of the standard boolean validation type is shown in section \fBExample\fR\&. .PP It should be noted that while \fBsnit\fR's validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use\&. .PP The \fBvalidate\fR and \fBrelease\fR methods are primarily used during either \fICompletion\fR or \fIExecution\fR phases, depending on the chosen deferal state\&. They may also be used during the \fIParsing\fR phase, for optional \fIinputs\fR under the \fBtest\fR-regime]\&. .PP The \fBcomplete\fR method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters\&. .PP The \fBdefault\fR method on the other hand can expect to be invoked during the \fIDispatch\fR phase, as part of the system's declaration processing, if not preempted by \fBdefault\fR and \fBgenerate\fR declarations for the parameter\&. Note here that the \fBdefault\fR method has the same signature as a paramete's \fBgenerate\fR callback and can be used as such\&. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early\&. We can still use the validation type for its generation, by hooking it explicitly into \fBgenerate\fR to change the timing of its invokation\&. .SH API In the descriptions below the \fB\fR is a placeholder for the actual command prefix, most often a main command, of the validation type\&. .TP \fB\fR \fBcomplete\fR \fIp\fR \fIx\fR This method is invoked during command completion done by the framework\&. .sp It has to return the list of legal string representations for the type and parameter instance \fIp\fR which have the incomplete word \fIx\fR as their prefix\&. .RS .TP ................................................................................ process\&. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion\&. .TP string \fIx\fR The string value to complete\&. .RE .TP \fB\fR \fBdefault\fR \fIp\fR This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation\&. .sp It has to return the default internal representation for the type and parameter instance \fIp\fR\&. .RS ................................................................................ do not make use of it a custom type may have need for access to the context\&. .TP string \fIx\fR The string value to complete\&. .RE .TP \fB\fR \fBrelease\fR \fIp\fR \fIx\fR This method is invoked when the framework has to get rid of an internal representation for a parameter\&. .sp It has to release any resources associated with the internal representation \fIx\fR of parameter instance \fIp\fR\&. .sp Note that the result of this method, if there is any, is ................................................................................ make use of it a custom type may have need for access to the context of the completion\&. .TP string \fIx\fR The internal representation to release\&. .RE .TP \fB\fR \fBvalidate\fR \fIp\fR \fIx\fR This method is invoked during to validate and convert a string representation\&. .sp It has to verify that \fIx\fR is a legal string representation for the parameter instance \fIp\fR, and return the associated internal representation\&. .RS 

Changes to embedded/man/index.n.

 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125  arguments .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command hierarchy .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command line completion .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command line handling .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command tree .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE editing command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE help for command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE hierarchy of commands .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE interactive command shell .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE optional arguments .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE options .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE parameters .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE processing command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE tree of commands .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr_actor .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_config\&.n\fR cmdr_config .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_help\&.n\fR cmdr_help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr_help_json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr_help_sql .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_officer\&.n\fR cmdr_officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr_parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr_private .TP \fBfiles/cmdr_util\&.n\fR cmdr_util .TP \fBfiles/cmdr_validate\&.n\fR cmdr_validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr_validate_common .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE   > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | < < < < < < < < < < < < < < < < < < | | | > > > | > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | < < < < < < < < < < < < < < < < < < | | | > > > | > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | < < < < < < < < < < < < < < < < < < | | < < < < < < < < < | | < > < > < < < < < < < < < < < < | | | | | | < < < < < < < < < < < < < < < | | | < > | < > < < < < < < < < < < < < < < < < < < | | < < < < < < < < < | | < > < > < < < < < < < < < < < < | | | | | | < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | > > > | > > > > > > > > > > > > > > > > > > > > > > > > | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <  244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251  arguments .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command hierarchy .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command line completion .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command line handling .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE command tree .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE editing command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE help for command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE hierarchy of commands .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE interactive command shell .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE optional arguments .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE options .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE parameters .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE processing command line .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE tree of commands .RS .TP \fBfiles/cmdr\&.n\fR cmdr .TP \fBfiles/cmdr_actor\&.n\fR cmdr::actor .TP \fBfiles/cmdr_config\&.n\fR cmdr::config .TP \fBfiles/cmdr_help\&.n\fR cmdr::help .TP \fBfiles/cmdr_help_json\&.n\fR cmdr::help::json .TP \fBfiles/cmdr_help_sql\&.n\fR cmdr::help::sql .TP \fBfiles/cmdr_officer\&.n\fR cmdr::officer .TP \fBfiles/cmdr_parameter\&.n\fR cmdr::parameter .TP \fBfiles/cmdr_private\&.n\fR cmdr::private .TP \fBfiles/cmdr_util\&.n\fR cmdr::util .TP \fBfiles/cmdr_validate\&.n\fR cmdr::validate .TP \fBfiles/cmdr_vcommon\&.n\fR cmdr::validate::common .TP \fBfiles/cmdr_changes\&.n\fR cmdr_changes .TP \fBfiles/cmdr_howto_development\&.n\fR cmdr_development .TP \fBfiles/cmdr_dsl\&.n\fR cmdr_dsl .TP \fBfiles/cmdr_dsl_officer\&.n\fR cmdr_dsl_officer .TP \fBfiles/cmdr_dsl_parameter\&.n\fR cmdr_dsl_parameter .TP \fBfiles/cmdr_dsl_private\&.n\fR cmdr_dsl_private .TP \fBfiles/cmdr_howto_get_sources\&.n\fR cmdr_howto_get_sources .TP \fBfiles/cmdr_howto_installation\&.n\fR cmdr_installation .TP \fBfiles/cmdr_introduction\&.n\fR cmdr_introduction .TP \fBfiles/cmdr_license\&.n\fR cmdr_license .TP \fBfiles/cmdr_vtypes\&.n\fR cmdr_vtypes .RE 

Changes to embedded/man/toc.n.

 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303  .SH CONTENTS doc .RS .TP \fBcmdr\fR \fIfiles/cmdr\&.n\fR: Cmdr - Main package and API .TP \fBcmdr_actor\fR \fIfiles/cmdr_actor\&.n\fR: Cmdr - Base class for officers and privates - Internal .TP \fBcmdr_changes\fR \fIfiles/cmdr_changes\&.n\fR: Cmdr - Log of Changes .TP \fBcmdr_config\fR \fIfiles/cmdr_config\&.n\fR: Cmdr - Collection of parameters for privates .TP \fBcmdr_development\fR \fIfiles/cmdr_howto_development\&.n\fR: Cmdr - The Developer's Guide .TP \fBcmdr_dsl\fR \fIfiles/cmdr_dsl\&.n\fR: Cmdr - Specification Language .TP \fBcmdr_help\fR \fIfiles/cmdr_help\&.n\fR: Cmdr - Utilities for help text formatting and setup - Internal .TP \fBcmdr_help_json\fR \fIfiles/cmdr_help_json\&.n\fR: Cmdr - Formatting help as JSON object .TP \fBcmdr_help_sql\fR \fIfiles/cmdr_help_sql\&.n\fR: Cmdr - Formatting help as series of SQL commands .TP \fBcmdr_howto_get_sources\fR \fIfiles/cmdr_howto_get_sources\&.n\fR: Cmdr - How To Get The Sources .TP \fBcmdr_installation\fR \fIfiles/cmdr_howto_installation\&.n\fR: Cmdr - The Installer's Guide .TP \fBcmdr_introduction\fR \fIfiles/cmdr_introduction\&.n\fR: Cmdr - Introduction to the project .TP \fBcmdr_license\fR \fIfiles/cmdr_license\&.n\fR: Cmdr - License .TP \fBcmdr_officer\fR \fIfiles/cmdr_officer\&.n\fR: Cmdr - Aggregation of multiple commands for dispatch\&. .TP \fBcmdr_parameter\fR \fIfiles/cmdr_parameter\&.n\fR: Cmdr - Command parameters .TP \fBcmdr_private\fR \fIfiles/cmdr_private\&.n\fR: Cmdr - Single command handling, options, and arguments .TP \fBcmdr_util\fR \fIfiles/cmdr_util\&.n\fR: Cmdr - General Utilities - Internal .TP \fBcmdr_validate\fR \fIfiles/cmdr_validate\&.n\fR: Cmdr - Standard validation types for parameters .TP \fBcmdr_validate_common\fR \fIfiles/cmdr_vcommon\&.n\fR: Cmdr - Utilities for Validation Types .TP \fBcmdr_vtypes\fR \fIfiles/cmdr_vtypes\&.n\fR: Cmdr - Writing custom validation types   | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | < < < < < < < < < < < < < < < < < <  241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312  .SH CONTENTS doc .RS .TP \fBcmdr\fR \fIfiles/cmdr\&.n\fR: Cmdr - Main package and API .TP \fBcmdr::actor\fR \fIfiles/cmdr_actor\&.n\fR: Cmdr - Base class for officers and privates - Internal .TP \fBcmdr::config\fR \fIfiles/cmdr_config\&.n\fR: Cmdr - Collection of parameters for privates .TP \fBcmdr::help\fR \fIfiles/cmdr_help\&.n\fR: Cmdr - Utilities for help text formatting and setup - Internal .TP \fBcmdr::help::json\fR \fIfiles/cmdr_help_json\&.n\fR: Cmdr - Formatting help as JSON object .TP \fBcmdr::help::sql\fR \fIfiles/cmdr_help_sql\&.n\fR: Cmdr - Formatting help as series of SQL commands .TP \fBcmdr::officer\fR \fIfiles/cmdr_officer\&.n\fR: Cmdr - Aggregation of multiple commands for dispatch\&. .TP \fBcmdr::parameter\fR \fIfiles/cmdr_parameter\&.n\fR: Cmdr - Command parameters .TP \fBcmdr::private\fR \fIfiles/cmdr_private\&.n\fR: Cmdr - Single command handling, options, and arguments .TP \fBcmdr::util\fR \fIfiles/cmdr_util\&.n\fR: Cmdr - General Utilities - Internal .TP \fBcmdr::validate\fR \fIfiles/cmdr_validate\&.n\fR: Cmdr - Standard validation types for parameters .TP \fBcmdr::validate::common\fR \fIfiles/cmdr_vcommon\&.n\fR: Cmdr - Utilities for Validation Types .TP \fBcmdr_changes\fR \fIfiles/cmdr_changes\&.n\fR: Cmdr - Log of Changes .TP \fBcmdr_development\fR \fIfiles/cmdr_howto_development\&.n\fR: Cmdr - The Developer's Guide .TP \fBcmdr_dsl\fR \fIfiles/cmdr_dsl\&.n\fR: Cmdr - Introduction to the Specification Language .TP \fBcmdr_dsl_officer\fR \fIfiles/cmdr_dsl_officer\&.n\fR: Cmdr - Officer Specification Language .TP \fBcmdr_dsl_parameter\fR \fIfiles/cmdr_dsl_parameter\&.n\fR: Cmdr - Parameter Specification Language .TP \fBcmdr_dsl_private\fR \fIfiles/cmdr_dsl_private\&.n\fR: Cmdr - Private Specification Language .TP \fBcmdr_howto_get_sources\fR \fIfiles/cmdr_howto_get_sources\&.n\fR: Cmdr - How To Get The Sources .TP \fBcmdr_installation\fR \fIfiles/cmdr_howto_installation\&.n\fR: Cmdr - The Installer's Guide .TP \fBcmdr_introduction\fR \fIfiles/cmdr_introduction\&.n\fR: Cmdr - Introduction to the project .TP \fBcmdr_license\fR \fIfiles/cmdr_license\&.n\fR: Cmdr - License .TP \fBcmdr_vtypes\fR \fIfiles/cmdr_vtypes\&.n\fR: Cmdr - Writing custom validation types 

Changes to embedded/www/doc/files/cmdr.html.

 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169  
• Keywords
• Synopsis

• package require cmdr::util
................................................................................

The result of the command is the new instance command.

string name

The user-visible name of the command (hierarchy).

script actions

The specification of the subordinate commands. On the command line these are the toplevel commands of the application using the hierarchy. Please read Cmdr - Specification Language, (section "Officers") for the details.

::cmdr interactive ?enable?

This command globally (de)activates the interactive parts of the framework, as per the value of enable.

By default (initial state) the framework allows interaction.

boolean enable
  | | |  119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169  
• Keywords
• Synopsis

• package require cmdr
................................................................................

The result of the command is the new instance command.

string name

The user-visible name of the command (hierarchy).

script actions

The specification of the subordinate commands. On the command line these are the toplevel commands of the application using the hierarchy. Please read Cmdr - Officer Specification Language for the details.

::cmdr interactive ?enable?

This command globally (de)activates the interactive parts of the framework, as per the value of enable.

By default (initial state) the framework allows interaction.

boolean enable


Changes to embedded/www/doc/files/cmdr_actor.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 ... 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350   cmdr_actor - Cmdr, a framework for command line parsing and dispatch

cmdr_actor(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_actor - Cmdr - Base class for officers and privates - Internal

Synopsis

• package require cmdr::util

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This internal package implements the base class containing functionality common to cmdr::officer and cmdr::private. --TODO-- Describe the common parts (common blocks, super chain, completion support, DSL support)

Class API

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, ................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.

  | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 ... 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350   cmdr::actor - Cmdr, a framework for command line parsing and dispatch

cmdr::actor(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::actor - Cmdr - Base class for officers and privates - Internal

Synopsis

• package require cmdr::actor

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This internal package implements the base class containing functionality common to cmdr::officer and cmdr::private. --TODO-- Describe the common parts (common blocks, super chain, completion support, DSL support)

Class API

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, ................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.



Changes to embedded/www/doc/files/cmdr_config.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 ... 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486   cmdr_config - Cmdr, a framework for command line parsing and dispatch

cmdr_config(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_config - Cmdr - Collection of parameters for privates

Synopsis

• package require cmdr::util

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements the collections of cmdr::parameters serving as the configuration of privates (see cmdr::private).

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary configuration instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

Not used.

::cmdr::config create obj context spec

Create a new instance of cmdr::config, named obj.

string obj

The (command) name of the new config instance.

cmdr::config context

The instance command of the cmdr::private instance the configuration will belong to.

script spec

Tcl-script specifying the parameters in detail. Please read Cmdr - Specification Language (section "Parameters") for the details.

::cmdr::config interactive ?enable?

Class method to change the global interaction default for the mini-shell of privates. The default is to disable this mini-shell for all privates, and enable it on a per-private basis, through the specification.

................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.

  | | | | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 ... 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486   cmdr::config - Cmdr, a framework for command line parsing and dispatch

cmdr::config(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::config - Cmdr - Collection of parameters for privates

Synopsis

• package require cmdr::config

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements the collections of cmdr::parameters serving as the configuration of privates (see cmdr::private).

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary configuration instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

Not used.

::cmdr::config create obj context spec

Create a new instance of cmdr::config, named obj.

string obj

The (command) name of the new config instance.

cmdr::config context

The instance command of the cmdr::private instance the configuration will belong to.

script spec

Tcl-script specifying the parameters in detail. Please read Cmdr - Parameter Specification Language for the details.

::cmdr::config interactive ?enable?

Class method to change the global interaction default for the mini-shell of privates. The default is to disable this mini-shell for all privates, and enable it on a per-private basis, through the specification.

................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.



Changes to embedded/www/doc/files/cmdr_dsl.html.

 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 ... 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 ... 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734   Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

cmdr_dsl(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_dsl - Cmdr - Specification Language

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document is for users of the cmdr framework. It describes the domain-specific language for the specification of command hierarchies with commands and their parameters (options, and inputs).

Introductory examples

Instead of immediately diving into the full syntax of the specification language first a few examples to demonstrate the general look and feel, plus basic features.

Basic setup, private with inputs

This example specifies a command line providing 3 commands for the management of command aliases. This is actually a slice of stackato's interface, reduced and modified to fit here. While it does not have the necessary backend procedures required to actually run the commands, it is enough to demonstrate basic features, namely the declaration of "privates" with "input" parameters.

................................................................................ exit

At the bottom of the example, just above we can also see the very simple Tcl command which invokes the command line processing for a list of words, here coming from $argv, i.e. the application's command line. Basic setup, command nesting The decoupling of command names from their implementations seen in the previous example makes it easy to re-arrange and re-label the user visible commands without having to touch any other part of the code. This is demonstrated in the example below, moving the 3 "privates" into an "officer" and renaming them, without changing the actions. Note that the parameter specifications were removed for ................................................................................ } ::foo::backend::alias::list } } ... Language Reference With the examples behind us we can now go and specify the entire specification language. If you have skipped here on first reading, ignoring the examples, please go back and read them first. General The conceptual model underneath the command hierarchy is that of a tree. The inner nodes of the tree represent command ensembles, here called "officer"s. Each officer knows one or more commands, and delegates actual execution to their respective specification, which may be another officer, or a private. The leaf nodes of the tree represent the individual commands, here called "private"s. Each private is responsible for a single action, and knows how to perform it and the parameters used to configure that action at runtime. The same model is graphically presented in the Entity-Relationship-Diagram below. The "Actor" in that diagram is the common base class for the ensembles and commands and not directly relevant to users. The "Config" on the other hand is the second interface seen by the user, as the sole argument to the action command prefix of private (See section Officer). This container holds all the declared parameters of the command the action is invoked for, and provides easy access to them through its methods (see package cmdr::config) at the time of execution. Officers alias <name> = <name'>... Declare an alternate name for a command path. alias <name> Declare an alternate name for the previous command. common <name> <script> Declare a named shared code block. default Set last command as default. description <text> Set help text for the current ensemble. ehandler <cmdprefix> Execution Interposition. officer <name> <script> Declare a nested ensemble = sub-officer private <name> <script> <cmdprefix> Declare a simple command = private undocumented Hide ensemble from help. alias name = name'... alias name This is a structuring command, for the command hierarchy. Its main uses are the creation of alternate command names, and of shortcuts through the command hierarchy. For example, stackato's command specification for alias management is more like Basic setup, command nesting and uses shortcuts similar to what is shown in --TODO--(example ls-alias2)-- to provide the look of a flat namespace. In the first form the name is given the explicit path to the command it is an alias for. In the second form it implicitly refers to the immediately preceding officer or private. Note that "immediately" is interpreted at the current level. The system is not looking into a nested specification for its last command. common name text This is another structuring command, for structuring the specification itself instead of the command tree it declares. It creates named values, usually code blocks, which can be shared between specifications. Note that while each block is visible in the current officer and its subordinates, parents and siblings have no access. An example of such a block would be common *all* { option debug { Activate client internal tracing. } { undocumented list when-complete [lambda {p tags} { foreach t$tags { debug on $t } }] } } This example defines an option to access the subsystem for debug narative (See package Tcllib). The example is actually special, as the block named *all* is reserved by the framework. This block, if defined, is automatically included at the front of all "private" specifications, i.e. shared across all the specified commands underneath this officer. A very important trait for the option in the example, as it makes the debug setup available to all commands without having to explicitly include the block, and possibly forgetting such. Generally speaking, the framework reserves all blocks whose name begins with a star, i.e *, for its own use. default This command sets up a special kind of alias. The last "private" or "officer" is set as the default command to use at runtime. This means that if during "Dispatch" the currently processed word does not match any of the commands known to this officer this default is used. If no default is specified an error will be thrown instead. description text This command declares the help text of the officer. ehandler cmdprefix This is an advanced command which should normally only be specified at the top of the whole hierarchy (from which its value will automatically propagate to all subordinates). At runtime the framework will call the specified command prefix with a single argument, a script whose execution is equivalent to the phases "Parsing", "Completion", and "Execution" of the framework, as described in section --TODO--(sectref:flow/phases)--. The handler must call this script, and can perform any application-specific actions before and after. This handler's main uses are two-fold: 1. Capture and hande application-specific errors which should not abort the application, or shown as Tcl stacktrace. 2. Cleanup of application-specific transient settings the parameter callbacks and/or command implementations may have set during their execution. This is especially important if the interactive command line shells of the framework are active. Without such a handler and its bespoke cleanup code transient settings will leak between multiple commands run from such a shell, something which is definitely not wanted. officer name script This command creates a named subordinate officer with its specification script of officer commands as described here. private name script cmdprefix This command creates a named subordinate private with its specification script of private commands as described in the following section, and a command prefix to invoke when it is chosen. This command prefix is called with a single argument, the cmdr::config instance holding the parameters of the private. --TODO--(ref:backend-example-code)-- undocumented Use of this command influences the generation of help, excluding all officers having this marker (and their subordinates) from the help. Note that subordinates reachable through aliases may be included, under the alias name, if not explicitly excluded themselves. Privates The specification of simple commands, i.e. "privates" is quite easy, with only seven commands (see the table below). The important parts are found in the parameter specifications, explained in the next section. description <text> Set help text for command. input <name> <help> <script> Declare a positional parameter. interactive Allow interactive shell. option <name> <help> <script> Declare a named parameter. state <name> <help> <script> Declare a hidden parameter. undocumented Hide command from help. use <name> Execute the named "common" block here. description text Like the equivalent command for Officers this command declares the help text for the private. input name help script This command adds an "input" (positional) parameter to the "private", with description help and its specification script of parameter commands as described in the following section. interactive This command influences the runtime. By default the only interactive command line shells are associated with the officers. Setting this marker activates such a shell for the private, to be invoked when required parameters do not have a value. The global command cmdr::config interactive in package cmdr::config can be used to globally activate this type of shell for all "privates". option name help script This command adds an "option" (named) parameter to the "private", with description help and its specification script of parameter commands as described in the following section. state name help script This command adds a "state" (hidden) parameter to the "private", with description help and its specification script of parameter commands as described in the following section. undocumented Like the equivalent command for Officers use of this command influences the generation of help, excluding all privates having this marker from it. use name This command is the counterpart to common of Officers. It inserts the named block into the specification, executing it. As such it expects the contents to be a script of private commands as described in this section. Parameters The parameters of private commands are the heart of the system, providing the space needed to transfer the command arguments to the implementations, and having the most attributes controlling their behaviour. This complexity is mitigated strongly by the use of sensible defaults for each of the three possible kinds of parameter, i.e. positional "inputs", named "options", and "state" hidden from the command line. Each kind has its own construction command in the DSL for Privates which specifies the common information which cannot have defaults, i.e. 1. the name identifying it to the system, 2. the help text describing it in informal speech, and, of course, 3. the parameter specification itself, using the commands of this section. alias <name> N Declare alternate flag for an option. default <value> R Set constant default value. defered R Defer calculation of the internal representation until demanded. generate <cmdprefix> R Set callback returning the default value. immediate R Complement of defered. interact ?<prompt>? R Enable the interactive entry of the string value. label <text> N Name to use in the help, and as primary flag (for an option). list R Declare as list-valued. optional G Declare input as optional. presence V Declare as boolean option without argument. test G Control the matching of words to optional inputs. undocumented G Declare as hidden from help. validate <cmdprefix> V Declare validation type. when-complete <cmdprefix> C Set callback executed when the value becomes known. when-set <cmdprefix> C Set callback executed when the string value becomes known. Naming We have two commands to influence the visible naming of all parameters. As background, all parameters are named for proper identification within the framework and other Tcl code, i.e. the various callbacks, including a "private"s action. This "system name" has to be unique within the "private" a parameter belongs to. Beyond that however the visible parameters have to be identified within help texts, and, in case of "options", for detection during "Parsing". That is the visible naming, seen by a user of any application whose command line processing is based on the Cmdr framework. label text This command declares the visible name, if different from the system name used as the default. Note that in most cases this default is good enough, obviating the need for this command. The only use case seen so far is when two semantically equivalent input and option parameters clash, requiring different internal names due to the requirement for uniqueness, yet also the same visible name and flag within the help to highlight their connection and equivalence. alias name For option parameters the "label" command and its default specifies the name of the primary flag recognized during parsing. If that is not enough for a specific option this command allows the specification of any number additional flags to be recognized. Note however that the framework automatically recognizes not only the specified flags, but also all unique prefixes, obviating the need for this command in many cases. General control The general handling of a parameter is influenced by three commands. optional This command marks the parameter as optional, i.e. as something the user may skip on the command line, and the application supplying sensible defaults. --TODO--(sectref:para/vtype)-- During parsing the framework will then expend some effort to determine whether an argument word should be assigned to the parameter, or not. This setting is only applicable to "inputs", as "options" are optional by definition, and "state" is hidden. test This command is related to the above, switching from the standard regime for acceptance based on counting and thresholds to a different one based on validation. The details are explained in section --TODO--(sectref:flow/parsing, flow/optional)--. undocumented Like "officers" and "privates" parameters can be hidden from the generated help. This is the command for doing so, the same as for the first two. The main use case is the hiding of options giving an application developer access to the internals of their application, something a regular user has no need of, and doesn't have to know about. Representations An important concept of parameters is something taken up from Tcl itself. The differentation between string and internal representations. Where Tcl uses internal representations to speed up its execution here this separation is that of between the information delivered to the application by a user, and the application-specific data structures behind them. All parameters will have an internal representation. This is usually derived from the string representation provided by the user. The details of that process are explained in section --TODO--(sectref:para/vtype)-- about validation types. However we have cases where the user cannot specify a string representation ("states"), or is allowed to choose not to (optional "inputs", "options"). For these cases three specification commands are made available enabling us to programmatically choose the internal representation. default value This command provides a constant value for the internal representation. generate cmdprefix This command provides a callback to compute the internal representation at runtime. This is useful if the default is something which cannot be captured as a fixed value, for example a handle to some resource, or a dynamically created object. The command prefix is invoked with a single argument, the cmdr::parameter instance for which to generate the internal representation. The commands "default" and "generate" exclude each other, i.e. only of them can be specified. If neither are specified, and we need a default (see the cases above) a default is chosen per the two rules below: 1. Use the empty string for a "list" parameter. 2. Use the default value supplied by the chosen validation type (See section --TODO--(sectref:para/vtype)--). interact ?prompt? This command actually does not specify an internal representation, but activates another method for the user to specify a string value for the parameter, outside of the command line. As such it has priority over either "default" and "generate," and can be specified with either. A parameter marked with it will interactively ask the user for a value if none was specified on the command line. The default prompt is derived from the system name. To recapitulate: 1. A string representation specified on the command line has the highest priority and goes through the chosen validation type to get the associated internal representation. 2. If activated via "interact" a small shell is run asking the user for a value (or more, as per "list", see below). The result goes through the chosen validation type to get the associated internal representation. 3. After that the internal representation is either the declared "default," or the result of invoking the "generate" callback. As internal representations they are not run through the chosen validation type. list This command is used to mark parameters whose string and thus internal value should be treated as a list. By default all parameters are scalar. This affects the handling of the parameter during parsing, by "interact" above, and the use of the validation type. The last two ask for multiple values, and feed the elements of the string value separately through validation instead of just the string value in one. During parsing treatment of "options" changes from keeping only the last assigned value to accumulation of all values. Similarly a list-"input" takes all remaining words on the command line for itself instead of just the current word. Because of this list-"inputs" are only allowed as the last parameter of a "private." The last two specification commands dealing with the representations control when the internal representation is created. defered This command marks a parameter as defered, with the internal representation computed on first access to its value. This is the default for "state" parameters. immediate This command marks a parameter as immediate, with the internal representation computed in the "Completion" phase. This is the default for "input" and "option" parameters. Validation The answer to the necessity of moving between the string and internal representations described in the previous section are the validation types. Given a string representation they either return the associated internal representation or raise an error, signaling that the input was illegal. This part of their work, the verification of the legality of the input string gave them their name. The general concept of validation types was taken from snit, and modified to suit Cmdr. Where snit's types expect only a single method to validate the input Cmdr expects all types to support an ensemble of four methods, one for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus delivery of a default representation and support for command line completion. validate cmdprefix This command specifies a validation type for the parameter, in the form of a command prefix. The set of methods this callback has to support, their signatures, etc. are all explained in Cmdr - Writing custom validation types. This document contains the implementation of the standard boolean validation type as an example as well. Because of the same necessity all parameters must have a validation type assigned to them, and the system will choose which, if the user did not. This choice is made per the six rules below and always returns one of the standard types implemented in package cmdr::validate. 1. Use "identity" if a "generate" callback is specified. 2. Use "boolean" if no "default" is specified and the parameter is an option. 3. Use "identity" if no "default" is specified and the parameter is an input. 4. Use "boolean" if the specified "default" value is a Tcl boolean. 5. Use "integer" if the specified "default" value is a Tcl integer. 6. Use "identity" as fallback of last resort. presence This command is best discussed as part of the wider area of "boolean" options, i.e. options with validation type "boolean" assigned to them. These have associated special behaviours, both in the handling of the specification, and during parsing. First, normal boolean options. They have automatic aliases declared for them, derived from their primary flag. An option named "foo" will have an alias of "no-foo", and the reverse. During parsing the "foo" and "no-foo" flags have inverse semantics, and both are allowed to occur without option argument following the flag. This is in contrast to all other options which must have such an argument. The parser essentially uses the validation type to decide if the word after the flag is a proper boolean value, or not, i.e. an argument to assign to the parameter, or not. Now "presence" declares a variant of the above, a boolean option without the automatic aliases, and never taking an argument during parsing. Its mere presence on the command line will set its parameter. Their default value is consequently fixed to false as well. Signaling Of the four callbacks supported by parameters the first two, "generate" and "validate" have been described already, in the sections --TODO--\ref{para/reps} about representations and --TODO--\ref{para/vtype} about validation types, respectively. This section explains the commonalities between the callbacks in general, and the last two, for notifications about state changes in detail. All callbacks are treated as command prefixes, not scripts. There are no placeholder substitutions, only arguments added to each command prefix on invokation. This does not harm the generality of the system, as complex scripts can be used via procedures or equivalents (i.e. apply). The two callbacks not yet described are the state-change callbacks through which the framework can actively drive parts of the application while processing the command line, whereas normally the application drives access to parameters through their methods. when-complete cmdprefix This command declares the state-change callback to invoke when the internal representation of the parameter is generated from the string representation, or the various ways of getting a default. The callback is invoked with two arguments, the cmdr::parameter instance of the parameter which changed, and its internal representation, in this order. when-set cmdprefix This command declares the state-change callback to invoke when the string representation of the parameter is set during command line parsing. The callback is invoked with two arguments, the cmdr::parameter instance of the parameter which changed, and its string representation, in this order. Due to their nature these callbacks are invoked at runtime during either parsing, completion," or execution. The details are shown in the table below. The specification commands influencing the timing, i.e. forcing the use in a specific phase are shown in the intersection of callback and phase. | Dispatch | Parsing | Completion | Execution --------------------+----------+---------+-------------+----------- validate (default) | * | | | --------------------+----------+---------+-------------+----------- validate (complete) | | * | immediate | defered when-set | | * | | --------------------+----------+---------+-------------+----------- generate | | | immediate | defered validate (validate) | | test | immediate | defered validate (release) | | test | immediate | defered --------------------+----------+---------+-------------+----------- when-complete | | | immediate | defered --------------------+----------+---------+-------------+----------- Bugs, Ideas, Feedback 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.   | | < < < < < | | | < < | | > | | > | > > > > > > > > | | | < | | | | | > | | | | | > | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | |  103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 ... 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 ... 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289   Home | Main Table Of Contents | Table Of Contents | Keyword Index ] cmdr_dsl(n) 0 doc "Cmdr, a framework for command line parsing and dispatch" Name cmdr_dsl - Cmdr - Introduction to the Specification Language Description Welcome to the Cmdr project, written by Andreas Kupries. For availability please read Cmdr - How To Get The Sources. This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of command hierarchies with commands and their parameters by way of examples and then provides links to the detailed reference documents. Introductory examples Instead of immediately diving into the full syntax of the specification language first a few examples to demonstrate the general look and feel, plus basic features. Basic private commands with inputs This example specifies a command line providing 3 commands for the management of command aliases. This is actually a slice of stackato's interface, reduced and modified to fit here. While it does not have the necessary backend procedures required to actually run the commands, it is enough to demonstrate basic features, namely the declaration of "privates" with "input" parameters. ................................................................................ exit At the bottom of the example, just above we can also see the very simple Tcl command which invokes the command line processing for a list of words, here coming from$argv, i.e. the application's command line.

Simple command nesting

The decoupling of command names from their implementations seen in the previous example makes it easy to re-arrange and re-label the user visible commands without having to touch any other part of the code.

This is demonstrated in the example below, moving the 3 "privates" into an "officer" and renaming them, without changing the actions. Note that the parameter specifications were removed for ................................................................................ } ::foo::backend::alias::list } } ...

Language Reference

With the examples behind us we can now go and specify the entire specification language. If you have skipped here on first reading, ignoring the examples, please go back and read them first.

The conceptual model underneath the command hierarchy is that of a tree.

The inner nodes of the tree represent command ensembles, here called officers. Each officer knows one or more commands to perform, and delegates actual execution to their respective specification, which may be another officer, or a private.

The leaf nodes of the tree represent the individual commands, here called privates. Each private is responsible for a single action and knows how to perform it, and the set of parameters used to configure that action at runtime.

The same model is graphically presented in the Entity-Relationship-Diagram below.

The actor in that diagram is the common base class for the ensembles and commands and not directly relevant to users.

The config on the other hand is the second interface seen by the user, as the sole argument to the action command prefix of private. See Cmdr - Officer Specification Language for the details. This container, an instance of cmdr::config, holds all the declared parameters of the command the action is invoked for, and provides easy access to them through its methods at the time of execution.

Bugs, Ideas, Feedback

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.



     > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296   cmdr_dsl_officer - Cmdr, a framework for command line parsing and dispatch

cmdr_dsl_officer(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_dsl_officer - Cmdr - Officer Specification Language

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of officers in detail.

Language Reference

alias name = name'...
alias name

This is a structuring command, for the command hierarchy. Its main uses are the creation of alternate command names, and of shortcuts through the command hierarchy.

For example, stackato's command specification for alias management is written using deep nesting and uses aliases to provide the look of a flat namespace to application users.

In the first form the name is given the explicit path to the actor the name is an alias for. In the second form the alias implicitly refers to the immediately preceding officer or private. Note that "immediately" is interpreted at the current level. The system is not looking into a nested specification for its last command.

string name

The name of the alias.

string name'...

The path to the actor, as list of names.

common name text

This is another structuring command, for structuring the specification itself instead of the command tree it declares.

It creates named values, usually code blocks, which can be shared between specifications. Note that while each block is visible in the current officer and its subordinates, parents and siblings have no access.

An example of such a block would be

common *all* {     option debug { 	Activate client internal tracing.     } { 	undocumented 	list 	when-complete [lambda {p tags} { 	    foreach t $tags { debug on$t } 	}]     } }

This example defines an option to access the subsystem for debug narative (See package Tcllib). The example is actually special, as the block named *all* is reserved by the framework. This block, if defined, is automatically included at the front of all private specifications, i.e. shared across all the privates specified underneath this officer. A very important trait for the option in the example, as it makes the debug setup available to all privates without having to explicitly include the block, and possibly forgetting such.

Generally speaking, the framework reserves all blocks whose name begins with a star, i.e *, for its own use.

string name

The name of the common block.

string text

The text of the block.

default

This command sets up a special kind of alias. The last private or officer is set as the default command to use at runtime. This means that if during "Dispatch" phase the currently processed word does not match any of the commands known to this officer this default is used. If no default is specified an error will be thrown instead.

description text

This command declares the help text of the officer.

ehandler cmdprefix

This is an advanced command which should normally only be specified at the top of the whole hierarchy (from which its value will automatically propagate to all subordinates).

At runtime the framework will call the specified command prefix with a single argument, a script whose execution is equivalent to the phases "Parsing", "Completion", and "Execution" of the framework, as described in --TODO--(sectref:flow/phases)--. The handler must call this script, and can perform any application-specific actions before and after.

This handler's main uses are two-fold:

1. Capture and hande application-specific errors which should not abort the application, nor shown as Tcl stacktrace.

2. Cleanup of application-specific transient state the parameter callbacks (See Cmdr - Parameter Specification Language) and/or actions may have set during their execution. This is especially important if the interactive command line shells of the framework are enabled. Without such a handler and its bespoke cleanup code transient state will leak between multiple commands run from such a shell, something which is definitely not wanted.

officer name script

This command creates a named subordinate officer with its specification script of officer commands as described here.

private name script cmdprefix

This command creates a named subordinate private with its specification script of private commands (See Cmdr - Private Specification Language), and a command prefix to invoke when it is chosen.

This command prefix is called with a single argument, the cmdr::config instance holding the parameters of the private. --TODO--(ref:backend-example-code)--

undocumented

This command excludes the officer (and its subordinates) from the generated help. Note that subordinates reachable through aliases may be included, under the alias name, if they are not explicitly excluded themselves.

Bugs, Ideas, Feedback

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.



     > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499   cmdr_dsl_parameter - Cmdr, a framework for command line parsing and dispatch

cmdr_dsl_parameter(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_dsl_parameter - Cmdr - Parameter Specification Language

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of parameters in detail.

Language Reference

The parameters of privates are the heart of the system, providing the space needed to transfer command arguments to their implementations, and having the most attributes controlling their behaviour.

This complexity is strongly mitigated by the use of sensible defaults for each of the three possible kinds of parameter, i.e. positional inputs, named options", and state hidden from the command line.

Each kind has its own construction command in the language for privates (See Cmdr - Private Specification Language) which specifies the common information which cannot have defaults, i.e.

1. the name identifying it to the system,

2. the help text describing it in informal speech, and, of course,

3. the parameter specification itself, using the commands of this section.

Naming

We have two commands to influence the visible naming of all parameters.

As background, all parameters are named, to properly identify them within the framework and other Tcl code, i.e. in the various callbacks and the private's action. This system name has to be unique within the private a parameter belongs to. Beyond that however the visible (i.e. non-term state]) parameters have to be identified by users within help texts, and, in the case of options, for detection during the Parsing phase. That is the visible naming, seen by a user of any application whose command line processing is based on the Cmdr framework.

label text

This command declares the parameter's visible name, if different from the system name used as the default. Note that in most cases this default is good enough, obviating the need for this command.

The only use case seen so far is when two semantically equivalent input and option parameters clash, forcing the use of different system names due to the requirement for their uniqueness, yet also use the same visible name and flag within the help to highlight their connection and equivalence.

alias name

For options the label command and its default specifies the name of the primary flag recognized during the Parsing phase. If that is not enough for a specific option this command allows the specification of any number additional flags to be recognized.

Note however that the framework automatically recognizes not only the specified flag(s), but also all their unique prefixes, obviating the need for this command in many cases.

General control

The general handling of a parameter is influenced by three commands:

optional

This command marks the parameter as optional, i.e. as something the user may skip on the command line, with the application supplying sensible defaults (See section Representations). This causes the framework to expend some effort in the Parsing phase to determine whether an argument word should be assigned to the parameter, or not.

This setting is only applicable to inputs, as options are optional by definition, and state is hidden.

test

This command is related to the above, switching the runtime from the standard regime for acceptance (based on counting and thresholds) to a different regime based on validation. The details are explained in --TODO--(sectref:flow/parsing,flow/optional)--.

undocumented

This command excludes the parameter from the generated help.

Its main use case is the hiding of options giving an application developer access to the internals of their application, something a regular user has no need of, and doesn't have to know about.

Representations

An important concept of parameters is something taken up from Tcl itself. The differentation between string and internal representations. Where Tcl uses internal representations to speed up its execution here this separation is that of between the information delivered to the application by a user, and the application-specific data structures behind them.

All parameters will have an internal representation. This is usually derived from the string representation provided by the user. The details of that process are explained in section Validation. However we have cases where the user cannot specify a string representation (states), or is allowed to choose not to (optional inputs, options). For these cases three specification commands are made available enabling us to programmatically choose the internal representation.

default value

This command specifies a constant default value for the internal representation.

generate cmdprefix

This command specifies a callback to compute the default internal representation at runtime. This is useful if the default is something which cannot be captured as a fixed value. An example would be a handle to some resource, or a dynamically created object.

The command prefix is invoked with a single argument, the cmdr::parameter instance for which to generate the internal representation.

The commands default and generate exclude each other, i.e. only of them can be specified, but not both. If neither are specified, and we need a default (see the cases above) then a default is chosen by the framework itself, as per the two rules below:

1. Use the empty string for a list parameter.

2. Use the default value supplied by the chosen validation type (See section Validation).

interact ?prompt?

This command actually does not specify an internal representation, but activates another method for the user to specify the string representation of the parameter, outside of the command line. As such it has priority over either default and generate, and can be specified with either. A parameter marked with it will interactively ask the user for a value if none was specified on the command line.

The default for the prompt is derived from the parameter's system name.

To recapitulate:

1. A string representation specified on the command line has the highest priority and goes through the chosen validation type to get the associated internal representation.

2. If activated via interact a small shell is run asking the user for a value (or more, as per list, see below). The result goes through the chosen validation type to get the associated internal representation.

3. After that the internal representation is either the declared default value, or the result of invoking the generate callback. As internal representations the resulting values are not run through the chosen validation type.

list

This command marks the parameter as a list. In other words, its string and internal representation is actually a list of such, instead of a single value. By default all parameters are scalar.

This affects the handling of the parameter by the Parsing phase, by interact above, and the use of the validation type. The last two ask for multiple values, and feed the elements of the string representation separately through validation instead of just the string value in one. In the Parsing phase treatment of options changes from keeping only the last assigned value to the accumulation of all values. Similarly a list-input takes all the remaining words on the command line for itself instead of just the current word. Because of this list-inputs are only allowed as the last parameter of a private.

The last two specification commands dealing with the representations control when the internal representation is created.

defered

This command marks a parameter as defered, causing its internal representation to be computed on first access to its value. This is the default for state parameters.

immediate

This command marks a parameter as immediate, causing its internal representation to be computed in the Completion phase. This is the default for input and option parameters.

Validation

The answer to the necessity of moving between the string and internal representations described in the previous section are the validation types. Given a string representation they either return the associated internal representation or raise an error, signaling that the string was illegal. This part of their work, the verification of the legality of the input string gave them their name.

The general concept of validation types was taken from snit, and modified to suit Cmdr. Where snit's types expect only a single method to validate the input Cmdr expects all types to support an ensemble of four methods, one for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus delivery of a default representation and support for command line completion.

validate cmdprefix

This command specifies a validation type for the parameter, in the form of a command prefix (or the name of one of the builtin types, see package cmdr::validate). The set of methods this callback has to support, their signatures, etc. are all explained in Cmdr - Writing custom validation types. This document contains the implementation of the standard boolean validation type as an example as well.

Because of the same necessity all parameters must have a validation type assigned to them, and the system will choose which, if the user did not. This choice is made as per the six rules below and always returns one of the standard types implemented by package cmdr::validate.

1. Use identity if a generate callback is specified.

2. Use boolean if no default is specified and the parameter is an option.

3. Use identity if no default is specified and the parameter is an input.

4. Use boolean if the specified default value is a Tcl boolean.

5. Use integer if the specified default value is a Tcl integer.

6. Use identity as fallback of last resort.

presence

This command is best discussed as part of the wider area of boolean options, i.e. options with the standard validation type boolean assigned to them. These have associated special behaviours, both in the handling of the specification, and in the Parsing phase.

First, normal boolean options. They have automatic aliases declared for them, derived from their primary flag. An option named "foo" will have an alias of "no-foo", and the reverse. In the Parsing phase the "foo" and "no-foo" flags have inverse semantics, and both are allowed to occur without option argument following the flag. This is in contrast to all other options which must have such an argument. The parser essentially uses the validation type to decide if the word after the flag is a proper boolean value, or not, i.e. an argument to assign to the parameter, or not.

Now presence declares a variant of the above, a boolean option without the automatic aliases, and never taking an argument during parsing. Its mere presence on the command line will set its parameter. Their default value is consequently fixed to false as well.

Signaling

Of the four callbacks supported by parameters the first two, generate and validate have been described already, in the sections Representations and Validation, respectively.

This section explains the commonalities between the callbacks in general, and the last two, for notifications about state changes in detail.

All callbacks are treated as command prefixes, not scripts. There are no placeholder substitutions, only arguments added to each command prefix on invokation. This does not harm the generality of the system, as complex scripts can be used via procedures or equivalents (i.e. apply).

The two callbacks not yet described are the state-change callbacks through which the framework can actively drive parts of the application while processing the command line, whereas normally the application drives access to parameters through their methods.

when-complete cmdprefix

This command declares the state-change callback to invoke when the internal representation of the parameter is generated from the string representation, or the various ways of getting a default.

The callback is invoked with two arguments, the cmdr::parameter instance of the changed parameter, and its internal representation, in this order.

when-set cmdprefix

This command declares the state-change callback to invoke when the string representation of the parameter is set during command line parsing.

The callback is invoked with two arguments, the cmdr::parameter instance of the changed parameter, and its string representation, in this order.

Due to their nature these callbacks are invoked at runtime during either the Parsing, Completion, or Execution phases. The details are shown in the table below. The specification commands influencing the timing, i.e. forcing the use in a specific phase are shown in the intersection of callback and phase.

| Dispatch | Parsing | Completion  | Execution --------------------+----------+---------+-------------+----------- validate (default)  | *        |         |             |           --------------------+----------+---------+-------------+----------- validate (complete) |          | *       | immediate   | defered when-set            |          | *       |             |           --------------------+----------+---------+-------------+----------- generate            |          |         | immediate   | defered validate (validate) |          | test    | immediate   | defered validate (release)  |          | test    | immediate   | defered --------------------+----------+---------+-------------+----------- when-complete       |          |         | immediate   | defered --------------------+----------+---------+-------------+-----------

Bugs, Ideas, Feedback

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.



     > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219   cmdr_dsl_private - Cmdr, a framework for command line parsing and dispatch

cmdr_dsl_private(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_dsl_private - Cmdr - Private Specification Language

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document is for users of the cmdr framework. It introduces the domain-specific language for the specification of privates in detail.

Language Reference

The specification of privates is quite easy, with only seven commands. The important parts are found in the parameter specifications, explained in Cmdr - Parameter Specification Language.

description text

This command declares the help text for the private.

input name help script

This command adds an input (i.e. positional) parameter to the private, with description help and its specification script of parameter commands as described in Cmdr - Parameter Specification Language.

interactive

This command activates a mini-shell for this private which will be invoked when required parameters do not have a value after argument extraction and matching.

By default the only interactive command line shells are associated with the officers.

The command cmdr::config interactive provided by the package cmdr::config can be used to globally activate this type of shell for all privates.

option name help script

This command adds an option (i.e. named) parameter to the private, with description help and its specification script of parameter commands as described in Cmdr - Parameter Specification Language.

state name help script

This command adds a state (i.e. hidden) parameter to the private, with description help and its specification script of parameter commands as described in Cmdr - Parameter Specification Language.

undocumented

This command excludes the private from the generated help.

use name

This command is the counterpart to common of officers (See Cmdr - Officer Specification Language). It inserts the named block into the specification, executing it in place. As such it expects the contents to be a script of private commands as described in this section.

Bugs, Ideas, Feedback

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.



Changes to embedded/www/doc/files/cmdr_help.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 ... 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164   cmdr_help - Cmdr, a framework for command line parsing and dispatch

cmdr_help(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_help - Cmdr - Utilities for help text formatting and setup - Internal

• Synopsis
• Description
• API
• ................................................................................

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This internal package implements the four standard help formats full, short, list, and by-category.

It provides a single utility command used by the other parts of the framework to add a help command to any cmdr::actor requiring such.

API

::cmdr::help auto actor

When invoked this command extends the actor with a help command. The result of the command is the empty string.

The inserted command will accept all known format names as ................................................................................ the format by-category will be used, except if a command name was given to help, then the default will be full.

An additional option accepted by help is --width, giving the user control over the length of lines in the help. By default help will be formatted to the width of the terminal.

cmdr::actor actor

The cmdr::actor instance to be extended with help.

Bugs, Ideas, Feedback

Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at   | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 ... 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164   cmdr::help - Cmdr, a framework for command line parsing and dispatch

cmdr::help(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::help - Cmdr - Utilities for help text formatting and setup - Internal

• Synopsis
• Description
• API
• ................................................................................

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This internal package implements the four standard help formats full, short, list, and by-category.

It provides a single utility command used by the other parts of the framework to add a help command to any cmdr::actor requiring such.

API

::cmdr::help auto actor

When invoked this command extends the actor with a help command. The result of the command is the empty string.

The inserted command will accept all known format names as ................................................................................ the format by-category will be used, except if a command name was given to help, then the default will be full.

An additional option accepted by help is --width, giving the user control over the length of lines in the help. By default help will be formatted to the width of the terminal.

cmdr::actor actor

The cmdr::actor instance to be extended with help.

Bugs, Ideas, Feedback

Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at 

Changes to embedded/www/doc/files/cmdr_help_json.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117   cmdr_help_json - Cmdr, a framework for command line parsing and dispatch

cmdr_help_json(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_help_json - Cmdr - Formatting help as JSON object

Changes to embedded/www/doc/files/cmdr_help_sql.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117   cmdr_help_sql - Cmdr, a framework for command line parsing and dispatch

cmdr_help_sql(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_help_sql - Cmdr - Formatting help as series of SQL commands

Changes to embedded/www/doc/files/cmdr_officer.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 ... 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 ... 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 ... 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 ... 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378   cmdr_officer - Cmdr, a framework for command line parsing and dispatch

cmdr_officer(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_officer - Cmdr - Aggregation of multiple commands for dispatch.

Synopsis

• package require cmdr::util

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements officers, the inner nodes of command hierarchies. Each officer can execute many actions, by delegating them to their sub-ordinate actors, officers and privates.

This class is sub-class of cmdr::actor.

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary officer instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

object super

The instance command of the actor (officer actually) which contains the new officer.

string name

The user-visible name of the command.

script actions

The specification of the officer's subordinates. Please read Cmdr - Specification Language (section "Officers") for the details.

Instance API

The instance API is not public. It is used internally by the framework during the parsing of a command hierarchy specification to configure the officer instances, and when processing a command line at runtime ................................................................................

script path

The list of names specifying the route from this officer to the new private. The last element is the name of the private command, while the preceding names specify the intermediate officers.

script arguments

The specification of the private's parameters. Please read Cmdr - Specification Language (section "Parameters") for the details.

cmd-prefix action

The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden cmdr::config container holding the private's parameters. The result of the action, if there is any, is ignored by the framework.

<officer> has name

This method returns a boolean value indicating if this officer has a sub-ordinate of the given name (true), or not (false). See also method lookup.

................................................................................

This method takes a regular specification script and uses it to extend the set of subordinates known to this officer. This is the same type of script as used during construction, except here we dynamically extend the officer.

script actions

The specification of the officer's additional subordinates. Please read Cmdr - Specification Language (section "Officers") for the details.

<officer> lookup name

This method returns the instance command of the sub-ordinate with the given name. An error is thrown if such a sub-ordinate does not exist. See also method has.

string name
................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.

  | | | | | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 ... 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 ... 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 ... 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 ... 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378   cmdr::officer - Cmdr, a framework for command line parsing and dispatch

cmdr::officer(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::officer - Cmdr - Aggregation of multiple commands for dispatch.

Synopsis

• package require cmdr::officer

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements officers, the inner nodes of command hierarchies. Each officer can execute many actions, by delegating them to their sub-ordinate actors, officers and privates.

This class is sub-class of cmdr::actor.

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary officer instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

object super

The instance command of the actor (officer actually) which contains the new officer.

string name

The user-visible name of the command.

script actions

The specification of the officer's subordinates. Please read Cmdr - Officer Specification Language for the details.

Instance API

The instance API is not public. It is used internally by the framework during the parsing of a command hierarchy specification to configure the officer instances, and when processing a command line at runtime ................................................................................

script path

The list of names specifying the route from this officer to the new private. The last element is the name of the private command, while the preceding names specify the intermediate officers.

script arguments

The specification of the private's parameters. Please read Cmdr - Parameter Specification Language for the details.

cmd-prefix action

The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden cmdr::config container holding the private's parameters. The result of the action, if there is any, is ignored by the framework.

<officer> has name

This method returns a boolean value indicating if this officer has a sub-ordinate of the given name (true), or not (false). See also method lookup.

................................................................................

This method takes a regular specification script and uses it to extend the set of subordinates known to this officer. This is the same type of script as used during construction, except here we dynamically extend the officer.

script actions

The specification of the officer's additional subordinates. Please read Cmdr - Officer Specification Language for the details.

<officer> lookup name

This method returns the instance command of the sub-ordinate with the given name. An error is thrown if such a sub-ordinate does not exist. See also method has.

string name
................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.



Changes to embedded/www/doc/files/cmdr_parameter.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 ... 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 ... 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 ... 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290   cmdr_parameter - Cmdr, a framework for command line parsing and dispatch

cmdr_parameter(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_parameter - Cmdr - Command parameters

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements parameters, collections of which (see cmdr::config) serve as the configuration of privates (see cmdr::private).

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary parameter instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

::cmdr::parameter create obj config order cmdline required defered name description spec

Create a new instance of cmdr::parameter, named obj. Used by the DSL processing parts of the framework to instantiate parameters.

string obj

The (command) name of the new parameter instance.

cmdr::config config

The instance command of the cmdr::config instance holding the parameter.

boolean order

Flag. Parameter is specified by order (true: argument), or name (false: option).

boolean cmdline

Flag. Parameter is visible on the command line (true: option, or argument), or not (false: state).

................................................................................
string name

Internal name of the parameter. Also the name used in the help, if not overridden by a label declaration (in spec).

string description

Human-readable help text for the parameter.

script spec

Tcl-script specifying the parameter in detail. Please read Cmdr - Specification Language (section "Parameters") for the details.

Instance API

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 ................................................................................

dict parse

A dictionary holding the current completion state of a partial command line.

--TODO-- Describe the state fields and their meaning.

<parameter> config word...

This method either returns the cmdr::config instance containing the parameter, or the result of applying the words to that config instance. It is through this method that any script with access to a single parameter instance of a private will have access to all its parameters.

string word...

The method and its arguments to apply to the config instance holding the parameter. If none are specified the method self is   | | | | | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 ... 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 ... 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 ... 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290   cmdr::parameter - Cmdr, a framework for command line parsing and dispatch

cmdr::parameter(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::parameter - Cmdr - Command parameters

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements parameters, collections of which (see cmdr::config) serve as the configuration of privates (see cmdr::private).

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary parameter instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

::cmdr::parameter create obj config order cmdline required defered name description spec

Create a new instance of cmdr::parameter, named obj. Used by the DSL processing parts of the framework to instantiate parameters.

string obj

The (command) name of the new parameter instance.

cmdr::config config

The instance command of the cmdr::config instance holding the parameter.

boolean order

Flag. Parameter is specified by order (true: argument), or name (false: option).

boolean cmdline

Flag. Parameter is visible on the command line (true: option, or argument), or not (false: state).

................................................................................
string name

Internal name of the parameter. Also the name used in the help, if not overridden by a label declaration (in spec).

string description

Human-readable help text for the parameter.

script spec

Tcl-script specifying the parameter in detail. Please read Cmdr - Parameter Specification Language for the details.

Instance API

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 ................................................................................

dict parse

A dictionary holding the current completion state of a partial command line.

--TODO-- Describe the state fields and their meaning.

<parameter> config word...

This method either returns the cmdr::config instance containing the parameter, or the result of applying the words to that config instance. It is through this method that any script with access to a single parameter instance of a private will have access to all its parameters.

string word...

The method and its arguments to apply to the config instance holding the parameter. If none are specified the method self is 

Changes to embedded/www/doc/files/cmdr_private.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 ... 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 ... 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 ... 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269   cmdr_private - Cmdr, a framework for command line parsing and dispatch

cmdr_private(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_private - Cmdr - Single command handling, options, and arguments

Synopsis

• package require cmdr::util
• ::cmdr::private new super name arguments action
• ::cmdr::private create obj super name arguments action
• <private> complete-words parse
• <private> do ?word...?
• <private> ehandler cmd
• ................................................................................

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements privates, the leaves of command hierarchies. While each private can execute only a single action they have parameters, i.e. arguments and options with which to configure the behaviour of their action.

This class is sub-class of cmdr::actor.

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary private instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

object super

The instance command of the actor (officer actually) which contains the new private.

string name

The user-visible name of the command.

script arguments

The specification of the private's parameters. Please read Cmdr - Specification Language (section "Privates") for the details.

cmd-prefix action

The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden cmdr::config container holding the private's parameters. The result of the action, if there is any, is ignored by the framework.

Instance API

The instance API is not public. It is used internally by the framework ................................................................................

string prefix

The name to use for the private within the generated help.

<private> unknown m ?word...?

This method overrides the standard behaviour for unknown methods. Instead of throwing an error they are routed to the hidden container of the private's parameters, of class cmdr::config.

string m

The name of the unknown method.

string word

The argument (one or more) of the unknown method.

................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.

  | | | | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 ... 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 ... 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 ... 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269   cmdr::private - Cmdr, a framework for command line parsing and dispatch

cmdr::private(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::private - Cmdr - Single command handling, options, and arguments

Synopsis

• package require cmdr::private
• ::cmdr::private new super name arguments action
• ::cmdr::private create obj super name arguments action
• <private> complete-words parse
• <private> do ?word...?
• <private> ehandler cmd
• ................................................................................

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package implements privates, the leaves of command hierarchies. While each private can execute only a single action they have parameters, i.e. arguments and options with which to configure the behaviour of their action.

This class is sub-class of cmdr::actor.

Class API

The class API is not public. It is used internally by the framework when parsing a command hierarchy specification to create the necessary private instances.

It is described here for use by developers maintaining, modifying and extending the framework itself. A user of the framework ................................................................................

object super

The instance command of the actor (officer actually) which contains the new private.

string name

The user-visible name of the command.

script arguments

The specification of the private's parameters. Please read Cmdr - Private Specification Language for the details.

cmd-prefix action

The command prefix to invoke when this private is selected for execution. It takes a single argument, the instance command of the hidden cmdr::config container holding the private's parameters. The result of the action, if there is any, is ignored by the framework.

Instance API

The instance API is not public. It is used internally by the framework ................................................................................

string prefix

The name to use for the private within the generated help.

<private> unknown m ?word...?

This method overrides the standard behaviour for unknown methods. Instead of throwing an error they are routed to the hidden container of the private's parameters, of class cmdr::config.

string m

The name of the unknown method.

string word

The argument (one or more) of the unknown method.

................................................................................

A dictionary mapping option flags to option names. These names are keys into the parameters sub-dictionary.

options

A dictionary mapping option names to their descriptions.

parameters

A dictionary mapping parameter names to their definition. Each definition is a dictionary containing the keys below. See also package cmdr::parameter.

cmdline

Output of method cmdline.

code

Output of method code.

default

Output of method default.



Changes to embedded/www/doc/files/cmdr_util.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117   cmdr_util - Cmdr, a framework for command line parsing and dispatch

cmdr_util(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_util - Cmdr - General Utilities - Internal

Changes to embedded/www/doc/files/cmdr_validate.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117   cmdr_validate - Cmdr, a framework for command line parsing and dispatch

cmdr_validate(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_validate - Cmdr - Standard validation types for parameters

Changes to embedded/www/doc/files/cmdr_vcommon.html.

 1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158   cmdr_validate_common - Cmdr, a framework for command line parsing and dispatch

cmdr_validate_common(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr_validate_common - Cmdr - Utilities for Validation Types

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package publicly exports three commands for use in the implementation of validation types. The standard validation types defined in package cmdr::validate make use of these commands.

API

::cmdr::validate::common fail p code type x

When invoked this command throws an error indicating a validation type failure. The arguments provide the information used to construct both error message and code.

cmdr::parameter p

The cmdr::parameter instance whose validation failed. The error message will contain this parameter's type and label (flag in case of an option).

list code

A list providing additional elements for the error code, detailing the internal name of the validation type triggering the error.

string type

A string providing the human-readable name of the validation type   | | | | | | |  1 2 3 4 5 6 7 8 9 10 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158   cmdr::validate::common - Cmdr, a framework for command line parsing and dispatch

cmdr::validate::common(n) 0 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::validate::common - Cmdr - Utilities for Validation Types

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This package publicly exports three commands for use in the implementation of validation types. The standard validation types defined in package cmdr::validate make use of these commands.

API

::cmdr::validate::common fail p code type x

When invoked this command throws an error indicating a validation type failure. The arguments provide the information used to construct both error message and code.

cmdr::parameter p

The cmdr::parameter instance whose validation failed. The error message will contain this parameter's type and label (flag in case of an option).

list code

A list providing additional elements for the error code, detailing the internal name of the validation type triggering the error.

string type

A string providing the human-readable name of the validation type 

Changes to embedded/www/doc/files/cmdr_vtypes.html.

 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266  

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document describes the API expected of validation types to make them usable within the Cmdr framework, and how to write a custom validation type.

Readers interested in the standard validation types of the framework should read Cmdr - Standard validation types for parameters.

Background

Validation types are Cmdr's answer to the necessity of moving between the string and internal representations of cmdr::parameter instances. Given a string representation they either return the associated internal representation or raise an error, signaling that the input was illegal. This part of their work, the verification of the legality of the input string gave them their name.

Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not. This choice is made per the six rules below and always returns one of the builtins described in Cmdr - Standard validation types for parameters.

1. Use identity if a generate callback is specified.

2. Use boolean if no default is specified and the parameter is an option.

3. Use identity if no default is specified and the parameter is an input.

4. Use boolean if the specified default value is a Tcl boolean.

5. Use integer if the specified default value is a Tcl integer.

6. Use identity as fallback of last resort.

The general concept of validation types was taken from package snit, and modified to suit Cmdr. Where snit's types expect only a single method to validate the input we expect all types to support an ensemble of four methods. One for the basic validation and transformation of the input, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion. The details (method names, signatures, etc.) can be found in section API below.

As an example the implementation of the standard boolean validation type is shown in section Example.

It should be noted that while snit's validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use.

The validate and release methods are primarily used during either completion or execution phases, depending on the chosen deferal state. They may also be used during parsing, for optional inputs under the test-regime].

The complete method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters.

The default method on the other hand can expect to be invoked during dispatch, as part of the system's declaration processing, if not preempted by default and generate declarations for the parameter. Note here that the default method has the same signature as a generate callback and can be used as such. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early. We can still use the validation type for its generation, by hooking it explicitly into generate to change the timing of its invokation.

API

In the descriptions below the cmd is a placeholder for the actual command prefix, most often a main command, of the validation type.

cmd complete p x

This method is invoked during command completion done by the framework.

It has to return the list of legal string representations for the type and parameter instance p which have the incomplete word x as their prefix.

cmdr::parameter p

The cmdr::parameter instance governing the completion process. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion.

string x

The string value to complete.

cmd default p

This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation.

It has to return the default internal representation for the type and parameter instance p.

cmdr::parameter p

The cmdr::parameter instance whose default internal representation is to be computed. While the standard validation types do not make use of it a custom type may have need for access to the context.

string x

The string value to complete.

cmd release p x

This method is invoked when the framework has to get rid of an internal representation for a parameter.

It has to release any resources associated with the internal representation x of parameter instance p.

Note that the result of this method, if there is any, is ignored by the framework.

cmdr::parameter p

The cmdr::parameter instance holding the internal representation to release. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion.

string x

The internal representation to release.

cmd validate p x

This method is invoked during to validate and convert a string representation.

It has to verify that x is a legal string representation for the parameter instance p, and return the associated internal representation.

cmdr::parameter p

The cmdr::parameter instance governing the validation process. The standard validation types make use of it in case of a validation failure to generate a proper error message. See also Utilities for Validation Types for commands helping with keeping validation error messages uniform.

string x

The string value to validate cand convert.

  | | | | | | | | | | | | | | > | | | > | | | > | | | | > | | | | | > | | < | | | | | | | | | | | | |  124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270  

Description

Welcome to the Cmdr project, written by Andreas Kupries.

This document describes the API expected of validation types to make them usable within the Cmdr framework, and how to write a custom validation type.

Readers interested in the standard validation types of the framework should read Cmdr - Standard validation types for parameters.

Background

Validation types are Cmdr's answer to the necessity of moving between the string and internal representations of cmdr::parameter instances. Given a string representation they either return the associated internal representation or raise an error, signaling that the input was illegal. This part of their work, the verification of the legality of the input string gave them their name.

Because of the same necessity all parameters must have a validation type assigned to them, and the framework will choose which, if the user did not. This choice is made per the six rules below and always returns one of the builtins described in Cmdr - Standard validation types for parameters.

1. Use identity if a generate callback is specified.

2. Use boolean if no default is specified and the parameter is an option.

3. Use identity if no default is specified and the parameter is an input.

4. Use boolean if the specified default value is a Tcl boolean.

5. Use integer if the specified default value is a Tcl integer.

6. Use identity as fallback of last resort.

The general concept of validation types was taken from package snit, and modified to suit Cmdr. Where snit's types expect only a single method to validate the input we expect all types to support an ensemble of four methods. One for the basic validation and transformation of the string, another for the release of any internal representation so generated, plus two more for delivery of a default representation and support for command line completion. The details (method names, signatures, etc.) can be found in section API below.

As an example the implementation of the standard boolean validation type is shown in section Example.

It should be noted that while snit's validation types in principle allow for the transformation of input into a disparate internal representation, they never went so far as to allow complex representations which might require the release of resources after use.

The validate and release methods are primarily used during either Completion or Execution phases, depending on the chosen deferal state. They may also be used during the Parsing phase, for optional inputs under the test-regime].

The complete method will be used whereever the system activates an interactive command line shell where arguments may be assigned to parameters.

The default method on the other hand can expect to be invoked during the Dispatch phase, as part of the system's declaration processing, if not preempted by default and generate declarations for the parameter. Note here that the default method has the same signature as a paramete's generate callback and can be used as such. This is actually needed and useful when the default internal representation for a validation type cannot be expressed as a fixed value and its creation while parsing the specification itself is too early. We can still use the validation type for its generation, by hooking it explicitly into generate to change the timing of its invokation.

API

In the descriptions below the <v-type> is a placeholder for the actual command prefix, most often a main command, of the validation type.

<v-type> complete p x

This method is invoked during command completion done by the framework.

It has to return the list of legal string representations for the type and parameter instance p which have the incomplete word x as their prefix.

cmdr::parameter p

The cmdr::parameter instance governing the completion process. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion.

string x

The string value to complete.

<v-type> default p

This method is invoked when the framework has to determine the internal representation of a parameter which has no user-specified string representation.

It has to return the default internal representation for the type and parameter instance p.

cmdr::parameter p

The cmdr::parameter instance whose default internal representation is to be computed. While the standard validation types do not make use of it a custom type may have need for access to the context.

string x

The string value to complete.

<v-type> release p x

This method is invoked when the framework has to get rid of an internal representation for a parameter.

It has to release any resources associated with the internal representation x of parameter instance p.

Note that the result of this method, if there is any, is ignored by the framework.

cmdr::parameter p

The cmdr::parameter instance holding the internal representation to release. While the standard validation types do not make use of it a custom type may have need for access to the context of the completion.

string x

The internal representation to release.

<v-type> validate p x

This method is invoked during to validate and convert a string representation.

It has to verify that x is a legal string representation for the parameter instance p, and return the associated internal representation.

cmdr::parameter p

The cmdr::parameter instance governing the validation process. The standard validation types make use of it in case of a validation failure to generate a proper error message. See also Utilities for Validation Types for commands helping with keeping validation error messages uniform.

string x

The string value to validate cand convert.



Changes to embedded/www/doc/toc.html.

 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97  

doc

cmdr Cmdr - Main package and API
cmdr_actor Cmdr - Base class for officers and privates - Internal
cmdr_changes Cmdr - Log of Changes
cmdr_config Cmdr - Collection of parameters for privates
cmdr_development Cmdr - The Developer's Guide
cmdr_dsl Cmdr - Specification Language
cmdr_help Cmdr - Utilities for help text formatting and setup - Internal
cmdr_help_json Cmdr - Formatting help as JSON object
cmdr_help_sql Cmdr - Formatting help as series of SQL commands
cmdr_howto_get_sources Cmdr - How To Get The Sources
cmdr_installation Cmdr - The Installer's Guide
cmdr_introduction Cmdr - Introduction to the project
cmdr_officer Cmdr - Aggregation of multiple commands for dispatch.
cmdr_parameter Cmdr - Command parameters
cmdr_private Cmdr - Single command handling, options, and arguments
cmdr_util Cmdr - General Utilities - Internal
cmdr_validate Cmdr - Standard validation types for parameters
cmdr_validate_common Cmdr - Utilities for Validation Types
cmdr_vtypes Cmdr - Writing custom validation types

  | | > > > > > > > > > > > > > > > > > > > > | > > > > | | > > > > > > > > > > > > | | | | | | | | | | | | | | | < < < < < < < < < < < < < < < < < < < < < < < <  14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  

doc

cmdr Cmdr - Main package and API
cmdr::actor Cmdr - Base class for officers and privates - Internal
cmdr::config Cmdr - Collection of parameters for privates
cmdr::help Cmdr - Utilities for help text formatting and setup - Internal
cmdr::help::json Cmdr - Formatting help as JSON object
cmdr::help::sql Cmdr - Formatting help as series of SQL commands
cmdr::officer Cmdr - Aggregation of multiple commands for dispatch.
cmdr::parameter Cmdr - Command parameters
cmdr::private Cmdr - Single command handling, options, and arguments
cmdr::util Cmdr - General Utilities - Internal
cmdr::validate Cmdr - Standard validation types for parameters
cmdr::validate::common Cmdr - Utilities for Validation Types
cmdr_changes Cmdr - Log of Changes
cmdr_development Cmdr - The Developer's Guide
cmdr_dsl Cmdr - Introduction to the Specification Language
cmdr_dsl_officer Cmdr - Officer Specification Language
cmdr_dsl_parameter Cmdr - Parameter Specification Language
cmdr_dsl_private Cmdr - Private Specification Language
cmdr_howto_get_sources Cmdr - How To Get The Sources
cmdr_installation Cmdr - The Installer's Guide
cmdr_introduction Cmdr - Introduction to the project
cmdr_vtypes Cmdr - Writing custom validation types



Changes to embedded/www/index.html.

 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114  
Keywords: A
arguments cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: C
command hierarchy cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
command line completion cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
command line handling cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
command tree cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: E
editing command line cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: H
help for command line cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
hierarchy of commands cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: I
interactive command shell cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: O
optional arguments cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
options cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: P
parameters cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
processing command line cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
Keywords: T
tree of commands cmdr · cmdr_actor · cmdr_changes · cmdr_config · cmdr_development · cmdr_dsl · cmdr_help · cmdr_help_json · cmdr_help_sql · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_officer · cmdr_parameter · cmdr_private · cmdr_util · cmdr_validate · cmdr_validate_common · cmdr_vtypes
  | | | | | | | | | | | | | |  18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114  
Keywords: A
arguments cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: C
command hierarchy cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
command line completion cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
command line handling cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
command tree cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: E
editing command line cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: H
help for command line cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
hierarchy of commands cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: I
interactive command shell cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: O
optional arguments cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
options cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: P
parameters cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
processing command line cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes
Keywords: T
tree of commands cmdr · cmdr::actor · cmdr::config · cmdr::help · cmdr::help::json · cmdr::help::sql · cmdr::officer · cmdr::parameter · cmdr::private · cmdr::util · cmdr::validate · cmdr::validate::common · cmdr_changes · cmdr_development · cmdr_dsl · cmdr_dsl_officer · cmdr_dsl_parameter · cmdr_dsl_private · cmdr_howto_get_sources · cmdr_installation · cmdr_introduction · cmdr_license · cmdr_vtypes


Changes to embedded/www/toc.html.

 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97  

doc

cmdr Cmdr - Main package and API
cmdr_actor Cmdr - Base class for officers and privates - Internal
cmdr_changes Cmdr - Log of Changes
cmdr_config Cmdr - Collection of parameters for privates
cmdr_development Cmdr - The Developer's Guide
cmdr_dsl Cmdr - Specification Language
cmdr_help Cmdr - Utilities for help text formatting and setup - Internal
cmdr_help_json Cmdr - Formatting help as JSON object
cmdr_help_sql Cmdr - Formatting help as series of SQL commands
cmdr_howto_get_sources Cmdr - How To Get The Sources
cmdr_installation Cmdr - The Installer's Guide
cmdr_introduction Cmdr - Introduction to the project
cmdr_officer Cmdr - Aggregation of multiple commands for dispatch.
cmdr_parameter Cmdr - Command parameters
cmdr_private Cmdr - Single command handling, options, and arguments
cmdr_util Cmdr - General Utilities - Internal
cmdr_validate Cmdr - Standard validation types for parameters
cmdr_validate_common Cmdr - Utilities for Validation Types
cmdr_vtypes Cmdr - Writing custom validation types

  | | > > > > > > > > > > > > > > > > > > > > | > > > > | | > > > > > > > > > > > > | | | | | | | | | | | | | | | < < < < < < < < < < < < < < < < < < < < < < < <  14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  

doc

cmdr Cmdr - Main package and API
cmdr::actor Cmdr - Base class for officers and privates - Internal
cmdr::config Cmdr - Collection of parameters for privates
cmdr::help Cmdr - Utilities for help text formatting and setup - Internal
cmdr::help::json Cmdr - Formatting help as JSON object
cmdr::help::sql Cmdr - Formatting help as series of SQL commands
cmdr::officer Cmdr - Aggregation of multiple commands for dispatch.
cmdr::parameter Cmdr - Command parameters
cmdr::private Cmdr - Single command handling, options, and arguments
cmdr::util Cmdr - General Utilities - Internal
cmdr::validate Cmdr - Standard validation types for parameters
cmdr::validate::common Cmdr - Utilities for Validation Types
cmdr_changes Cmdr - Log of Changes
cmdr_development Cmdr - The Developer's Guide
cmdr_dsl Cmdr - Introduction to the Specification Language
cmdr_dsl_officer Cmdr - Officer Specification Language
cmdr_dsl_parameter Cmdr - Parameter Specification Language
cmdr_dsl_private Cmdr - Private Specification Language
cmdr_howto_get_sources Cmdr - How To Get The Sources
cmdr_installation Cmdr - The Installer's Guide
cmdr_introduction Cmdr - Introduction to the project
`