home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1995
- #
- # File: %W%
- # Author: Harm Leijendeckers
- # Description: Report on system versions
- # Usage in: PhaseVersion and higher
- #
- #---------------------------------------------------------------------------
- # SccsId = %W% %G% Copyright 1995 Cadre Technologies 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
- method corporateReport
- method projectReport
- method configReport
- method phaseReport
-
- method doReport
- }
-
-
- constructor ReportSystems {class this} {
- set this [ReportBase::constructor $class $this]
- $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 Project 21
- [$this report] print Configuration line
- [$this report] print " -System" 30
- [$this report] print Phase 25
- [$this report] print "Selected SystemVersion" 25
- [$this report] print Status line
- [$this report] print - [[$this report] linelen] fill line
- [$this report] line
- }
-
- set prevConfigName ""
- foreach record [osort projectName configFullName systemName \
- phaseIndex $data] {
- set configName [$record projectName]/[$record configFullName]
- if { $configName != $prevConfigName } {
- if ![lempty $prevConfigName] {
- $report line
- }
- $report print [$record projectName] 20
- $report space
- $report print [$record configFullName] line
- set prevConfigName [$record projectName]/[$record configFullName]
- set prevSystemName ""
- }
- set systemName [$record systemName]
- if { $systemName != $prevSystemName } {
- $report print " -$systemName" 30
- set prevSystemName $systemName
- }
- if ![$report queued] { $report space 30 }
- $report print [$record phaseName] 25
- $report print [$record systemVersionName] 24
- $report space
- $report print [[$record systemVersion] status ] line
- }
-
- $report page
- $report remove header
-
- return 0
- }
-
-
- set executeMe [ReportSystems new]
-