File 'lib/class.cls' (part of 'AutoDOC')

Description (short)
Classes
Written by
Andreas Kupries
Description
Management of classes.
Keywords
classes

Class 'classDescription'

Description
This class manages the properties of a single class.
Superclasses
azIndexEntry
problemsAndIndex
Options
file
spec
inline
log
psort
ptable
Methods
public
ComponentDescriptionList ()
ComponentList ()
DependencyList ()
GetInheritedEntities ()
GetPartRecord (code name)
MethodList ()
OptionDescriptionList ()
OptionList ()
PostProcessInformation ()
ScanMethods ()
SetupAnchors ()
SuperclassList ()
VarDescriptionList ()
VarList ()
WriteHeading ()
WriteMethods ()
author ()
authorSet (author)
classDescription ()
clear ()
completeKwIndex (phrases)
dependencies (internal)
firstLetter ()
formatComponentList (reqVisibility)
formatMethodList (mlist)
formatVarList (reqVisibility)
getMRef (name)
getORef (name)
getOvDescription (which oclass name)
getPage ()
getVRef (name)
hasMRef (name)
hasVariable (name)
itk_component (itk_component add args)
keywords ()
mref (name)
oref (name)
privateComponents ()
privateMembers ()
privateMethods ()
procByName (name)
protectedComponents ()
protectedMembers ()
protectedMethods ()
publicComponents ()
publicMembers ()
publicMethods ()
refError (what name)
scan ()
sortMethods (mlist)
superclasses ()
variableHasConfig (name)
vref (name)
write ()
writeProblemPage ()
Membervariables
public
listtype
methods
imethods
partInfo
visibility
options
ioptions
variables
ivariables
components
superclasses
scObj
keywords
comment
danger
note
seeAlso
authorName
authorAddress
dependencies
bug
date
version
example
anchor
ovComment
mref
oref
vref
vinfo

Options

-file
Handle of the fileDescription object containing the class
-spec
Full text of class definition script
-inline
Boolean flag. Setting it causes inlining the class documentation into the file page.
default value: 0
-log
Handle of the syslogConnection object to use for logging
-psort
Boolean flag. Setting causes the generation of an alphabetically sorted list of method documentation.
default value: 1
-ptable
Boolean flag. Setting it causes the usage of tables for method documentation. A definition list is used else.

Methods

ComponentDescriptionList ()

Internal method, generates a definition list containing the descriptions of all defined components.

ComponentList ()

Internal method, generates a string containing references to all component descriptions.

DependencyList ()

Internal method, generates a string containing references to the packages required by the class.
Returns: A string containing a comma separated list of package names, each a hyperlink to a location describing the it.

GetInheritedEntities ()

Used during the writing of the class description to obtain the information about all inherited variables, options and methods.

GetPartRecord (code name)

Argument: code Internal type code of the part. These are method, option and variable.
Argument: name The name of the method to search for.
Returns: class and method object of the method name, or an empty list.

MethodList ()

Notes: This method assumes that it is called only if there are methods defined. This assumption allowed simplification of the internal logic.
Returns: a formatted string of short references to the methods defined in the class.

OptionDescriptionList ()

Internal method, generates a definition list containing the descriptions of all defined options.

OptionList ()

Internal method, generates a string containing references to the option descriptions.
Returns: A string containing a comma separated list of option names, each a hyperlink to the associated description.

PostProcessInformation ()

Called to streamline the extracted embedded documentation. This mainly consists of removing superfluous whitespace. Additionally converts a comma separated list of index phrases into a real tcl list.

ScanMethods ()

Internal method. Called to scan the definitions of all methods of this class.

SetupAnchors ()

Internal method. Initializes the anchor array for all options and variables.

SuperclassList ()

Internal method, generates a string containing references to the superclass descriptions.
Returns: A string containing a comma separated list of superclass names, each a hyperlink to the associated description.

VarDescriptionList ()

Internal method, generates a definition list containing the descriptions of all defined variables.

VarList ()

Internal method, generates a string containing references to all member descriptions.

WriteHeading ()

Generates the header part of a class description.

WriteMethods ()

Internal method used by the page generator routine (write) to produce the output for all methods. Uses different separator rules dependent on the setting of ptable.

author ()

Returns: The author of the class

authorSet (author)

Called by the containing file to propagate its author information.
Argument: author Author of containing file.

classDescription ()

Constructor. Initializes the parser functionality in lib/classParse.tcl. Also adds the class to the containing namespace.

clear ()

Overrides problemsAndIndex:clear
Resets state information.

completeKwIndex (phrases)

Called by the containing file to propagate its indexing information. Completes the indexing of key phrases, propagates class information down to all methods without index phrases, then uses the union of all index phrases for the whole class.
Argument: phrases List of index phrases used by the containing file.

dependencies (internal)

Determines all dependencies of this class.
Argument: internal list of packages distributed here, to be removed from all dependency lists.
Returns: List containing all dependencies of this class.

firstLetter ()

Overrides azIndexEntry:firstLetter
Returns: the first letter of the name of this index entry.

formatComponentList (reqVisibility)

Internal method, generates a string containing references to the component descriptions with the specified visibility.
Argument: reqVisibility The visibility of the components to look at.
Returns: A string containing a comma separated list of component names, each a hyperlink to the associated description.

formatMethodList (mlist)

Takes a list of methods and returns a formatted string of references.
Argument: mlist The list of method objects to format.
Returns: a formatted string of references to the given methods.

formatVarList (reqVisibility)

Internal method, generates a string containing references to the variable descriptions.
Argument: reqVisibility The visibility of the members to look at.
Returns: A string containing a comma separated list of variable names, each a hyperlink to the associated description.

