The Simple Development Library item components 

Table of contents

1. Introduction
2. SimpleDevLib programs, packages, classes, procedures and methods
3. SimpleDevLib errors
4. SimpleDevLib types
5. SimpleDevLib variables, package options, attributes and [incr Tk] options
6. SimpleDevLib program options
7. SimpleDevLib [incr Tk] components
8. Copyright

1. Introduction

SimpleDevLib allows to declare code items (such as packages and procedures). Items contain components. Components can be either functional (required for the item to work, such as a procedure argument default value and body) or informational (metadata, such as the procedure argument descriptions).

The following sections summarize all SimpleDevLib items and components. The tables in each section contain a number of similar columns. The first column Component contains either the item names (between parenthesis, the first row or rows in each table) or the component names. The second column Type is SimpleDevLib type (as given by the SimpleType package) for the item or component. The following column or columns, depending on the table, refer to each item in that table, and either contain an 'X' or are empty depending on whether that component (row) applies to that item (column). After that, the columns Description, Default, Use and Comments columns contains, for each item, a description, its default value, a note on their use and some comments, respectively.

2. SimpleDevLib programs, packages, classes, procedures and methods

Component Type Program Package Procedure Class Method Description Default Use Comments
(program) unqualifiedname X Program name
(package) unqualifiedname X Package name
(procedure) commandname X Procedure name The name must be fully qualified if part of package and unqualified if part of class
(class) name X Class name The name must be fully qualified if part of package
(method) unqualifiedcommandname X Method name
version version X X X X X Item version 1.0 Informational except for packages where it is used by the package handling mechanism and for programs where it is displayed by the program '--version' command line option
project string X X X X Item project Informational
synopsis string X X X X X Item one line description Informational Mandatory for all items except for class constructors and destructors for which it is not allowed
module choice X Package module definition Informational One of 'definition', 'test', 'extra' or 'demonstration'
overview string X X X X X Item multi-line overview Informational
usage string X X X Item usage message Informational
exitstatus string X Program exit status Informational
api string X X Item API Informational
help string X Program command line help message Displayed by the program '--help' command line option
exportedcommands qualifiedname-list X Package list of exported commands Must include all package commands whose access is 'exported' (see -access)
aliases list X Package list of aliases Must include all aliased package commands (see -alias) Alias are given in the format {aliasName aliasedCommand}
access choice X X Item access mode public' for commands unless their namespace is private (those whose name match 'Priv*') case in which it is 'private'. 'public' for methods except for destructors, for which it is 'protected' exported' procedures are exported from their namespace. 'exported' package commands must appear in the package exported commands list (see -exportedcommands). 'private' procedures can live in private namespaces only (those whose name match 'Priv*). for methods, the [incr Tcl] access modes are honored One of 'public', 'private' or 'exported' for procedures. One of 'public', 'protected' or 'private' for methods
alias name X Command alias The alias is created. Aliased package commands must appear in the package aliases list (see -aliases)
arguments extendedarg-list X X Item arguments Used as command or method arguments
returns string X X Item return value Informational
parseflags extbool X X Whether to enable flag parsing or delegate it to the user true Enables or disables this item automatic flag arguments parsing
checktype extbool X X Whether to enable argument run-time type checking false Enables or disables this item argument run-time type checking
keywords word-list X X X X X Item keywords Informational
examples string X X X X X Examples on how to use the item Informational except for programs where it is displayed by the program '--examples' command line option
paradigm choice X Package paradigm procedural Only packages whose paradigm is 'object' can contain class definitions One of 'procedural' or 'object'
namespaces namespace-list X Package namespaces The package namespaces are created/deleted upon declaring/undeclaring a package. All package items (classes, commands, ) must live in the package namespaces
classtype type X Class type name A type is created whose allowed values are objects of the class
stereotype choice X Class stereotype multiobject singleton' classes are given a default constructor which allows to instantiate a single error. 'abstract' classes are given a constructor which does not allow to create any object for the class One of 'multiobject', 'abstract' or 'singleton'
extends qualifiedname-list X List of classes from which this class inherits The class inherits from the given classes
error declaration X X X Error declaration Used to declare the error See SimpleDevLib errors
type declaration X X Type declaration Used to declare the type See SimpleDevLib types
class declaration X Class declaration Used to declare the class
variable declaration X X X Variable declaration Used to declare the variable
attribute declaration X Class attribute declaration Used to declare the attribute See SimpleDevLib variables, package options, attributes and [incr Tk] options
itkoption declaration X [incr Tk] option declaration Used to declare the [incr Tk] option See SimpleDevLib variables, package options, attributes and [incr Tk] options
itkcomponent declaration X [incr Tk] item declaration Used to declare the [incr Tk] item See SimpleDevLib [incr Tk] components
command declaration X X X Command declaration Used to declare the command
method declaration X Class method declaration Used to declare the method
option declaration X X Package option or program command line option declaration Used to declare the options, used in turn by the configure and cget commands for packages, or as part of the command line option handling for programs See SimpleDevLib variables, package options, attributes and [incr Tk] options for package options or SimpleDevLib program options for program options
optionusage list X Program command line options usage Used to specify the program command line options usage
requisites packagerequisite-list X X Item package requisites The package requisites are required
assumptions string X X X X X Item assumptions Informational
resources string X X X X X Item required resources Informational
limitations string X X X X X Item limitations Informational
effects string X X X X Item effects outside its scope Informational Item effects outside its scope, such as variables modified thorugh upvar, those of evaluated scripts, or items (command, variables, namespaces, aliases, ...) creations or deletions
details string X X X X X Item implementation details Informational
references string X X X X X Item references Informational
remarks string X X X X X Item remarks Informational
todo string X X X X X Item to do list Informational
cmid string X X Item configuration management identification Informational
sprs string X X Item software problem reports Informational
smrs string X X Item software modification reports Informational
history string X X X X X Item history Informational
copyright string X X X X X Item copyright notice Informational
install script X Package install script The script gets evaluated upon package installation
uninstall script X Package uninstall script The script gets evaluated upon package uninstallation
firsttimeinstall script X Package first time install script The script gets evaluated upon package first time installation
init script X Constructor script used to invoke base class constructors The script gets evaluated before the constructor body
body script X X X X Item body The script gets evaluated when the program, command or method is invoked or when the class is declared

3. SimpleDevLib errors

Component Type Error Description Default Use Comments
(errorcode) errorcode X Error code
message formatstring X Error message format string Error message thrown
explanation string X Error explanation See the ::Simple::Error::explain procedure
corrective string X Corrective action See the ::Simple::Error::explain procedure
explained string X Formatted error message See the ::Simple::Error::explain procedure
translation string X Translation string See the ::Simple::Error::explain procedure

4. SimpleDevLib types

Component Type Type Description Default Use Comments
(type) type X Type name
description string X Type description Informational
matchingscript script X Type matching script return 1 Used to check whether a value conforms to the type

5. SimpleDevLib variables, package options, attributes and [incr Tk] options

Component Type Program or package variable Package option Class variable Attribute [incr Tk] option Description Default Use Comments
(variable) variablename X X Variable name The name must be fully qualified if part of package and unqualified if part of program or part of class
(option) flag X
(attribute) unqualifiedvariablename X
(itkoption) unqualifiedvariablename X
description string X X X X Item description Informational
access choice X X Item access mode The [incr Tcl] access modes are honored One of 'public', 'protected' or 'private'
monitortype extbool X X X X X Whether to enable run-time type monitoring false Enables or disables this item run-time type monitoring
type type X X X X X Item type any Used if run-time type monitoring is enabled for this item
choices any-list X X X X X List of choices for 'choice' type and its derivations Used if run-time type monitoring is enabled for this item of type 'choice' or derived from it
value any X X X X X Item value Initial (default) value for the item
resourcename word X Resource name the name of the [incr Tk] option Used via the itk_option define command
resourceclass word X Resource class the capitalised name of the [incr Tk] option Used via the itk_option define command
configbody script X X Configuration body The script gets evaluated upon item configuration using the configure method [incr Tk] options and public variable only

6. SimpleDevLib program options

Component Type Program option Description Default Use Comments
(options) flag-list X Primary option flag and optional secondary option flag
name word Option name Used in the options usage string and other references to the option
type type Option values type any Used to check the conformance of the option parameters
range number-range Option values numeric range : Used to check the conformance of the option parameters
choices any-list List of choices for 'choice' type and its derivations Used to check the conformance of the option parameters
default any Option default value Default parameter for the option
values decimal-range Number of values range 1 Used to check the conformance of the option parameters
description string Option description Informational

7. SimpleDevLib [incr Tk] components

Tag Type [incr Tk] item Description Default Use Comments
(component) unqualifiedname X [incr Tk] component name
description string X [incr Tk] component description Informational
access choice X [incr Tk] component mode The [incr Tcl] access modes are honored One of 'public', 'protected' or 'private'
ignore flag-list X Options to ignore for the megawidget Used via the itk_component add command
keep flag-list X Options to keep for the megawidget Used via the itk_component add command
rename list X Options to rename for the megawidget Used via the itk_component add command
resourceclass word X Resource class Button Informational
body script X [incr Tk] component body The script gets evaluated upon [incr Tk] component creation The script must return the window path name for the new component widget

8. Copyright

Copyright (C) 1999-2005, Juan C. Gil mailto:jgil@gmv.es.