home *** CD-ROM | disk | FTP | other *** search
- 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} {
-
- 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]
- set propertyLine [$this getPropertyLine $fv \
- $properties 0]
- if {$propertyLine != ""} {
- set structureLine "$diagramLine\n$propertyLine"
- }
- if {$first == "1"} {
- 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} {
-
- 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
- }
-
- method GenLinkExtended::getPropertyLine {this fileVersion properties first} {
-
- return [GenFileProp::getStructureLine dummyThis $fileVersion \
- $properties $first]
- }
-