XOTcl - Documentation -- ./library/lib/metadataAnalyzer.xotcl

# ./library/lib/metadataAnalyzer.xotcl

## Package/File Information

No package provided/required
Defined Objects/Classes:

- @:
- AnalyzerCmd:
- ClassToken:
- ConstraintToken:
- FileToken:
- InstprocToken:
- MetaClassToken:
- MetadataAnalyzer: print.
- MetadataToken: print, printProperties, sortTokenList.
- MethodToken:
- ObjToken:
- PackageToken:
- ProcToken:

Filename: ./library/lib/metadataAnalyzer.xotcl

Description: | XOTcl file analyzer for @ metadata. E.g.\ used for doumentation with xoDoc (but in the static variant StaticMetadataAnalyzer which uses the dynamic variant in this file). Sample sample usage:
    	    package require xotcl::metadataAnalyzer

    	    # instantiate metadata analyzer object
    	    MetadataAnalyzer @::m
    	    # make this object be known to @ and turn @ metadata processing on
    	    @ analyzerObj @::m
    	    @ onOff 1

    	    # read in some metadata tags (in sample file) & execute the file
    	    source lib/testx.xotcl

    	    # turn @ metadata processing off again
    	    @ onOff 0

    	    # print out all collected metadata
    	    puts [@::m print]

## Object: @

Class: AnalyzerCmd

Description: | Recreate @ with metadata analysis functionality.

## Class: AnalyzerCmd

Class: Class

Description: | Class that overload the unknown mechanism of @ to provide metadata analysis.

## Class: ClassToken

Class: Class
Heritage: ObjToken

Description: | Token for Class metadata. Contains additional parameters: "instprocList" = list of all instproc token.

## Class: ConstraintToken

Class: Class
Heritage: MetadataToken

Description: | Token for @Constraint Metadata.

## Class: FileToken

Class: Class
Heritage: MetadataToken

Description: | Token for @File Metadata.

## Class: InstprocToken

Class: Class
Heritage: MethodToken

Description: | Token for Instproc metadata.

## Class: MetaClassToken

Class: Class
Heritage: ClassToken

Description: | Token for Meta-Class metadata.

## Class: MetadataAnalyzer

Class: Class
Procs/Instprocs: print.

Description: | Handler class for building a metadata runtime structure

### Instprocs

- print

  Description: | Print all collected token information to stdout. This method is also an example how the tokens can be used.

## Class: MetadataToken

Class: Class
Procs/Instprocs: print, printProperties, sortTokenList.

Description: | Each collected metadata element is stored in a token object. MetadataToken is superclass of token object classes. Each metadata token has two interesting parameters: "properties" contains list of all described metadata properties. E.g. can be printed with
    	    foreach p [my set properties] {
    		if {[my exists $p]} {
    		    append c "    $p=[my set $p]\n"
    		}
    	    }
"name" contains the method, object, ... name of the metadata element. All metadata token are aggregated by @. Therefore,
    	    foreach mdt [@ info children] {
    		if {[$mdt istype MetadataToken]} {$mdt print}
    	    }
prints all token.

### Instprocs

- printProperties

  Description: | Print metadata properties to stdout.

- abstract print

  Description: | Abstract method for printing a token to stdout.

### Procs

- sortTokenList l

  Arguments: | l: token list
  Description: | Sort a token list with names. Since names are autonames, this means order of appearance in the program.

## Class: MethodToken

Class: Class
Heritage: MetadataToken

Description: | Token for Method metadata. Contains additional parameters: "arguments" of the method, "returnValue" of the method, "obj" name, "abstract" = 0 or 1 (whether its an abstract method or not).

## Class: ObjToken

Class: Class
Heritage: MetadataToken

Description: | Token for Object metadata. Contains additional parameters: "procList" = list of all proc token and "cl"= class name.

## Class: PackageToken

Class: Class
Heritage: MetadataToken

Description: | Token for Package metadata. Contains additional parameters: "version" of the package and "type"= either "require" or "provide".

## Class: ProcToken

Class: Class
Heritage: MethodToken

Description: | Token for Proc metadata

Back to index page.