home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
genlinkext.tcl
< prev
next >
Wrap
Text File
|
1997-10-13
|
2KB
|
86 lines
Class GenLinkExtended : {Object} {
method destructor
constructor
method getDocStructure
method match
method getDiagramLine
method getPropertyLine
attribute document
}
method GenLinkExtended::destructor {this} {
# Start destructor user section
# End destructor user section
}
constructor GenLinkExtended {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 GenLinkExtended::getDocStructure {this fileTypes properties {prefix ""}} {
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 diagramLine [$this getDiagramLine $fv $first $prefix]
set propertyLine [$this getPropertyLine $fv $properties 0 $prefix]
set structureLine $diagramLine
if {$propertyLine != ""} {
append structureLine "\n$propertyLine"
}
if $first {
set structure $structureLine
} else {
set structure "$structure\n$structureLine"
}
set first 0
}
}
return $structure
}
method GenLinkExtended::match {this fileTypes fileVersion} {
if {[lsearch $fileTypes [[$fileVersion file] type]] == -1} {
return 0
}
return 1
}
method GenLinkExtended::getDiagramLine {this fileVersion first {prefix ""}} {
set indent "="
if {$first == "1"} {
set indent "+"
}
set name [[$fileVersion file] qualifiedName :]
set type [[$fileVersion file] type]
set line "${name}_$type | $indent | | $type | | | $fileVersion"
if {$prefix != ""} {
set line "${prefix}_$line"
}
return $line
}
method GenLinkExtended::getPropertyLine {this fileVersion properties first {prefix ""}} {
return [GenFileProp::getStructureLine \
dummyThis $fileVersion $properties $first $prefix]
}