home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
drsqobject.tcl
< prev
next >
Wrap
Text File
|
1997-03-04
|
5KB
|
133 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)drsqobject.tcl /main/hindenburg/10
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)drsqobject.tcl /main/hindenburg/10 4 Mar 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
#Class DrsQObject : {Object} {
# constructor
# method destructor
# method getDoorsParObjId
# method getParentPropertyObject
# method saveReference
# method show
# attribute qualifier
#}
constructor DrsQObject {class this} {
set this [GCObject::constructor $class $this]
# Start constructor user section
# End constructor user section
return $this
}
method DrsQObject::destructor {this} {
# Start destructor user section
# End destructor user section
}
method DrsQObject::getDoorsParObjId {this} {
set thisLevel [$this level]
set levelType [$this levelType]
set qualifier [$this qualifier]
set configV [$this getConfigVersion]
set system [$this parentLevel]
if ![$system isA System] {
# this is a DrsQItemObject
set file [$this parentLevel]
set fileV [$file selectedVersion $configV]
set system [$file system]
}
set systemV [$system selectedVersion $configV]
set qualWorkItem [$systemV findDefinition $qualifier $configV]
set qualPropObj [$qualWorkItem properties]
set parDrsObjId [$qualPropObj getPropertyValue ${FORMALMODULE}_$levelType]
set intPhase [$qualPropObj getPropertyValue ${FORMALMODULE}_${levelType}_Phase]
set currPhaseName [[$this getPhase] name]
if {![llength $parDrsObjId] || $currPhaseName != $intPhase} {
set dxlCommand [$this dxlCommand]
set qualDrsObjId [$qualPropObj getPropertyValue ${FORMALMODULE}]
set qualIntPhase [$qualPropObj getPropertyValue ${FORMALMODULE}_Phase]
if {![llength $qualDrsObjId] || $qualIntPhase != $currPhaseName} {
global notIntQualFiles
lappend notIntQualFiles $this
return
}
set doorsObject [$dxlCommand doorsObjectFind $qualDrsObjId]
set doorsObject [$dxlCommand doorsObjectCreateChild \
$doorsObject $levelType]
$dxlCommand doorsObjectAttrSave $doorsObject "Absolute Number"
} else {
set dxlCommand [$this dxlCommand]
set doorsObject [$dxlCommand doorsObjectFind $parDrsObjId]
$dxlCommand doorsObjectShow $doorsObject
}
return $doorsObject
}
method DrsQObject::saveReference {this fLevel drsRefs parOTVers selIts} {
if {[llength $drsRefs] > 1 } {
set levelType [$this levelType]
set qualPropObj [$this getParentPropertyObject]
set ownDrsRef [lreplace $drsRefs 0 0]
# file section created
set doorsObjId [lindex $drsRefs 0]
set phN [[$this getPhase] name]
$qualPropObj setProperty ${FORMALMODULE}_$levelType $doorsObjId
$qualPropObj setProperty ${FORMALMODULE}_${levelType}_Phase $phN
#$this addDoorsRefToCorp [[[$this level] project] name] $doorsObjId
} else {
# drsRefs : <objectRef> <projectName>
set ownDrsRef [lindex $drsRefs 0]
}
return $ownDrsRef
}
method DrsQObject::show {this majorOper minorOper} {
set qualItem [$this getParentPropertyObject]
set levelType [$this levelType]
set myTypeObjId [$qualItem getPropertyValue ${FORMALMODULE}_$levelType]
set qualItemObjId [$qualItem getPropertyValue $FORMALMODULE ]
set dxlCommand [$this dxlCommand]
if {$minorOper == "Objects"} {
return
}
if {[llength $qualItemObjId] && $qualItemObjId > 0 } {
set doorsObject [$dxlCommand doorsObjectFind $qualItemObjId]
$dxlCommand doorsObject$majorOper $doorsObject $qualItemObjId
}
if {[llength $myTypeObjId] && $myTypeObjId > 0 } {
set doorsObject [$dxlCommand doorsObjectFind $myTypeObjId]
$dxlCommand doorsObject$majorOper $doorsObject $minorOper
}
}
method DrsQObject::getParentPropertyObject {this} {
set thisLevel [$this level]
set qualifier [$this qualifier]
set configV [$this getConfigVersion]
set system [$this parentLevel]
set systemV [$system selectedVersion $configV]
if [$systemV isNil] {
return
}
set qualWorkItem [$systemV findDefinition $qualifier $configV]
return [$qualWorkItem properties]
}
# Do not delete this line -- regeneration end marker