cmdr
Check-in [dbd259771b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tweaked documented titles for better marking of internals. Fixed a few issues with validation types, mainly shuffling text blocks around, plus fix in API documentation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:dbd259771bf9a7298e07938fb551ae244f56d4ad
User & Date: aku 2013-11-26 05:34:10
Original Comment: Tweaked documented titles for better marking of internals. Fixed a few issues with validation types, mainly shuffling text blocks around, plsu fix in API documentation.
Context
2013-11-27
01:15
Draft work on internal workings of the command line completion. check-in: a1c106f24e user: andreask tags: trunk
2013-11-26
05:34
Tweaked documented titles for better marking of internals. Fixed a few issues with validation types, mainly shuffling text blocks around, plus fix in API documentation. check-in: dbd259771b user: aku tags: trunk
05:17
Continued work on the dev guide. Complete architecture and package dependency information. Regenerated figures and embedded documentation. check-in: e33e0f5b2d user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/cmdr_validate.man.

3
4
5
6
7
8
9




10
11
12
13
14
15
16
17

18


















19
20
[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
shown below. The [cmd validate] command of the parameter declaration
DSL can use these by name. Non-standard types have to provide a proper
command prefix instead.

[para] Readers interested in writing their own custom validation types
should read [term [vset TITLE_DEV_VT]].


[include parts/vtypes_std.inc]


















[include parts/feedback.inc]
[manpage_end]







>
>
>
>
|
|
|
|




>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


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
[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]

[para] Validation types are [vset PTITLE]'s answer to the necessity of
moving between the string and internal representations of
[package cmdr::parameter] instances.

[para] This internal package implements the twelve standard validation
types shown below. The [cmd validate] command of the parameter
declaration DSL can use these by name. Non-standard types have to
provide a proper command prefix instead.

[para] Readers interested in writing their own custom validation types
should read [term [vset TITLE_DEV_VT]].

[section {Standard Types}]
[include parts/vtypes_std.inc]

[section {Standard Selection Rules}]

[para] Because of the aformentioned 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 here.

[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]


[include parts/feedback.inc]
[manpage_end]

Changes to doc/cmdr_vtypes.man.

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
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[package 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.

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

................................................................................
[arg_def [package cmdr::parameter] p]

The [package 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.

[arg_def string x]
The string value to complete.
[list_end]

[comment {- - -- --- ----- -------- -------------}]
[call [cmd <v-type>] [method release] [arg p] [arg x]]

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







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







21
22
23
24
25
26
27














28
29
30
31
32
33
34
...
118
119
120
121
122
123
124


125
126
127
128
129
130
131
[package 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.















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

................................................................................
[arg_def [package cmdr::parameter] p]

The [package 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.



[list_end]

[comment {- - -- --- ----- -------- -------------}]
[call [cmd <v-type>] [method release] [arg p] [arg x]]

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

Changes to doc/parts/definitions.inc.

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
[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"]
[vset TITLE_DSL_OFFICER   "[vset PTITLE] - Officer Specification Language"]
[vset TITLE_DSL_PRIVATE   "[vset PTITLE] - Private Specification Language"]
[vset TITLE_DSL_PARAMETER "[vset PTITLE] - Parameter Specification Language"]
[vset TITLE_HELP      "[vset PTITLE] - Utilities for help text formatting and setup - Internal"]
[vset TITLE_HELP_JSON "[vset PTITLE] - Formatting help as JSON object"]
[vset TITLE_HELP_SQL  "[vset PTITLE] - Formatting help as series of SQL commands"]
[vset TITLE_OFFICER   "[vset PTITLE] - Aggregation of multiple commands for dispatch."]
[vset TITLE_PARAMETER "[vset PTITLE] - Command parameters"]
[vset TITLE_PRIVATE   "[vset PTITLE] - Single command handling, options, and arguments"]
[vset TITLE_UTIL      "[vset PTITLE] - General Utilities - Internal"]
[vset TITLE_VALIDATE  "[vset PTITLE] - Standard validation types for parameters"]
[vset TITLE_VCOMMON   "[vset PTITLE] - Utilities for Validation Types"]

[comment {- Miscellanea ............. - - -- --- ----- --------}]







|
|






|


|
|
|
|




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
[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] - (Internal) Base class for officers and privates"]
[vset TITLE_CONFIG    "[vset PTITLE] - (Partially internal) 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"]
[vset TITLE_DSL_OFFICER   "[vset PTITLE] - Officer Specification Language"]
[vset TITLE_DSL_PRIVATE   "[vset PTITLE] - Private Specification Language"]
[vset TITLE_DSL_PARAMETER "[vset PTITLE] - Parameter Specification Language"]
[vset TITLE_HELP      "[vset PTITLE] - (Internal) Utilities for help text formatting and setup"]
[vset TITLE_HELP_JSON "[vset PTITLE] - Formatting help as JSON object"]
[vset TITLE_HELP_SQL  "[vset PTITLE] - Formatting help as series of SQL commands"]
[vset TITLE_OFFICER   "[vset PTITLE] - (Internal) Aggregation of multiple commands for dispatch."]
[vset TITLE_PARAMETER "[vset PTITLE] - (Partially internal) Command parameters"]
[vset TITLE_PRIVATE   "[vset PTITLE] - (Internal) Single command handling, options, and arguments"]
[vset TITLE_UTIL      "[vset PTITLE] - (Internal) General Utilities"]
[vset TITLE_VALIDATE  "[vset PTITLE] - Standard validation types for parameters"]
[vset TITLE_VCOMMON   "[vset PTITLE] - Utilities for Validation Types"]

[comment {- Miscellanea ............. - - -- --- ----- --------}]

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Internal) Base class for officers and privates
.SH SYNOPSIS
package require \fBcmdr::actor \fR
.sp
\fB::cmdr::actor\fR \fBnew\fR
.sp
\fB::cmdr::actor\fR \fBcreate\fR \fIobj\fR
.sp

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Partially internal) 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

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Internal) Utilities for help text formatting and setup
.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_officer.n.

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Internal) 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

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Partially internal) 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

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Internal) 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

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

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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
\fB::cmdr::util\fR \fBdictsort\fR \fIdict\fR
.sp







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
..
.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 - (Internal) General Utilities
.SH SYNOPSIS
package require \fBcmdr::util \fR
.sp
\fB::cmdr::util\fR \fBpadr\fR \fIlist\fR
.sp
\fB::cmdr::util\fR \fBdictsort\fR \fIdict\fR
.sp

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

249
250
251
252
253
254
255





256
257
258
259
260
261
262

263
264
265
266
267
268
269
...
288
289
290
291
292
293
294



















295
296
297
298
299
300
301
.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 internal package implements the twelve standard validation types
shown below\&. The \fBvalidate\fR command of the parameter declaration
DSL can use these by name\&. Non-standard types have to provide a proper
command prefix instead\&.
.PP
Readers interested in writing their own custom validation types
should read \fICmdr - Writing custom validation types\fR\&.

.TP
boolean
Completable\&. Accepts a Tcl boolean\&.
.TP
identity
.TP
pass
................................................................................
.TP
rwfile
Completable\&. Accepts a read/writable file (path)\&.
.TP
rwpath
Completable\&. Accepts a read/writable path\&.
.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







>
>
>
>
>
|
|
|
|



>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
...
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
.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
.PP
Validation types are Cmdr's answer to the necessity of
moving between the string and internal representations of
\fBcmdr::parameter\fR instances\&.
.PP
This internal package implements the twelve standard validation
types shown below\&. The \fBvalidate\fR command of the parameter
declaration DSL can use these by name\&. Non-standard types have to
provide a proper command prefix instead\&.
.PP
Readers interested in writing their own custom validation types
should read \fICmdr - Writing custom validation types\fR\&.
.SH "STANDARD TYPES"
.TP
boolean
Completable\&. Accepts a Tcl boolean\&.
.TP
identity
.TP
pass
................................................................................
.TP
rwfile
Completable\&. Accepts a read/writable file (path)\&.
.TP
rwpath
Completable\&. Accepts a read/writable path\&.
.PP
.SH "STANDARD SELECTION RULES"
.PP
Because of the aformentioned 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 here\&.
.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
.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

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

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
...
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
Validation types are Cmdr's answer to the necessity of moving
between the string and internal representations of
\fBcmdr::parameter\fR 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\&.
.PP
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
................................................................................
.RS
.TP
\fBcmdr::parameter\fR \fIp\fR
The \fBcmdr::parameter\fR 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\&.
.TP
string \fIx\fR
The string value to complete\&.
.RE
.TP
\fB<v-type>\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







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<







271
272
273
274
275
276
277


















278
279
280
281
282
283
284
...
351
352
353
354
355
356
357



358
359
360
361
362
363
364
Validation types are Cmdr's answer to the necessity of moving
between the string and internal representations of
\fBcmdr::parameter\fR 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\&.


















.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
................................................................................
.RS
.TP
\fBcmdr::parameter\fR \fIp\fR
The \fBcmdr::parameter\fR 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\&.



.RE
.TP
\fB<v-type>\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

Changes to embedded/man/toc.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
274
275
276
277
278
279
280
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







|


|


|








|


|


|


|







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
doc
.RS
.TP
\fBcmdr\fR
\fIfiles/cmdr\&.n\fR: Cmdr - Main package and API
.TP
\fBcmdr::actor\fR
\fIfiles/cmdr_actor\&.n\fR: Cmdr - (Internal) Base class for officers and privates
.TP
\fBcmdr::config\fR
\fIfiles/cmdr_config\&.n\fR: Cmdr - (Partially internal) Collection of parameters for privates
.TP
\fBcmdr::help\fR
\fIfiles/cmdr_help\&.n\fR: Cmdr - (Internal) Utilities for help text formatting and setup
.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 - (Internal) Aggregation of multiple commands for dispatch\&.
.TP
\fBcmdr::parameter\fR
\fIfiles/cmdr_parameter\&.n\fR: Cmdr - (Partially internal) Command parameters
.TP
\fBcmdr::private\fR
\fIfiles/cmdr_private\&.n\fR: Cmdr - (Internal) Single command handling, options, and arguments
.TP
\fBcmdr::util\fR
\fIfiles/cmdr_util\&.n\fR: Cmdr - (Internal) General Utilities
.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

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::actor(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::actor - Cmdr - Base class for officers and privates - Internal</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::actor(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::actor - Cmdr - (Internal) Base class for officers and privates</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::config(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::config - Cmdr - Collection of parameters for privates</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::config(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::config - Cmdr - (Partially internal) Collection of parameters for privates</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::help(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::help - Cmdr - Utilities for help text formatting and setup - Internal</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::help(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::help - Cmdr - (Internal) Utilities for help text formatting and setup</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::officer(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::officer - Cmdr - Aggregation of multiple commands for dispatch.</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::officer(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::officer - Cmdr - (Internal) Aggregation of multiple commands for dispatch.</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::parameter(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::parameter - Cmdr - Command parameters</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::parameter(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::parameter - Cmdr - (Partially internal) Command parameters</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::private(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::private - Cmdr - Single command handling, options, and arguments</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::private(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::private - Cmdr - (Internal) Single command handling, options, and arguments</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Class API</a></li>

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

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::util(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::util - Cmdr - General Utilities - Internal</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">API</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
   <a href="../../../../../../home">Home</a>
| <a href="../../toc.html">Main Table Of Contents</a>
| <a href="../toc.html">Table Of Contents</a>
| <a href="../../index.html">Keyword Index</a>
 ] <hr>
<h1 class="title">cmdr::util(n) 0 doc &quot;Cmdr, a framework for command line parsing and dispatch&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>cmdr::util - Cmdr - (Internal) General Utilities</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">API</a></li>

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

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
...
156
157
158
159
160
161
162
163














164
165
166
167
168
169
170
<p>cmdr::validate - Cmdr - Standard validation types for parameters</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Bugs, Ideas, Feedback</a></li>


<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
................................................................................
<li>package require <b class="pkgname">cmdr::validate</b></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>



<p>This internal package implements the twelve standard validation types
shown below. The <b class="cmd">validate</b> command of the parameter declaration
DSL can use these by name. Non-standard types have to provide a proper
command prefix instead.</p>
<p>Readers interested in writing their own custom validation types
should read <i class="term"><a href="cmdr_vtypes.html">Cmdr - Writing custom validation types</a></i>.</p>


<dl class="definitions">
<dt>boolean</dt>
<dd><p>Completable. Accepts a Tcl boolean.</p></dd>
<dt>identity</dt>
<dd></dd>
<dt>pass</dt>
<dd></dd>
................................................................................
<dd><p>Completable. Accepts a read/writable directory (path).</p></dd>
<dt>rwfile</dt>
<dd><p>Completable. Accepts a read/writable file (path).</p></dd>
<dt>rwpath</dt>
<dd><p>Completable. Accepts a read/writable path.</p></dd>
</dl>
</div>
<div id="section2" class="section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>














<p>Both the package(s) and this documentation will undoubtedly contain
bugs and other problems.
Please report such at
<a href="https:/core.tcl.tk/akupries/cmdr">Cmdr Tickets</a>.</p>
<p>Please also report any ideas you may have for enhancements of
either package(s) and/or documentation.</p>
</div>







|
>
>







 







>
>
>
|
|
|
|


>
>







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
...
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
<p>cmdr::validate - Cmdr - Standard validation types for parameters</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Standard Types</a></li>
<li class="section"><a href="#section3">Standard Selection Rules</a></li>
<li class="section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
................................................................................
<li>package require <b class="pkgname">cmdr::validate</b></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>
<p>Validation types are Cmdr's answer to the necessity of
moving between the string and internal representations of
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> instances.</p>
<p>This internal package implements the twelve standard validation
types shown below. The <b class="cmd">validate</b> command of the parameter
declaration DSL can use these by name. Non-standard types have to
provide a proper command prefix instead.</p>
<p>Readers interested in writing their own custom validation types
should read <i class="term"><a href="cmdr_vtypes.html">Cmdr - Writing custom validation types</a></i>.</p>
</div>
<div id="section2" class="section"><h2><a name="section2">Standard Types</a></h2>
<dl class="definitions">
<dt>boolean</dt>
<dd><p>Completable. Accepts a Tcl boolean.</p></dd>
<dt>identity</dt>
<dd></dd>
<dt>pass</dt>
<dd></dd>
................................................................................
<dd><p>Completable. Accepts a read/writable directory (path).</p></dd>
<dt>rwfile</dt>
<dd><p>Completable. Accepts a read/writable file (path).</p></dd>
<dt>rwpath</dt>
<dd><p>Completable. Accepts a read/writable path.</p></dd>
</dl>
</div>
<div id="section3" class="section"><h2><a name="section3">Standard Selection Rules</a></h2>
<p>Because of the aformentioned 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 here.</p>
<ol class="enumerated">
<li><p>Use <b class="const">identity</b> if a  <b class="cmd">generate</b> callback is specified.</p></li>
<li><p>Use <b class="const">boolean</b>  if no <b class="cmd">default</b> is specified and the parameter is an <i class="term">option</i>.</p></li>
<li><p>Use <b class="const">identity</b> if no <b class="cmd">default</b> is specified and the parameter is an <i class="term">input</i>.</p></li>
<li><p>Use <b class="const">boolean</b>  if the specified <b class="cmd">default</b> value is a Tcl boolean.</p></li>
<li><p>Use <b class="const">integer</b>  if the specified <b class="cmd">default</b> value is a Tcl integer.</p></li>
<li><p>Use <b class="const">identity</b> as fallback of last resort.</p></li>
</ol>
</div>
<div id="section4" class="section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>Both the package(s) and this documentation will undoubtedly contain
bugs and other problems.
Please report such at
<a href="https:/core.tcl.tk/akupries/cmdr">Cmdr Tickets</a>.</p>
<p>Please also report any ideas you may have for enhancements of
either package(s) and/or documentation.</p>
</div>

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

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
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<p>Validation types are Cmdr's answer to the necessity of moving
between the string and internal representations of
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> 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.</p>
<p>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 <i class="term"><a href="cmdr_validate.html">Cmdr - Standard validation types for parameters</a></i>.</p>
<ol class="enumerated">
<li><p>Use <b class="const">identity</b> if a  <b class="cmd">generate</b> callback is specified.</p></li>
<li><p>Use <b class="const">boolean</b>  if no <b class="cmd">default</b> is specified and the parameter is an <i class="term">option</i>.</p></li>
<li><p>Use <b class="const">identity</b> if no <b class="cmd">default</b> is specified and the parameter is an <i class="term">input</i>.</p></li>
<li><p>Use <b class="const">boolean</b>  if the specified <b class="cmd">default</b> value is a Tcl boolean.</p></li>
<li><p>Use <b class="const">integer</b>  if the specified <b class="cmd">default</b> value is a Tcl integer.</p></li>
<li><p>Use <b class="const">identity</b> as fallback of last resort.</p></li>
</ol>
<p>The general concept of <i class="term">validation types</i> was taken from
package <b class="package">snit</b>, and modified to suit Cmdr.
Where <b class="package">snit</b>'s types expect only a single method to validate
the input we expect all types to support an ensemble of <em>four</em>
methods.
One for the basic validation and transformation of the string, another
for the release of any internal representation so generated, plus two
................................................................................
the type and parameter instance <i class="arg">p</i>.</p>
<dl class="arguments">
<dt><b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> <i class="arg">p</i></dt>
<dd><p>The <b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> 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.</p></dd>
<dt>string <i class="arg">x</i></dt>
<dd><p>The string value to complete.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">&lt;v-type&gt;</b> <b class="method">release</b> <i class="arg">p</i> <i class="arg">x</i></a></dt>
<dd><p>This method is invoked when the framework has to get rid of an
internal representation for a parameter.</p>
<p>It has to release any resources associated with the internal
representation <i class="arg">x</i> of parameter instance <i class="arg">p</i>.</p>
<p>Note that the result of this method, if there is any, is







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







148
149
150
151
152
153
154












155
156
157
158
159
160
161
...
217
218
219
220
221
222
223


224
225
226
227
228
229
230
<p>Validation types are Cmdr's answer to the necessity of moving
between the string and internal representations of
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> 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.</p>












<p>The general concept of <i class="term">validation types</i> was taken from
package <b class="package">snit</b>, and modified to suit Cmdr.
Where <b class="package">snit</b>'s types expect only a single method to validate
the input we expect all types to support an ensemble of <em>four</em>
methods.
One for the basic validation and transformation of the string, another
for the release of any internal representation so generated, plus two
................................................................................
the type and parameter instance <i class="arg">p</i>.</p>
<dl class="arguments">
<dt><b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> <i class="arg">p</i></dt>
<dd><p>The <b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> 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.</p></dd>


</dl></dd>
<dt><a name="3"><b class="cmd">&lt;v-type&gt;</b> <b class="method">release</b> <i class="arg">p</i> <i class="arg">x</i></a></dt>
<dd><p>This method is invoked when the framework has to get rid of an
internal representation for a parameter.</p>
<p>It has to release any resources associated with the internal
representation <i class="arg">x</i> of parameter instance <i class="arg">p</i>.</p>
<p>Note that the result of this method, if there is any, is

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

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
<table class="#toc">
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr.html">cmdr</a></td>
<td class="#tocright">Cmdr - Main package and API</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_actor.html">cmdr::actor</a></td>
<td class="#tocright">Cmdr - Base class for officers and privates - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_config.html">cmdr::config</a></td>
<td class="#tocright">Cmdr - Collection of parameters for privates</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_help.html">cmdr::help</a></td>
<td class="#tocright">Cmdr - Utilities for help text formatting and setup - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_help_json.html">cmdr::help::json</a></td>
<td class="#tocright">Cmdr - Formatting help as JSON object</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_help_sql.html">cmdr::help::sql</a></td>
<td class="#tocright">Cmdr - Formatting help as series of SQL commands</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_officer.html">cmdr::officer</a></td>
<td class="#tocright">Cmdr - Aggregation of multiple commands for dispatch.</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_parameter.html">cmdr::parameter</a></td>
<td class="#tocright">Cmdr - Command parameters</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_private.html">cmdr::private</a></td>
<td class="#tocright">Cmdr - Single command handling, options, and arguments</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_util.html">cmdr::util</a></td>
<td class="#tocright">Cmdr - General Utilities - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_validate.html">cmdr::validate</a></td>
<td class="#tocright">Cmdr - Standard validation types for parameters</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_vcommon.html">cmdr::validate::common</a></td>







|



|



|











|



|



|



|







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
<table class="#toc">
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr.html">cmdr</a></td>
<td class="#tocright">Cmdr - Main package and API</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_actor.html">cmdr::actor</a></td>
<td class="#tocright">Cmdr - (Internal) Base class for officers and privates</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_config.html">cmdr::config</a></td>
<td class="#tocright">Cmdr - (Partially internal) Collection of parameters for privates</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_help.html">cmdr::help</a></td>
<td class="#tocright">Cmdr - (Internal) Utilities for help text formatting and setup</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_help_json.html">cmdr::help::json</a></td>
<td class="#tocright">Cmdr - Formatting help as JSON object</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_help_sql.html">cmdr::help::sql</a></td>
<td class="#tocright">Cmdr - Formatting help as series of SQL commands</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_officer.html">cmdr::officer</a></td>
<td class="#tocright">Cmdr - (Internal) Aggregation of multiple commands for dispatch.</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_parameter.html">cmdr::parameter</a></td>
<td class="#tocright">Cmdr - (Partially internal) Command parameters</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_private.html">cmdr::private</a></td>
<td class="#tocright">Cmdr - (Internal) Single command handling, options, and arguments</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_util.html">cmdr::util</a></td>
<td class="#tocright">Cmdr - (Internal) General Utilities</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="files/cmdr_validate.html">cmdr::validate</a></td>
<td class="#tocright">Cmdr - Standard validation types for parameters</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="files/cmdr_vcommon.html">cmdr::validate::common</a></td>

Changes to embedded/www/toc.html.

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
<table class="#toc">
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr.html">cmdr</a></td>
<td class="#tocright">Cmdr - Main package and API</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_actor.html">cmdr::actor</a></td>
<td class="#tocright">Cmdr - Base class for officers and privates - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_config.html">cmdr::config</a></td>
<td class="#tocright">Cmdr - Collection of parameters for privates</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_help.html">cmdr::help</a></td>
<td class="#tocright">Cmdr - Utilities for help text formatting and setup - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_help_json.html">cmdr::help::json</a></td>
<td class="#tocright">Cmdr - Formatting help as JSON object</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_help_sql.html">cmdr::help::sql</a></td>
<td class="#tocright">Cmdr - Formatting help as series of SQL commands</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_officer.html">cmdr::officer</a></td>
<td class="#tocright">Cmdr - Aggregation of multiple commands for dispatch.</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_parameter.html">cmdr::parameter</a></td>
<td class="#tocright">Cmdr - Command parameters</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_private.html">cmdr::private</a></td>
<td class="#tocright">Cmdr - Single command handling, options, and arguments</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_util.html">cmdr::util</a></td>
<td class="#tocright">Cmdr - General Utilities - Internal</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_validate.html">cmdr::validate</a></td>
<td class="#tocright">Cmdr - Standard validation types for parameters</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_vcommon.html">cmdr::validate::common</a></td>







|



|



|











|



|



|



|







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
<table class="#toc">
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr.html">cmdr</a></td>
<td class="#tocright">Cmdr - Main package and API</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_actor.html">cmdr::actor</a></td>
<td class="#tocright">Cmdr - (Internal) Base class for officers and privates</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_config.html">cmdr::config</a></td>
<td class="#tocright">Cmdr - (Partially internal) Collection of parameters for privates</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_help.html">cmdr::help</a></td>
<td class="#tocright">Cmdr - (Internal) Utilities for help text formatting and setup</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_help_json.html">cmdr::help::json</a></td>
<td class="#tocright">Cmdr - Formatting help as JSON object</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_help_sql.html">cmdr::help::sql</a></td>
<td class="#tocright">Cmdr - Formatting help as series of SQL commands</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_officer.html">cmdr::officer</a></td>
<td class="#tocright">Cmdr - (Internal) Aggregation of multiple commands for dispatch.</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_parameter.html">cmdr::parameter</a></td>
<td class="#tocright">Cmdr - (Partially internal) Command parameters</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_private.html">cmdr::private</a></td>
<td class="#tocright">Cmdr - (Internal) Single command handling, options, and arguments</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_util.html">cmdr::util</a></td>
<td class="#tocright">Cmdr - (Internal) General Utilities</td>
</tr>
<tr class="#toceven" >
<td class="#tocleft" ><a href="doc/files/cmdr_validate.html">cmdr::validate</a></td>
<td class="#tocright">Cmdr - Standard validation types for parameters</td>
</tr>
<tr class="#tocodd"  >
<td class="#tocleft" ><a href="doc/files/cmdr_vcommon.html">cmdr::validate::common</a></td>