home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
drsqobject.tcl
< prev
next >
Wrap
Text File
|
1997-08-29
|
5KB
|
132 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)drsqobject.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)drsqobject.tcl /main/titanic/4 29 Aug 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 ${DrsDriver::FORMALMODULE}_$levelType]
set intPhase [$qualPropObj getPropertyValue ${DrsDriver::FORMALMODULE}_${levelType}_Phase]
set currPhaseName [[$this getPhase] name]
if {![llength $parDrsObjId] || $currPhaseName != $intPhase} {
set dxlCommand [$this dxlCommand]
set qualDrsObjId [$qualPropObj getPropertyValue ${DrsDriver::FORMALMODULE}]
set qualIntPhase [$qualPropObj getPropertyValue ${DrsDriver::FORMALMODULE}_Phase]
if {![llength $qualDrsObjId] || $qualIntPhase != $currPhaseName} {
set notIntQualFiles [[$this driver] notIntQualFiles]
lappend notIntQualFiles $this
[$this driver] notIntQualFiles $notIntQualFiles
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::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]
}
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 ${DrsDriver::FORMALMODULE}_$levelType $doorsObjId
$qualPropObj setProperty ${DrsDriver::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 ${DrsDriver::FORMALMODULE}_$levelType]
set qualItemObjId [$qualItem getPropertyValue ${DrsDriver::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
}
}
# Do not delete this line -- regeneration end marker