home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
systems.tcl
< prev
next >
Wrap
Text File
|
1997-08-26
|
4KB
|
172 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)systems.tcl /main/titanic/2
# Author: M. van Leeuwen
# Description: Report on system versions
# Usage in: PhaseVersion and higher
#
#---------------------------------------------------------------------------
# SccsId = @(#)systems.tcl /main/titanic/2 26 Aug 1997 Copyright 1997 Cayenne Software Inc.
Class ReportSystemsObject : {GCObject} {
constructor
attribute projectName
attribute configFullName
attribute systemVersion
attribute systemName
attribute systemVersionName
attribute phaseName
attribute phaseIndex
}
constructor ReportSystemsObject {class this proj cv pv sv} {
set this [GCObject::constructor $class $this]
$this projectName [$proj name]
$this configFullName [[$cv config] name].[$cv versionName]
$this systemVersion $sv
$this systemName [[$sv system] name]
$this systemVersionName [$sv versionName]
$this phaseName [[$pv phase] name]
$this phaseIndex [lsearch \
"Analysis SystemDesign ObjectDesign Implementation" \
[[$pv phase] name]]
return $this
}
Class ReportSystems : {ReportBase} {
constructor
attribute printProps
method corporateReport
method projectReport
method configReport
method phaseReport
method doReport
}
constructor ReportSystems {class this} {
set this [ReportBase::constructor $class $this]
if { [lsearch $Options "properties"] != -1 } {
$this printProps 1
} else {
$this printProps 0
}
$this reportName "Systems"
return $this
}
method ReportSystems::corporateReport {this} {
foreach proj [[$this corporate] projects] {
foreach cv [$proj configVersions] {
foreach pv [$cv phaseVersions] {
foreach sv [query "system.type == system" $pv.systemVersions] {
lappend data [ReportSystemsObject new $proj $cv $pv $sv]
}
}
}
}
return [$this doReport data]
}
method ReportSystems::projectReport {this} {
set proj [$this project]
foreach cv [[$this project] configVersions] {
foreach pv [$cv phaseVersions] {
foreach sv [query "system.type == system" $pv.systemVersions] {
lappend data [ReportSystemsObject new $proj $cv $pv $sv]
}
}
}
return [$this doReport data]
}
method ReportSystems::configReport {this} {
set proj [$this project]
set cv [$this configV]
foreach pv [[$this configV] phaseVersions] {
foreach sv [query "system.type == system" $pv.systemVersions] {
lappend data [ReportSystemsObject new $proj $cv $pv $sv]
}
}
return [$this doReport data]
}
method ReportSystems::phaseReport {this} {
set proj [$this project]
set cv [$this configV]
set pv [$this phaseV]
foreach sv [query "system.type == system" $this.phaseV.systemVersions] {
lappend data [ReportSystemsObject new $proj $cv $pv $sv]
}
return [$this doReport data]
}
method ReportSystems::doReport {this v_data} {
upvar $v_data data
if ![info exists data] { return 0 }
set report [$this report]
$report header {
[$this report] print System 25
[$this report] print Phase 20
[$this report] print "Selected version" 25
[$this report] print Status 12
[$this report] print Project 20
[$this report] print Configuration 25
[$this report] line
[$this report] line
}
set prevSystemName ""
foreach record [osort projectName configFullName systemName \
phaseIndex $data] {
set systemName [$record systemName]
if { $systemName != $prevSystemName || [$this printProps] } {
$report print $systemName 24
set prevSystemName $systemName
} else {
$report space 24
}
$report space
$report print [$record phaseName] 19
$report space
$report print [$record systemVersionName] 24
$report space
$report print [[$record systemVersion] status ] 11
$report space
$report print [$record projectName] 19
$report space
$report print [$record configFullName] line
if [$this printProps] {
$this showProperties [$record systemVersion]
}
}
$report page
$report remove header
return 0
}
set executeMe [ReportSystems new]