home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
genlink.tcl
< prev
next >
Wrap
Text File
|
1996-10-10
|
2KB
|
88 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)genlink.tcl 1.4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)genlink.tcl 1.4 05 Apr 1996 Copyright 1994 Westmount Technology
# Start user added include file section
# End user added include file section
Class GenLink : {Object} {
method destructor
constructor
method getDocStructure
method match
method getStructureLine
attribute document
}
method GenLink::destructor {this} {
# Start destructor user section
# End destructor user section
}
constructor GenLink {class this name document} {
set this [Object::constructor $class $this $name]
$this document $document
# Start constructor user section
# End constructor user section
return $this
}
method GenLink::getDocStructure {this fileTypes} {
set structure ""
set first 1
set sv [[$this document] documentedSystem]
if [$sv isNil] {
wmtkerror "Invalid documented system"
return $structure
}
foreach fv [$sv localFileVersions] {
if [$this match $fileTypes $fv] {
set structureLine [$this getStructureLine $fv $first]
if {$first == "1"} {
set structure $structureLine
} else {
set structure "$structure\n$structureLine"
}
set first 0
}
}
return $structure
}
method GenLink::match {this fileTypes fileVersion} {
if {[lsearch $fileTypes [[$fileVersion file] type]] == -1} {
return 0
}
return 1
}
method GenLink::getStructureLine {this fileVersion first} {
set indent "="
if {$first == "1"} {
set indent "+"
}
set name [[$fileVersion file] qualifiedName :]
set type [[$fileVersion file] type]
set line "${name}_$type | $indent | | $type | | | $fileVersion"
return $line
}
# Do not delete this line -- regeneration end marker