getMRef (name)

Determines wether name is a method of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

getORef (name)

Determines wether name is an option of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

getOvDescription (which oclass name)

Argument: which A code indicating the type of name. 'v' for variable, 'o' for option.
Argument: oclass Output class to use for markup.
Argument: name The name of the option/variable to look up.
Returns: The description of the specified option or variable.

getPage ()

Returns: The url of the page containing the class description.

getVRef (name)

Determines wether name is a member variable of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

hasMRef (name)

Determines wether name is a method of the class or not.
Argument: name The name to look for.
Returns: a boolean value. True if the method exists, else false.

hasVariable (name)

Checks for existence of the named variable in the class.
Argument: name Name of the variable to check.
Returns: A boolean value, 1 if the variable exists and 0 else.

itk_component (itk_component add args)

Special method to handle itk_components embedded into methods of a class. Is called by procDescription:scan if the object in question is not a procedure but a method. The scan in question originates either from the handling of detached methods in fileDescription:scan or from the immediate scan of non-detached methods.
Argument: itk_component Ignored. Dummy argument containing the name of the original command, 'itk_component'.
Argument: add Dummy argument, ignored.
Argument: args ?-public|-protected|-private? name wtypedef ?code?

keywords ()

Returns: The list of kywords the class is indexed under.

mref (name)

Determines wether name is a method of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

oref (name)

Determines wether name is an option of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

privateComponents ()

Returns: The list of the private components of the class.

privateMembers ()

Returns: The list of the private members of the class.

privateMethods ()

Returns: The list of procDescription objects which represent the private methods of the class.

procByName (name)

Argument: name The name of the method requested by the caller.
Returns: the object describing the named method or an empty list.

protectedComponents ()

Returns: The list of the protected components of the class.

protectedMembers ()

Returns: The list of the protected members of the class.

protectedMethods ()

Returns: The list of procDescription objects which represent the protected methods of the class.

publicComponents ()

Returns: The list of the public components of the class.

publicMembers ()

Returns: The list of the public members of the class.

publicMethods ()

Returns: The list of procDescription objects which represent the public methods of the class.

refError (what name)

Argument: what The type of the referenced entity.
Argument: name The name of the unknown entity.
Returns: A string formatted as error for cross references to unknown methods or options. Additionally adds the error to the list of problems associated to the entity containing the bogus cross reference.

scan ()

Scans the specification of the class for embedded documentation and definitions (members, methods and options)

sortMethods (mlist)

Argument: mlist The list of method objects to sort.
Returns: the specified list of methods sorted acccording to the configured sorting option.

superclasses ()

Returns: the list of superclasses for the class. Actually a list of classDescription objects.

variableHasConfig (name)

Marks the named variable as one having a config-body associated with them.
Argument: name Name of the variable to mark.

vref (name)

Determines wether name is a member variable of the class or not.
Argument: name The name to look for.
Returns: A link to the page containing the definition, or the name marked as error.

write ()

Generates the formatted text describing the class.

writeProblemPage ()

Writes a page containing the detailed problem description of this class.


Membervariables

listtype
Either one of comma or par. Defines the appearance of the lists used to reference superclasses, options, methods and member variables. Takes its value from distribution:clisttype.
methods
List of defined methods. Actually contains the handles of their procDescription objects, not their names.
imethods
List of inherited methods. Actually contains the handles of their procDescription objects, not their names.
partInfo
Maps from part names to the class object they are defined in and their own object (or other information usable to build an exact link).
visibility
Maps from visibility keywords to the list of methods with that visibility.
initial value: p,public {} p,protected {} p,private {} v,public {} v,protected {} v,private {} c,public {} c,protected {} c,private {}
options
List of defined options. Each element is a 2-element list containing configbody flag and the name of the option.
ioptions
List of inherited options. Contains their names.
variables
List of defined variables. Each element is a 4-element list containing usage, visibility, configbody flag and the name of the variable.
ivariables
List of inherited variables. Contains their names.
components
List of defined components. Items are lists containing widgettype and name of the component, in this order.
superclasses
List of superclasses used by this class. Contains their names.
scObj
See superclasses, but a list of the classDescription objects instead. Superclasses coming from external packages (and thus having no object here) are not listed !
initial value: @@
keywords
List of keywords associated to the class (by @index).
comment
Description of class, as given by @comment.
danger
Description of dangers in usage of the class, as given by @danger.
note
Notes about usage of the class, as given by @note.
seeAlso
Crossreferences as given by @see.
authorName
Name of author, may contain a mail-address too. Specified via @author.
authorAddress
Mail address of author, as extracted from authorName.
dependencies
List of packages required by the class.
bug
Description of bugs associated to the class.
date
Dates associated with the class.
version
Version information associated with the class.
example
Example associated with the class.
anchor
Map of anchors used to generate references between the list of options and variables at the top of the class description and their descriptions below. 'v,*' refers to variable anchors, 'o,*' to the options.
ovComment
Map from options and variables to their descriptions as given via @option and @var. 'v,*' refers to variable descriptions, 'o,*' to the options.
mref
See indexBase:refs and classIndex:mref. Used here for methods.
oref
See indexBase:refs and classIndex:oref. Used here for options.
vref
See indexBase:refs and classIndex:vref. Used here for member variables.
vinfo
Additional information for variables. Currently maps only to a flag indicating wether the variable has a config body associated with it or not. A variable without this flag has no config body too.

Generated by AutoDoc 2.4 at 09/28/2001, invoked by Andreas Kupries,,,